public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/7] GNU/Linux mount namespace support
@ 2015-04-16 12:19 Gary Benson
  2015-04-16 12:19 ` [PATCH 4/7] Remove linux_proc_pid_get_ns Gary Benson
                   ` (18 more replies)
  0 siblings, 19 replies; 84+ messages in thread
From: Gary Benson @ 2015-04-16 12:19 UTC (permalink / raw)
  To: gdb-patches

Hi all,

This series allows GDB and gdbserver on GNU/Linux systems to attach
to processes in mount namespaces other than the debugger's own when
invoked with the appropriate permissions.  This allows an application
running in a container to be debugged by running GDB or gdbserver on
the host, or by running GDB or gdbserver from within another container
that shares the host's PID namespace.

This series builds on the 'Do not require "file" commands for remote
targets' series that is currently under review:

  https://sourceware.org/ml/gdb-patches/2015-04/msg00015.html

It also requires the 'Do not manipulate "target:" filenames as local
paths' patch to function correctly:

  https://sourceware.org/ml/gdb-patches/2015-04/msg00547.html

A tree with the latest versions of all these patches applied is
available here:

  https://github.com/gbenson/binutils-gdb/tree/namespaces

The patches in this series are as follows:

 - Patch 1 (Move make_cleanup_close to common code) is a minor
   refactoring required for patch 3.

 - Patch 2 (Introduce target_fileio_set_fs) adds target-layer
   support for systems where different processes can have different
   views of the filesystem.  The new function target_fileio_set_fs
   sets the context in which target_filesystem_is_local and the
   other target_fileio_* functions operate, and can be called to
   select the filesystem of a specific inferior or the filesystem
   of the debugger (GDB or gdbserver).  The default implementation
   of target_fileio_set_fs does nothing, which means that targets
   where inferiors and the debugger share the same filesystem will
   work without modification.

 - Patch 3 (Introduce nat/linux-namespaces.[ch]) introduces some
   shared code that GDB and gdbserver can use to query and enter
   Linux namespaces.

 - GDB contained a small amount of namespace-aware code used to
   display a warning.  Patch 4 (Remove linux_proc_pid_get_ns)
   replaces the querying part of this code with a call to the
   new code introduced by patch 3.

 - Patch 5 (Implement multiple-filesystem support for Linux targets)
   does exactly what it says on the tin.  With this patch you can
   attach to processes in containers using the native Linux target
   using, e.g., "gdb -p PID".

 - Patch 6 (Implement multiple-filesystem support for remote targets)
   adds remote protocol support for remote targets where different
   processes can have different views of the filesystem.  A new
   vFile:setfs packet is introduced that passes the context set using
   target_fileio_set_fs to the remote target.  Caching is used to
   avoid sending unnecessary vFile:setfs packets.

 - Patch 7 (Implement vFile:setfs in gdbserver) implements the
   vFile:setfs packet in gdbserver.  Currently only GNU/Linux systems
   support this; gdbserver on other systems will return empty
   responses in reply to vFile:setfs packets.

Built and regtested on RHEL 6.6 x86_64.

Ok to commit?

Thanks,
Gary

--
http://gbenson.net/

^ permalink raw reply	[flat|nested] 84+ messages in thread

end of thread, other threads:[~2016-01-18 11:44 UTC | newest]

Thread overview: 84+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16 12:19 [PATCH 0/7] GNU/Linux mount namespace support Gary Benson
2015-04-16 12:19 ` [PATCH 4/7] Remove linux_proc_pid_get_ns Gary Benson
2015-04-17  4:36   ` Doug Evans
2015-04-17 13:44     ` Gary Benson
2015-04-16 12:20 ` [PATCH 1/7] Move make_cleanup_close to common code Gary Benson
2015-04-17  2:47   ` Doug Evans
2015-04-16 12:20 ` [PATCH 2/7] Introduce target_fileio_set_fs Gary Benson
2015-04-17  3:04   ` Doug Evans
2015-04-17 13:36     ` Gary Benson
2015-04-17 14:21       ` Pedro Alves
2015-04-17 17:28         ` Doug Evans
2015-04-17 17:46           ` Pedro Alves
2015-04-20 11:11             ` Gary Benson
2015-04-16 12:27 ` [PATCH 6/7] Implement multiple-filesystem support for remote targets Gary Benson
2015-04-16 15:12   ` Eli Zaretskii
2015-04-17 15:06   ` Pedro Alves
2015-04-17 16:00     ` Gary Benson
2015-04-17 16:07       ` Pedro Alves
2015-04-17 16:20         ` Gary Benson
2015-04-17 15:31   ` Pedro Alves
2015-04-17 16:01     ` Gary Benson
2015-04-16 12:34 ` [PATCH 3/7] Introduce nat/linux-namespaces.[ch] Gary Benson
2015-04-17  4:26   ` Doug Evans
2015-04-17 13:41     ` Gary Benson
2015-04-17 14:52   ` Pedro Alves
2015-04-17 17:32     ` Doug Evans
2015-04-20 11:12       ` Gary Benson
2015-04-16 12:54 ` [PATCH 7/7] Implement vFile:setfs in gdbserver Gary Benson
2015-04-17 15:30   ` Pedro Alves
2015-04-17 16:47     ` Gary Benson
2015-04-17 16:29       ` Gary Benson
2015-04-17 17:09         ` Pedro Alves
2015-04-16 13:06 ` [PATCH 5/7] Implement multiple-filesystem support for Linux targets Gary Benson
2015-04-17 15:35 ` [PATCH 0/7] GNU/Linux mount namespace support Pedro Alves
2015-04-20 16:49 ` Iago López Galeiras
2015-04-21  7:56   ` Gary Benson
2015-04-30 12:06 ` [PATCH 6/9 v2] Implement mount namespace support for native Linux targets Gary Benson
2015-04-30 16:24   ` Eli Zaretskii
2015-04-30 18:05     ` Gary Benson
2015-05-21 14:59   ` Pedro Alves
2015-05-27 10:16     ` Gary Benson
2015-04-30 12:06 ` [PATCH 0/9 v2] GNU/Linux mount namespace support Gary Benson
2015-06-10 14:23   ` [pushed][PATCH " Gary Benson
2015-04-30 12:06 ` [PATCH 3/9 v2] Remove linux_proc_pid_get_ns Gary Benson
2015-05-21 14:56   ` Pedro Alves
2015-04-30 12:06 ` [PATCH 5/9 v2] Add "inferior" argument to some target_fileio functions Gary Benson
2015-05-21 14:57   ` Pedro Alves
2015-04-30 12:15 ` [PATCH 4/9 v2] Comment and whitespace changes Gary Benson
2015-05-21 14:57   ` Pedro Alves
2015-04-30 12:41 ` [PATCH 8/9 v2] Implement vFile:setfs in gdbserver Gary Benson
2015-05-21 15:00   ` Pedro Alves
2015-06-09 14:11     ` Gary Benson
2015-06-09 14:23       ` Pedro Alves
2015-06-10  9:01         ` Gary Benson
2015-06-10  9:41           ` Gary Benson
2015-06-10 14:53             ` Pedro Alves
2015-04-30 12:45 ` [PATCH 2/9 v2] Introduce nat/linux-namespaces.[ch] Gary Benson
     [not found]   ` <20150501000739.740.47967@domU-12-31-39-0A-A0-4F>
2015-05-01  9:28     ` Gary Benson
2015-05-01 13:18       ` Alban Crequy
2015-05-01 20:29         ` Gary Benson
2015-05-06 18:55           ` Alban Crequy
2015-05-07  8:42             ` Gary Benson
2015-05-07 10:39           ` Gary Benson
2015-05-21 14:56   ` Pedro Alves
2015-05-27 10:14     ` Gary Benson
2015-06-11  8:40     ` James Greenhalgh
2015-06-11 11:04       ` Pedro Alves
2015-06-11 12:42         ` [OB PATCH] Use pulongest for printing ssize_t Gary Benson
2015-06-15 15:02   ` [PATCH 2/9 v2] Introduce nat/linux-namespaces.[ch] Michael Eager
2015-06-15 22:12     ` Michael Eager
2015-06-16  8:40       ` Gary Benson
2015-06-16 14:19         ` Michael Eager
2015-06-17  9:51           ` Gary Benson
2016-01-08 10:49   ` Yao Qi
2016-01-11 16:40     ` Gary Benson
2016-01-18 11:44       ` [OB PATCH] Fix gdbserver build failure on targets without fork Gary Benson
2015-04-30 14:12 ` [PATCH 7/9 v2] Implement multiple-filesystem support for remote targets Gary Benson
2015-04-30 17:10   ` Eli Zaretskii
2015-05-21 15:04   ` Pedro Alves
2015-04-30 14:12 ` [PATCH 1/9 v2] Move make_cleanup_close to common code Gary Benson
2015-05-21 14:56   ` Pedro Alves
2015-05-27  9:52     ` Gary Benson
2015-04-30 14:14 ` [PATCH 9/9 v2] Announce new container-awareness features for GNU/Linux systems Gary Benson
2015-04-30 16:20   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).