1 /* Linux namespaces(7) support.
3 Copyright (C) 2015 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #include "common-defs.h"
21 #include "nat/linux-namespaces.h"
22 #include "filestuff.h"
24 #include <sys/syscall.h>
25 #include <sys/types.h>
27 #include <sys/socket.h>
32 /* See nat/linux-namespaces.h. */
33 int debug_linux_namespaces
;
35 /* Handle systems without setns. */
38 do_setns (int fd
, int nstype
)
41 return setns (fd
, nstype
);
42 #elif defined __NR_setns
43 return syscall (__NR_setns
, fd
, nstype
);
50 /* Handle systems without MSG_CMSG_CLOEXEC. */
52 #ifndef MSG_CMSG_CLOEXEC
53 #define MSG_CMSG_CLOEXEC 0
56 /* A Linux namespace. */
60 /* Filename of this namespace's entries in /proc/PID/ns. */
63 /* Nonzero if this object has been initialized. */
66 /* Nonzero if this namespace is supported on this system. */
69 /* ID of the namespace the calling process is in, used to
70 see if other processes share the namespace. The code in
71 this file assumes that the calling process never changes
76 /* Return the absolute filename of process PID's /proc/PID/ns
77 entry for namespace NS. The returned value persists until
78 this function is next called. */
81 linux_ns_filename (struct linux_ns
*ns
, int pid
)
83 static char filename
[PATH_MAX
];
86 xsnprintf (filename
, sizeof (filename
), "/proc/%d/ns/%s", pid
,
92 /* Return a representation of the caller's TYPE namespace, or
93 NULL if TYPE namespaces are not supported on this system. */
95 static struct linux_ns
*
96 linux_ns_get_namespace (enum linux_ns_type type
)
98 static struct linux_ns namespaces
[NUM_LINUX_NS_TYPES
] =
109 gdb_assert (type
>= 0 && type
< NUM_LINUX_NS_TYPES
);
110 ns
= &namespaces
[type
];
112 if (!ns
->initialized
)
116 if (stat (linux_ns_filename (ns
, getpid ()), &sb
) == 0)
126 return ns
->supported
? ns
: NULL
;
129 /* See nat/linux-namespaces.h. */
132 linux_ns_same (pid_t pid
, enum linux_ns_type type
)
134 struct linux_ns
*ns
= linux_ns_get_namespace (type
);
135 const char *filename
;
138 /* If the kernel does not support TYPE namespaces then there's
139 effectively only one TYPE namespace that all processes on
144 /* Stat PID's TYPE namespace entry to get the namespace ID. This
145 might fail if the process died, or if we don't have the right
146 permissions (though we should be attached by this time so this
147 seems unlikely). In any event, we can't make any decisions and
149 filename
= linux_ns_filename (ns
, pid
);
150 if (stat (filename
, &sb
) != 0)
151 perror_with_name (filename
);
153 return sb
.st_ino
== ns
->id
;
156 /* We need to use setns(2) to handle filesystem access in mount
157 namespaces other than our own, but this isn't permitted for
158 multithreaded processes. GDB is multithreaded when compiled
159 with Guile support, and may become multithreaded if compiled
160 with Python support. We deal with this by spawning a single-
161 threaded helper process to access mount namespaces other than
164 The helper process is started the first time a call to setns
165 is required. The main process (GDB or gdbserver) communicates
166 with the helper via sockets, passing file descriptors where
167 necessary using SCM_RIGHTS. Once started the helper process
168 runs until the main process terminates; when this happens the
169 helper will receive socket errors, notice that its parent died,
170 and exit accordingly (see mnsh_maybe_mourn_peer).
172 The protocol is that the main process sends a request in a
173 single message, and the helper replies to every message it
174 receives with a single-message response. If the helper
175 receives a message it does not understand it will reply with
176 a MNSH_MSG_ERROR message. The main process checks all
177 responses it receives with gdb_assert, so if the main process
178 receives something unexpected (which includes MNSH_MSG_ERROR)
179 the main process will call internal_error.
181 For avoidance of doubt, if the helper process receives a
182 message it doesn't handle it will reply with MNSH_MSG_ERROR.
183 If the main process receives MNSH_MSG_ERROR at any time then
184 it will call internal_error. If internal_error causes the
185 main process to exit, the helper will notice this and also
186 exit. The helper will not exit until the main process
187 terminates, so if the user continues through internal_error
188 the helper will still be there awaiting requests from the
191 Messages in both directions have the following payload:
193 - TYPE (enum mnsh_msg_type, always sent) - the message type.
195 - INT2 (int, always sent, though not always used) - two
196 values whose meaning is message-type-dependent.
197 See enum mnsh_msg_type documentation below.
198 - FD (int, optional, sent using SCM_RIGHTS) - an open file
200 - BUF (unstructured data, optional) - some data with message-
201 type-dependent meaning.
203 Note that the helper process is the child of a call to fork,
204 so all code in the helper must be async-signal-safe. */
206 /* Mount namespace helper message types. */
210 /* A communication error occurred. Receipt of this message
211 by either end will cause an assertion failure in the main
215 /* Requests, sent from the main process to the helper. */
217 /* A request that the helper call setns. Arguments should
218 be passed in FD and INT1. Helper should respond with a
222 /* A request that the helper call open. Arguments should
223 be passed in BUF, INT1 and INT2. The filename (in BUF)
224 should include a terminating NUL character. The helper
225 should respond with a MNSH_RET_FD. */
228 /* A request that the helper call unlink. The single
229 argument (the filename) should be passed in BUF, and
230 should include a terminating NUL character. The helper
231 should respond with a MNSH_RET_INT. */
234 /* A request that the helper call readlink. The single
235 argument (the filename) should be passed in BUF, and
236 should include a terminating NUL character. The helper
237 should respond with a MNSH_RET_INTSTR. */
240 /* Responses, sent to the main process from the helper. */
242 /* Return an integer in INT1 and errno in INT2. */
245 /* Return a file descriptor in FD if one was opened or an
246 integer in INT1 otherwise. Return errno in INT2. */
249 /* Return an integer in INT1, errno in INT2, and optionally
254 /* Print a string representation of a message using debug_printf.
255 This function is not async-signal-safe so should never be
256 called from the helper. */
259 mnsh_debug_print_message (enum mnsh_msg_type type
,
260 int fd
, int int1
, int int2
,
261 const void *buf
, int bufsiz
)
263 gdb_byte
*c
= (gdb_byte
*) buf
;
264 gdb_byte
*cl
= c
+ bufsiz
;
269 debug_printf ("ERROR");
273 debug_printf ("SETNS");
277 debug_printf ("OPEN");
280 case MNSH_REQ_UNLINK
:
281 debug_printf ("UNLINK");
284 case MNSH_REQ_READLINK
:
285 debug_printf ("READLINK");
289 debug_printf ("INT");
296 case MNSH_RET_INTSTR
:
297 debug_printf ("INTSTR");
301 debug_printf ("unknown-packet-%d", type
);
304 debug_printf (" %d %d %d \"", fd
, int1
, int2
);
307 debug_printf (*c
>= ' ' && *c
<= '~' ? "%c" : "\\%o", *c
);
312 /* Forward declaration. */
314 static void mnsh_maybe_mourn_peer (void);
316 /* Send a message. The argument SOCK is the file descriptor of the
317 sending socket, the other arguments are the payload to send.
318 Return the number of bytes sent on success. Return -1 on failure
319 and set errno appropriately. This function is called by both the
320 main process and the helper so must be async-signal-safe. */
323 mnsh_send_message (int sock
, enum mnsh_msg_type type
,
324 int fd
, int int1
, int int2
,
325 const void *buf
, int bufsiz
)
329 char fdbuf
[CMSG_SPACE (sizeof (fd
))];
332 /* Build the basic TYPE, INT1, INT2 message. */
333 memset (&msg
, 0, sizeof (msg
));
336 iov
[0].iov_base
= &type
;
337 iov
[0].iov_len
= sizeof (type
);
338 iov
[1].iov_base
= &int1
;
339 iov
[1].iov_len
= sizeof (int1
);
340 iov
[2].iov_base
= &int2
;
341 iov
[2].iov_len
= sizeof (int2
);
345 /* Append BUF if supplied. */
346 if (buf
!= NULL
&& bufsiz
> 0)
348 iov
[3].iov_base
= alloca (bufsiz
);
349 memcpy (iov
[3].iov_base
, buf
, bufsiz
);
350 iov
[3].iov_len
= bufsiz
;
355 /* Attach FD if supplied. */
358 struct cmsghdr
*cmsg
;
360 msg
.msg_control
= fdbuf
;
361 msg
.msg_controllen
= sizeof (fdbuf
);
363 cmsg
= CMSG_FIRSTHDR (&msg
);
364 cmsg
->cmsg_level
= SOL_SOCKET
;
365 cmsg
->cmsg_type
= SCM_RIGHTS
;
366 cmsg
->cmsg_len
= CMSG_LEN (sizeof (int));
368 memcpy (CMSG_DATA (cmsg
), &fd
, sizeof (int));
370 msg
.msg_controllen
= cmsg
->cmsg_len
;
373 /* Send the message. */
374 size
= sendmsg (sock
, &msg
, 0);
377 mnsh_maybe_mourn_peer ();
379 if (debug_linux_namespaces
)
381 debug_printf ("mnsh: send: ");
382 mnsh_debug_print_message (type
, fd
, int1
, int2
, buf
, bufsiz
);
383 debug_printf (" -> %s\n", pulongest (size
));
389 /* Receive a message. The argument SOCK is the file descriptor of
390 the receiving socket, the other arguments point to storage for
391 the received payload. Returns the number of bytes stored into
392 BUF on success, which may be zero in the event no BUF was sent.
393 Return -1 on failure and set errno appropriately. This function
394 is called from both the main process and the helper and must be
395 async-signal-safe. */
398 mnsh_recv_message (int sock
, enum mnsh_msg_type
*type
,
399 int *fd
, int *int1
, int *int2
,
400 void *buf
, int bufsiz
)
404 char fdbuf
[CMSG_SPACE (sizeof (*fd
))];
405 struct cmsghdr
*cmsg
;
406 ssize_t size
, fixed_size
;
409 /* Build the message to receive data into. */
410 memset (&msg
, 0, sizeof (msg
));
413 iov
[0].iov_base
= type
;
414 iov
[0].iov_len
= sizeof (*type
);
415 iov
[1].iov_base
= int1
;
416 iov
[1].iov_len
= sizeof (*int1
);
417 iov
[2].iov_base
= int2
;
418 iov
[2].iov_len
= sizeof (*int2
);
419 iov
[3].iov_base
= buf
;
420 iov
[3].iov_len
= bufsiz
;
424 for (fixed_size
= i
= 0; i
< msg
.msg_iovlen
- 1; i
++)
425 fixed_size
+= iov
[i
].iov_len
;
427 msg
.msg_control
= fdbuf
;
428 msg
.msg_controllen
= sizeof (fdbuf
);
430 /* Receive the message. */
431 size
= recvmsg (sock
, &msg
, MSG_CMSG_CLOEXEC
);
434 if (debug_linux_namespaces
)
435 debug_printf ("namespace-helper: recv failed (%s)\n",
438 mnsh_maybe_mourn_peer ();
443 /* Check for truncation. */
444 if (size
< fixed_size
|| (msg
.msg_flags
& (MSG_TRUNC
| MSG_CTRUNC
)))
446 if (debug_linux_namespaces
)
447 debug_printf ("namespace-helper: recv truncated (%s 0x%x)\n",
448 pulongest (size
), msg
.msg_flags
);
450 mnsh_maybe_mourn_peer ();
456 /* Unpack the file descriptor if supplied. */
457 cmsg
= CMSG_FIRSTHDR (&msg
);
459 && cmsg
->cmsg_len
== CMSG_LEN (sizeof (int))
460 && cmsg
->cmsg_level
== SOL_SOCKET
461 && cmsg
->cmsg_type
== SCM_RIGHTS
)
462 memcpy (fd
, CMSG_DATA (cmsg
), sizeof (int));
466 if (debug_linux_namespaces
)
468 debug_printf ("mnsh: recv: ");
469 mnsh_debug_print_message (*type
, *fd
, *int1
, *int2
, buf
,
474 /* Return the number of bytes of data in BUF. */
475 return size
- fixed_size
;
478 /* Shortcuts for returning results from the helper. */
480 #define mnsh_return_int(sock, result, error) \
481 mnsh_send_message (sock, MNSH_RET_INT, -1, result, error, NULL, 0)
483 #define mnsh_return_fd(sock, fd, error) \
484 mnsh_send_message (sock, MNSH_RET_FD, \
485 (fd) < 0 ? -1 : (fd), \
486 (fd) < 0 ? (fd) : 0, \
489 #define mnsh_return_intstr(sock, result, buf, bufsiz, error) \
490 mnsh_send_message (sock, MNSH_RET_INTSTR, -1, result, error, \
493 /* Handle a MNSH_REQ_SETNS message. Must be async-signal-safe. */
496 mnsh_handle_setns (int sock
, int fd
, int nstype
)
498 int result
= do_setns (fd
, nstype
);
500 return mnsh_return_int (sock
, result
, errno
);
503 /* Handle a MNSH_REQ_OPEN message. Must be async-signal-safe. */
506 mnsh_handle_open (int sock
, const char *filename
,
507 int flags
, mode_t mode
)
509 int fd
= gdb_open_cloexec (filename
, flags
, mode
);
510 ssize_t result
= mnsh_return_fd (sock
, fd
, errno
);
518 /* Handle a MNSH_REQ_UNLINK message. Must be async-signal-safe. */
521 mnsh_handle_unlink (int sock
, const char *filename
)
523 int result
= unlink (filename
);
525 return mnsh_return_int (sock
, result
, errno
);
528 /* Handle a MNSH_REQ_READLINK message. Must be async-signal-safe. */
531 mnsh_handle_readlink (int sock
, const char *filename
)
534 int len
= readlink (filename
, buf
, sizeof (buf
));
536 return mnsh_return_intstr (sock
, len
,
537 buf
, len
< 0 ? 0 : len
,
541 /* The helper process. Never returns. Must be async-signal-safe. */
543 static void mnsh_main (int sock
) ATTRIBUTE_NORETURN
;
550 enum mnsh_msg_type type
;
553 ssize_t size
, response
= -1;
555 size
= mnsh_recv_message (sock
, &type
,
559 if (size
>= 0 && size
< sizeof (buf
))
565 response
= mnsh_handle_setns (sock
, fd
, int1
);
569 if (size
> 0 && buf
[size
- 1] == '\0')
570 response
= mnsh_handle_open (sock
, buf
, int1
, int2
);
573 case MNSH_REQ_UNLINK
:
574 if (size
> 0 && buf
[size
- 1] == '\0')
575 response
= mnsh_handle_unlink (sock
, buf
);
578 case MNSH_REQ_READLINK
:
579 if (size
> 0 && buf
[size
- 1] == '\0')
580 response
= mnsh_handle_readlink (sock
, buf
);
584 break; /* Handled below. */
588 /* Close any file descriptors we were passed. */
592 /* Can't handle this message, bounce it back. */
598 mnsh_send_message (sock
, MNSH_MSG_ERROR
,
599 -1, int1
, int2
, buf
, size
);
604 /* The mount namespace helper process. */
611 /* Socket for communication. */
614 /* ID of the mount namespace the helper is currently in. */
618 /* In the helper process this is set to the PID of the process that
619 created the helper (i.e. GDB or gdbserver). In the main process
620 this is set to zero. Used by mnsh_maybe_mourn_peer. */
621 static int mnsh_creator_pid
= 0;
623 /* Return an object representing the mount namespace helper process.
624 If no mount namespace helper process has been started then start
625 one. Return NULL if no mount namespace helper process could be
628 static struct linux_mnsh
*
629 linux_mntns_get_helper (void)
631 static struct linux_mnsh
*helper
= NULL
;
635 static struct linux_mnsh h
;
637 pid_t helper_creator
= getpid ();
640 ns
= linux_ns_get_namespace (LINUX_NS_MNT
);
644 if (gdb_socketpair_cloexec (AF_UNIX
, SOCK_STREAM
, 0, sv
) < 0)
650 int saved_errno
= errno
;
664 mnsh_creator_pid
= helper_creator
;
666 /* Debug printing isn't async-signal-safe. */
667 debug_linux_namespaces
= 0;
672 /* Parent process. */
676 helper
->sock
= sv
[0];
677 helper
->nsid
= ns
->id
;
679 if (debug_linux_namespaces
)
680 debug_printf ("Started mount namespace helper process %d\n",
687 /* Check whether the other process died and act accordingly. Called
688 whenever a socket error occurs, from both the main process and the
689 helper. Must be async-signal-safe when called from the helper. */
692 mnsh_maybe_mourn_peer (void)
694 if (mnsh_creator_pid
!= 0)
696 /* We're in the helper. Check if our current parent is the
697 process that started us. If it isn't, then our original
698 parent died and we've been reparented. Exit immediately
699 if that's the case. */
700 if (getppid () != mnsh_creator_pid
)
705 /* We're in the main process. */
707 struct linux_mnsh
*helper
= linux_mntns_get_helper ();
713 /* We already mourned it. */
717 pid
= waitpid (helper
->pid
, &status
, WNOHANG
);
720 /* The helper is still alive. */
726 warning (_("mount namespace helper vanished?"));
728 internal_warning (__FILE__
, __LINE__
,
729 _("unhandled error %d"), errno
);
731 else if (pid
== helper
->pid
)
733 if (WIFEXITED (status
))
734 warning (_("mount namespace helper exited with status %d"),
735 WEXITSTATUS (status
));
736 else if (WIFSIGNALED (status
))
737 warning (_("mount namespace helper killed by signal %d"),
740 internal_warning (__FILE__
, __LINE__
,
741 _("unhandled status %d"), status
);
744 internal_warning (__FILE__
, __LINE__
,
745 _("unknown pid %d"), pid
);
747 /* Something unrecoverable happened. */
752 /* Shortcuts for sending messages to the helper. */
754 #define mnsh_send_setns(helper, fd, nstype) \
755 mnsh_send_message (helper->sock, MNSH_REQ_SETNS, fd, nstype, 0, \
758 #define mnsh_send_open(helper, filename, flags, mode) \
759 mnsh_send_message (helper->sock, MNSH_REQ_OPEN, -1, flags, mode, \
760 filename, strlen (filename) + 1)
762 #define mnsh_send_unlink(helper, filename) \
763 mnsh_send_message (helper->sock, MNSH_REQ_UNLINK, -1, 0, 0, \
764 filename, strlen (filename) + 1)
766 #define mnsh_send_readlink(helper, filename) \
767 mnsh_send_message (helper->sock, MNSH_REQ_READLINK, -1, 0, 0, \
768 filename, strlen (filename) + 1)
770 /* Receive a message from the helper. Issue an assertion failure if
771 the message isn't a correctly-formatted MNSH_RET_INT. Set RESULT
772 and ERROR and return 0 on success. Set errno and return -1 on
776 mnsh_recv_int (struct linux_mnsh
*helper
, int *result
, int *error
)
778 enum mnsh_msg_type type
;
783 size
= mnsh_recv_message (helper
->sock
, &type
, &fd
,
789 gdb_assert (type
== MNSH_RET_INT
);
790 gdb_assert (fd
== -1);
791 gdb_assert (size
== 0);
796 /* Receive a message from the helper. Issue an assertion failure if
797 the message isn't a correctly-formatted MNSH_RET_FD. Set FD and
798 ERROR and return 0 on success. Set errno and return -1 on
802 mnsh_recv_fd (struct linux_mnsh
*helper
, int *fd
, int *error
)
804 enum mnsh_msg_type type
;
809 size
= mnsh_recv_message (helper
->sock
, &type
, fd
,
815 gdb_assert (type
== MNSH_RET_FD
);
816 gdb_assert (size
== 0);
820 gdb_assert (result
< 0);
827 /* Receive a message from the helper. Issue an assertion failure if
828 the message isn't a correctly-formatted MNSH_RET_INTSTR. Set
829 RESULT and ERROR and optionally store data in BUF, then return
830 the number of bytes stored in BUF on success (this may be zero).
831 Set errno and return -1 on error. */
834 mnsh_recv_intstr (struct linux_mnsh
*helper
,
835 int *result
, int *error
,
836 void *buf
, int bufsiz
)
838 enum mnsh_msg_type type
;
842 size
= mnsh_recv_message (helper
->sock
, &type
, &fd
,
849 gdb_assert (type
== MNSH_RET_INTSTR
);
850 gdb_assert (fd
== -1);
855 /* Return values for linux_mntns_access_fs. */
859 /* Something went wrong, errno is set. */
862 /* The main process is in the correct mount namespace.
863 The caller should access the filesystem directly. */
866 /* The helper is in the correct mount namespace.
867 The caller should access the filesystem via the helper. */
871 /* Return a value indicating how the caller should access the
872 mount namespace of process PID. */
874 static enum mnsh_fs_code
875 linux_mntns_access_fs (pid_t pid
)
877 struct cleanup
*old_chain
;
880 struct linux_mnsh
*helper
;
884 if (pid
== getpid ())
885 return MNSH_FS_DIRECT
;
887 ns
= linux_ns_get_namespace (LINUX_NS_MNT
);
889 return MNSH_FS_DIRECT
;
891 old_chain
= make_cleanup (null_cleanup
, NULL
);
893 fd
= gdb_open_cloexec (linux_ns_filename (ns
, pid
), O_RDONLY
, 0);
897 old_chain
= make_cleanup_close (fd
);
899 if (fstat (fd
, &sb
) != 0)
902 if (sb
.st_ino
== ns
->id
)
904 do_cleanups (old_chain
);
906 return MNSH_FS_DIRECT
;
909 helper
= linux_mntns_get_helper ();
913 if (sb
.st_ino
!= helper
->nsid
)
917 size
= mnsh_send_setns (helper
, fd
, 0);
921 if (mnsh_recv_int (helper
, &result
, &error
) != 0)
926 /* ENOSYS indicates that an entire function is unsupported
927 (it's not appropriate for our versions of open/unlink/
928 readlink to sometimes return with ENOSYS depending on how
929 they're called) so we convert ENOSYS to ENOTSUP if setns
938 helper
->nsid
= sb
.st_ino
;
941 do_cleanups (old_chain
);
943 return MNSH_FS_HELPER
;
948 do_cleanups (old_chain
);
951 return MNSH_FS_ERROR
;
954 /* See nat/linux-namespaces.h. */
957 linux_mntns_open_cloexec (pid_t pid
, const char *filename
,
958 int flags
, mode_t mode
)
960 enum mnsh_fs_code access
= linux_mntns_access_fs (pid
);
961 struct linux_mnsh
*helper
;
965 if (access
== MNSH_FS_ERROR
)
968 if (access
== MNSH_FS_DIRECT
)
969 return gdb_open_cloexec (filename
, flags
, mode
);
971 gdb_assert (access
== MNSH_FS_HELPER
);
973 helper
= linux_mntns_get_helper ();
975 size
= mnsh_send_open (helper
, filename
, flags
, mode
);
979 if (mnsh_recv_fd (helper
, &fd
, &error
) != 0)
988 /* See nat/linux-namespaces.h. */
991 linux_mntns_unlink (pid_t pid
, const char *filename
)
993 enum mnsh_fs_code access
= linux_mntns_access_fs (pid
);
994 struct linux_mnsh
*helper
;
998 if (access
== MNSH_FS_ERROR
)
1001 if (access
== MNSH_FS_DIRECT
)
1002 return unlink (filename
);
1004 gdb_assert (access
== MNSH_FS_HELPER
);
1006 helper
= linux_mntns_get_helper ();
1008 size
= mnsh_send_unlink (helper
, filename
);
1012 if (mnsh_recv_int (helper
, &ret
, &error
) != 0)
1021 /* See nat/linux-namespaces.h. */
1024 linux_mntns_readlink (pid_t pid
, const char *filename
,
1025 char *buf
, size_t bufsiz
)
1027 enum mnsh_fs_code access
= linux_mntns_access_fs (pid
);
1028 struct linux_mnsh
*helper
;
1032 if (access
== MNSH_FS_ERROR
)
1035 if (access
== MNSH_FS_DIRECT
)
1036 return readlink (filename
, buf
, bufsiz
);
1038 gdb_assert (access
== MNSH_FS_HELPER
);
1040 helper
= linux_mntns_get_helper ();
1042 size
= mnsh_send_readlink (helper
, filename
);
1046 size
= mnsh_recv_intstr (helper
, &ret
, &error
, buf
, bufsiz
);
1054 gdb_assert (size
== ret
);
This page took 0.050969 seconds and 4 git commands to generate.