1 /* Linux namespaces(7) support.
3 Copyright (C) 2015-2016 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 fork. */
48 /* Handle systems without setns. */
51 do_setns (int fd
, int nstype
)
54 return setns (fd
, nstype
);
55 #elif defined __NR_setns
56 return syscall (__NR_setns
, fd
, nstype
);
63 /* Handle systems without MSG_CMSG_CLOEXEC. */
65 #ifndef MSG_CMSG_CLOEXEC
66 #define MSG_CMSG_CLOEXEC 0
69 /* A Linux namespace. */
73 /* Filename of this namespace's entries in /proc/PID/ns. */
76 /* Nonzero if this object has been initialized. */
79 /* Nonzero if this namespace is supported on this system. */
82 /* ID of the namespace the calling process is in, used to
83 see if other processes share the namespace. The code in
84 this file assumes that the calling process never changes
89 /* Return the absolute filename of process PID's /proc/PID/ns
90 entry for namespace NS. The returned value persists until
91 this function is next called. */
94 linux_ns_filename (struct linux_ns
*ns
, int pid
)
96 static char filename
[PATH_MAX
];
99 xsnprintf (filename
, sizeof (filename
), "/proc/%d/ns/%s", pid
,
105 /* Return a representation of the caller's TYPE namespace, or
106 NULL if TYPE namespaces are not supported on this system. */
108 static struct linux_ns
*
109 linux_ns_get_namespace (enum linux_ns_type type
)
111 static struct linux_ns namespaces
[NUM_LINUX_NS_TYPES
] =
122 gdb_assert (type
>= 0 && type
< NUM_LINUX_NS_TYPES
);
123 ns
= &namespaces
[type
];
125 if (!ns
->initialized
)
129 if (stat (linux_ns_filename (ns
, getpid ()), &sb
) == 0)
139 return ns
->supported
? ns
: NULL
;
142 /* See nat/linux-namespaces.h. */
145 linux_ns_same (pid_t pid
, enum linux_ns_type type
)
147 struct linux_ns
*ns
= linux_ns_get_namespace (type
);
148 const char *filename
;
151 /* If the kernel does not support TYPE namespaces then there's
152 effectively only one TYPE namespace that all processes on
157 /* Stat PID's TYPE namespace entry to get the namespace ID. This
158 might fail if the process died, or if we don't have the right
159 permissions (though we should be attached by this time so this
160 seems unlikely). In any event, we can't make any decisions and
162 filename
= linux_ns_filename (ns
, pid
);
163 if (stat (filename
, &sb
) != 0)
164 perror_with_name (filename
);
166 return sb
.st_ino
== ns
->id
;
169 /* We need to use setns(2) to handle filesystem access in mount
170 namespaces other than our own, but this isn't permitted for
171 multithreaded processes. GDB is multithreaded when compiled
172 with Guile support, and may become multithreaded if compiled
173 with Python support. We deal with this by spawning a single-
174 threaded helper process to access mount namespaces other than
177 The helper process is started the first time a call to setns
178 is required. The main process (GDB or gdbserver) communicates
179 with the helper via sockets, passing file descriptors where
180 necessary using SCM_RIGHTS. Once started the helper process
181 runs until the main process terminates; when this happens the
182 helper will receive socket errors, notice that its parent died,
183 and exit accordingly (see mnsh_maybe_mourn_peer).
185 The protocol is that the main process sends a request in a
186 single message, and the helper replies to every message it
187 receives with a single-message response. If the helper
188 receives a message it does not understand it will reply with
189 a MNSH_MSG_ERROR message. The main process checks all
190 responses it receives with gdb_assert, so if the main process
191 receives something unexpected (which includes MNSH_MSG_ERROR)
192 the main process will call internal_error.
194 For avoidance of doubt, if the helper process receives a
195 message it doesn't handle it will reply with MNSH_MSG_ERROR.
196 If the main process receives MNSH_MSG_ERROR at any time then
197 it will call internal_error. If internal_error causes the
198 main process to exit, the helper will notice this and also
199 exit. The helper will not exit until the main process
200 terminates, so if the user continues through internal_error
201 the helper will still be there awaiting requests from the
204 Messages in both directions have the following payload:
206 - TYPE (enum mnsh_msg_type, always sent) - the message type.
208 - INT2 (int, always sent, though not always used) - two
209 values whose meaning is message-type-dependent.
210 See enum mnsh_msg_type documentation below.
211 - FD (int, optional, sent using SCM_RIGHTS) - an open file
213 - BUF (unstructured data, optional) - some data with message-
214 type-dependent meaning.
216 Note that the helper process is the child of a call to fork,
217 so all code in the helper must be async-signal-safe. */
219 /* Mount namespace helper message types. */
223 /* A communication error occurred. Receipt of this message
224 by either end will cause an assertion failure in the main
228 /* Requests, sent from the main process to the helper. */
230 /* A request that the helper call setns. Arguments should
231 be passed in FD and INT1. Helper should respond with a
235 /* A request that the helper call open. Arguments should
236 be passed in BUF, INT1 and INT2. The filename (in BUF)
237 should include a terminating NUL character. The helper
238 should respond with a MNSH_RET_FD. */
241 /* A request that the helper call unlink. The single
242 argument (the filename) should be passed in BUF, and
243 should include a terminating NUL character. The helper
244 should respond with a MNSH_RET_INT. */
247 /* A request that the helper call readlink. The single
248 argument (the filename) should be passed in BUF, and
249 should include a terminating NUL character. The helper
250 should respond with a MNSH_RET_INTSTR. */
253 /* Responses, sent to the main process from the helper. */
255 /* Return an integer in INT1 and errno in INT2. */
258 /* Return a file descriptor in FD if one was opened or an
259 integer in INT1 otherwise. Return errno in INT2. */
262 /* Return an integer in INT1, errno in INT2, and optionally
267 /* Print a string representation of a message using debug_printf.
268 This function is not async-signal-safe so should never be
269 called from the helper. */
272 mnsh_debug_print_message (enum mnsh_msg_type type
,
273 int fd
, int int1
, int int2
,
274 const void *buf
, int bufsiz
)
276 gdb_byte
*c
= (gdb_byte
*) buf
;
277 gdb_byte
*cl
= c
+ bufsiz
;
282 debug_printf ("ERROR");
286 debug_printf ("SETNS");
290 debug_printf ("OPEN");
293 case MNSH_REQ_UNLINK
:
294 debug_printf ("UNLINK");
297 case MNSH_REQ_READLINK
:
298 debug_printf ("READLINK");
302 debug_printf ("INT");
309 case MNSH_RET_INTSTR
:
310 debug_printf ("INTSTR");
314 debug_printf ("unknown-packet-%d", type
);
317 debug_printf (" %d %d %d \"", fd
, int1
, int2
);
320 debug_printf (*c
>= ' ' && *c
<= '~' ? "%c" : "\\%o", *c
);
325 /* Forward declaration. */
327 static void mnsh_maybe_mourn_peer (void);
329 /* Send a message. The argument SOCK is the file descriptor of the
330 sending socket, the other arguments are the payload to send.
331 Return the number of bytes sent on success. Return -1 on failure
332 and set errno appropriately. This function is called by both the
333 main process and the helper so must be async-signal-safe. */
336 mnsh_send_message (int sock
, enum mnsh_msg_type type
,
337 int fd
, int int1
, int int2
,
338 const void *buf
, int bufsiz
)
342 char fdbuf
[CMSG_SPACE (sizeof (fd
))];
345 /* Build the basic TYPE, INT1, INT2 message. */
346 memset (&msg
, 0, sizeof (msg
));
349 iov
[0].iov_base
= &type
;
350 iov
[0].iov_len
= sizeof (type
);
351 iov
[1].iov_base
= &int1
;
352 iov
[1].iov_len
= sizeof (int1
);
353 iov
[2].iov_base
= &int2
;
354 iov
[2].iov_len
= sizeof (int2
);
358 /* Append BUF if supplied. */
359 if (buf
!= NULL
&& bufsiz
> 0)
361 iov
[3].iov_base
= alloca (bufsiz
);
362 memcpy (iov
[3].iov_base
, buf
, bufsiz
);
363 iov
[3].iov_len
= bufsiz
;
368 /* Attach FD if supplied. */
371 struct cmsghdr
*cmsg
;
373 msg
.msg_control
= fdbuf
;
374 msg
.msg_controllen
= sizeof (fdbuf
);
376 cmsg
= CMSG_FIRSTHDR (&msg
);
377 cmsg
->cmsg_level
= SOL_SOCKET
;
378 cmsg
->cmsg_type
= SCM_RIGHTS
;
379 cmsg
->cmsg_len
= CMSG_LEN (sizeof (int));
381 memcpy (CMSG_DATA (cmsg
), &fd
, sizeof (int));
383 msg
.msg_controllen
= cmsg
->cmsg_len
;
386 /* Send the message. */
387 size
= sendmsg (sock
, &msg
, 0);
390 mnsh_maybe_mourn_peer ();
392 if (debug_linux_namespaces
)
394 debug_printf ("mnsh: send: ");
395 mnsh_debug_print_message (type
, fd
, int1
, int2
, buf
, bufsiz
);
396 debug_printf (" -> %s\n", pulongest (size
));
402 /* Receive a message. The argument SOCK is the file descriptor of
403 the receiving socket, the other arguments point to storage for
404 the received payload. Returns the number of bytes stored into
405 BUF on success, which may be zero in the event no BUF was sent.
406 Return -1 on failure and set errno appropriately. This function
407 is called from both the main process and the helper and must be
408 async-signal-safe. */
411 mnsh_recv_message (int sock
, enum mnsh_msg_type
*type
,
412 int *fd
, int *int1
, int *int2
,
413 void *buf
, int bufsiz
)
417 char fdbuf
[CMSG_SPACE (sizeof (*fd
))];
418 struct cmsghdr
*cmsg
;
419 ssize_t size
, fixed_size
;
422 /* Build the message to receive data into. */
423 memset (&msg
, 0, sizeof (msg
));
426 iov
[0].iov_base
= type
;
427 iov
[0].iov_len
= sizeof (*type
);
428 iov
[1].iov_base
= int1
;
429 iov
[1].iov_len
= sizeof (*int1
);
430 iov
[2].iov_base
= int2
;
431 iov
[2].iov_len
= sizeof (*int2
);
432 iov
[3].iov_base
= buf
;
433 iov
[3].iov_len
= bufsiz
;
437 for (fixed_size
= i
= 0; i
< msg
.msg_iovlen
- 1; i
++)
438 fixed_size
+= iov
[i
].iov_len
;
440 msg
.msg_control
= fdbuf
;
441 msg
.msg_controllen
= sizeof (fdbuf
);
443 /* Receive the message. */
444 size
= recvmsg (sock
, &msg
, MSG_CMSG_CLOEXEC
);
447 if (debug_linux_namespaces
)
448 debug_printf ("namespace-helper: recv failed (%s)\n",
451 mnsh_maybe_mourn_peer ();
456 /* Check for truncation. */
457 if (size
< fixed_size
|| (msg
.msg_flags
& (MSG_TRUNC
| MSG_CTRUNC
)))
459 if (debug_linux_namespaces
)
460 debug_printf ("namespace-helper: recv truncated (%s 0x%x)\n",
461 pulongest (size
), msg
.msg_flags
);
463 mnsh_maybe_mourn_peer ();
469 /* Unpack the file descriptor if supplied. */
470 cmsg
= CMSG_FIRSTHDR (&msg
);
472 && cmsg
->cmsg_len
== CMSG_LEN (sizeof (int))
473 && cmsg
->cmsg_level
== SOL_SOCKET
474 && cmsg
->cmsg_type
== SCM_RIGHTS
)
475 memcpy (fd
, CMSG_DATA (cmsg
), sizeof (int));
479 if (debug_linux_namespaces
)
481 debug_printf ("mnsh: recv: ");
482 mnsh_debug_print_message (*type
, *fd
, *int1
, *int2
, buf
,
487 /* Return the number of bytes of data in BUF. */
488 return size
- fixed_size
;
491 /* Shortcuts for returning results from the helper. */
493 #define mnsh_return_int(sock, result, error) \
494 mnsh_send_message (sock, MNSH_RET_INT, -1, result, error, NULL, 0)
496 #define mnsh_return_fd(sock, fd, error) \
497 mnsh_send_message (sock, MNSH_RET_FD, \
498 (fd) < 0 ? -1 : (fd), \
499 (fd) < 0 ? (fd) : 0, \
502 #define mnsh_return_intstr(sock, result, buf, bufsiz, error) \
503 mnsh_send_message (sock, MNSH_RET_INTSTR, -1, result, error, \
506 /* Handle a MNSH_REQ_SETNS message. Must be async-signal-safe. */
509 mnsh_handle_setns (int sock
, int fd
, int nstype
)
511 int result
= do_setns (fd
, nstype
);
513 return mnsh_return_int (sock
, result
, errno
);
516 /* Handle a MNSH_REQ_OPEN message. Must be async-signal-safe. */
519 mnsh_handle_open (int sock
, const char *filename
,
520 int flags
, mode_t mode
)
522 int fd
= gdb_open_cloexec (filename
, flags
, mode
);
523 ssize_t result
= mnsh_return_fd (sock
, fd
, errno
);
531 /* Handle a MNSH_REQ_UNLINK message. Must be async-signal-safe. */
534 mnsh_handle_unlink (int sock
, const char *filename
)
536 int result
= unlink (filename
);
538 return mnsh_return_int (sock
, result
, errno
);
541 /* Handle a MNSH_REQ_READLINK message. Must be async-signal-safe. */
544 mnsh_handle_readlink (int sock
, const char *filename
)
547 int len
= readlink (filename
, buf
, sizeof (buf
));
549 return mnsh_return_intstr (sock
, len
,
550 buf
, len
< 0 ? 0 : len
,
554 /* The helper process. Never returns. Must be async-signal-safe. */
556 static void mnsh_main (int sock
) ATTRIBUTE_NORETURN
;
563 enum mnsh_msg_type type
;
566 ssize_t size
, response
= -1;
568 size
= mnsh_recv_message (sock
, &type
,
572 if (size
>= 0 && size
< sizeof (buf
))
578 response
= mnsh_handle_setns (sock
, fd
, int1
);
582 if (size
> 0 && buf
[size
- 1] == '\0')
583 response
= mnsh_handle_open (sock
, buf
, int1
, int2
);
586 case MNSH_REQ_UNLINK
:
587 if (size
> 0 && buf
[size
- 1] == '\0')
588 response
= mnsh_handle_unlink (sock
, buf
);
591 case MNSH_REQ_READLINK
:
592 if (size
> 0 && buf
[size
- 1] == '\0')
593 response
= mnsh_handle_readlink (sock
, buf
);
597 break; /* Handled below. */
601 /* Close any file descriptors we were passed. */
605 /* Can't handle this message, bounce it back. */
611 mnsh_send_message (sock
, MNSH_MSG_ERROR
,
612 -1, int1
, int2
, buf
, size
);
617 /* The mount namespace helper process. */
624 /* Socket for communication. */
627 /* ID of the mount namespace the helper is currently in. */
631 /* In the helper process this is set to the PID of the process that
632 created the helper (i.e. GDB or gdbserver). In the main process
633 this is set to zero. Used by mnsh_maybe_mourn_peer. */
634 static int mnsh_creator_pid
= 0;
636 /* Return an object representing the mount namespace helper process.
637 If no mount namespace helper process has been started then start
638 one. Return NULL if no mount namespace helper process could be
641 static struct linux_mnsh
*
642 linux_mntns_get_helper (void)
644 static struct linux_mnsh
*helper
= NULL
;
648 static struct linux_mnsh h
;
650 pid_t helper_creator
= getpid ();
653 ns
= linux_ns_get_namespace (LINUX_NS_MNT
);
657 if (gdb_socketpair_cloexec (AF_UNIX
, SOCK_STREAM
, 0, sv
) < 0)
663 int saved_errno
= errno
;
677 mnsh_creator_pid
= helper_creator
;
679 /* Debug printing isn't async-signal-safe. */
680 debug_linux_namespaces
= 0;
685 /* Parent process. */
689 helper
->sock
= sv
[0];
690 helper
->nsid
= ns
->id
;
692 if (debug_linux_namespaces
)
693 debug_printf ("Started mount namespace helper process %d\n",
700 /* Check whether the other process died and act accordingly. Called
701 whenever a socket error occurs, from both the main process and the
702 helper. Must be async-signal-safe when called from the helper. */
705 mnsh_maybe_mourn_peer (void)
707 if (mnsh_creator_pid
!= 0)
709 /* We're in the helper. Check if our current parent is the
710 process that started us. If it isn't, then our original
711 parent died and we've been reparented. Exit immediately
712 if that's the case. */
713 if (getppid () != mnsh_creator_pid
)
718 /* We're in the main process. */
720 struct linux_mnsh
*helper
= linux_mntns_get_helper ();
726 /* We already mourned it. */
730 pid
= waitpid (helper
->pid
, &status
, WNOHANG
);
733 /* The helper is still alive. */
739 warning (_("mount namespace helper vanished?"));
741 internal_warning (__FILE__
, __LINE__
,
742 _("unhandled error %d"), errno
);
744 else if (pid
== helper
->pid
)
746 if (WIFEXITED (status
))
747 warning (_("mount namespace helper exited with status %d"),
748 WEXITSTATUS (status
));
749 else if (WIFSIGNALED (status
))
750 warning (_("mount namespace helper killed by signal %d"),
753 internal_warning (__FILE__
, __LINE__
,
754 _("unhandled status %d"), status
);
757 internal_warning (__FILE__
, __LINE__
,
758 _("unknown pid %d"), pid
);
760 /* Something unrecoverable happened. */
765 /* Shortcuts for sending messages to the helper. */
767 #define mnsh_send_setns(helper, fd, nstype) \
768 mnsh_send_message (helper->sock, MNSH_REQ_SETNS, fd, nstype, 0, \
771 #define mnsh_send_open(helper, filename, flags, mode) \
772 mnsh_send_message (helper->sock, MNSH_REQ_OPEN, -1, flags, mode, \
773 filename, strlen (filename) + 1)
775 #define mnsh_send_unlink(helper, filename) \
776 mnsh_send_message (helper->sock, MNSH_REQ_UNLINK, -1, 0, 0, \
777 filename, strlen (filename) + 1)
779 #define mnsh_send_readlink(helper, filename) \
780 mnsh_send_message (helper->sock, MNSH_REQ_READLINK, -1, 0, 0, \
781 filename, strlen (filename) + 1)
783 /* Receive a message from the helper. Issue an assertion failure if
784 the message isn't a correctly-formatted MNSH_RET_INT. Set RESULT
785 and ERROR and return 0 on success. Set errno and return -1 on
789 mnsh_recv_int (struct linux_mnsh
*helper
, int *result
, int *error
)
791 enum mnsh_msg_type type
;
796 size
= mnsh_recv_message (helper
->sock
, &type
, &fd
,
802 gdb_assert (type
== MNSH_RET_INT
);
803 gdb_assert (fd
== -1);
804 gdb_assert (size
== 0);
809 /* Receive a message from the helper. Issue an assertion failure if
810 the message isn't a correctly-formatted MNSH_RET_FD. Set FD and
811 ERROR and return 0 on success. Set errno and return -1 on
815 mnsh_recv_fd (struct linux_mnsh
*helper
, int *fd
, int *error
)
817 enum mnsh_msg_type type
;
822 size
= mnsh_recv_message (helper
->sock
, &type
, fd
,
828 gdb_assert (type
== MNSH_RET_FD
);
829 gdb_assert (size
== 0);
833 gdb_assert (result
< 0);
840 /* Receive a message from the helper. Issue an assertion failure if
841 the message isn't a correctly-formatted MNSH_RET_INTSTR. Set
842 RESULT and ERROR and optionally store data in BUF, then return
843 the number of bytes stored in BUF on success (this may be zero).
844 Set errno and return -1 on error. */
847 mnsh_recv_intstr (struct linux_mnsh
*helper
,
848 int *result
, int *error
,
849 void *buf
, int bufsiz
)
851 enum mnsh_msg_type type
;
855 size
= mnsh_recv_message (helper
->sock
, &type
, &fd
,
862 gdb_assert (type
== MNSH_RET_INTSTR
);
863 gdb_assert (fd
== -1);
868 /* Return values for linux_mntns_access_fs. */
872 /* Something went wrong, errno is set. */
875 /* The main process is in the correct mount namespace.
876 The caller should access the filesystem directly. */
879 /* The helper is in the correct mount namespace.
880 The caller should access the filesystem via the helper. */
884 /* Return a value indicating how the caller should access the
885 mount namespace of process PID. */
887 static enum mnsh_fs_code
888 linux_mntns_access_fs (pid_t pid
)
890 struct cleanup
*old_chain
;
893 struct linux_mnsh
*helper
;
897 if (pid
== getpid ())
898 return MNSH_FS_DIRECT
;
900 ns
= linux_ns_get_namespace (LINUX_NS_MNT
);
902 return MNSH_FS_DIRECT
;
904 old_chain
= make_cleanup (null_cleanup
, NULL
);
906 fd
= gdb_open_cloexec (linux_ns_filename (ns
, pid
), O_RDONLY
, 0);
910 make_cleanup_close (fd
);
912 if (fstat (fd
, &sb
) != 0)
915 if (sb
.st_ino
== ns
->id
)
917 do_cleanups (old_chain
);
919 return MNSH_FS_DIRECT
;
922 helper
= linux_mntns_get_helper ();
926 if (sb
.st_ino
!= helper
->nsid
)
930 size
= mnsh_send_setns (helper
, fd
, 0);
934 if (mnsh_recv_int (helper
, &result
, &error
) != 0)
939 /* ENOSYS indicates that an entire function is unsupported
940 (it's not appropriate for our versions of open/unlink/
941 readlink to sometimes return with ENOSYS depending on how
942 they're called) so we convert ENOSYS to ENOTSUP if setns
951 helper
->nsid
= sb
.st_ino
;
954 do_cleanups (old_chain
);
956 return MNSH_FS_HELPER
;
961 do_cleanups (old_chain
);
964 return MNSH_FS_ERROR
;
967 /* See nat/linux-namespaces.h. */
970 linux_mntns_open_cloexec (pid_t pid
, const char *filename
,
971 int flags
, mode_t mode
)
973 enum mnsh_fs_code access
= linux_mntns_access_fs (pid
);
974 struct linux_mnsh
*helper
;
978 if (access
== MNSH_FS_ERROR
)
981 if (access
== MNSH_FS_DIRECT
)
982 return gdb_open_cloexec (filename
, flags
, mode
);
984 gdb_assert (access
== MNSH_FS_HELPER
);
986 helper
= linux_mntns_get_helper ();
988 size
= mnsh_send_open (helper
, filename
, flags
, mode
);
992 if (mnsh_recv_fd (helper
, &fd
, &error
) != 0)
1001 /* See nat/linux-namespaces.h. */
1004 linux_mntns_unlink (pid_t pid
, const char *filename
)
1006 enum mnsh_fs_code access
= linux_mntns_access_fs (pid
);
1007 struct linux_mnsh
*helper
;
1011 if (access
== MNSH_FS_ERROR
)
1014 if (access
== MNSH_FS_DIRECT
)
1015 return unlink (filename
);
1017 gdb_assert (access
== MNSH_FS_HELPER
);
1019 helper
= linux_mntns_get_helper ();
1021 size
= mnsh_send_unlink (helper
, filename
);
1025 if (mnsh_recv_int (helper
, &ret
, &error
) != 0)
1034 /* See nat/linux-namespaces.h. */
1037 linux_mntns_readlink (pid_t pid
, const char *filename
,
1038 char *buf
, size_t bufsiz
)
1040 enum mnsh_fs_code access
= linux_mntns_access_fs (pid
);
1041 struct linux_mnsh
*helper
;
1045 if (access
== MNSH_FS_ERROR
)
1048 if (access
== MNSH_FS_DIRECT
)
1049 return readlink (filename
, buf
, bufsiz
);
1051 gdb_assert (access
== MNSH_FS_HELPER
);
1053 helper
= linux_mntns_get_helper ();
1055 size
= mnsh_send_readlink (helper
, filename
);
1059 size
= mnsh_recv_intstr (helper
, &ret
, &error
, buf
, bufsiz
);
1067 gdb_assert (size
== ret
);
This page took 0.051599 seconds and 4 git commands to generate.