blob: 3e37da194bfd586f552c27d21f0f96a6b337961f [file] [log] [blame]
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001/*
2 * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
3 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
4 * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
Wichert Akkerman4dc8a2a1999-12-23 14:20:14 +00005 * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
Roland McGrathe1e584b2003-06-02 19:18:58 +00006 * Copyright (c) 2000 PocketPenguins Inc. Linux for Hitachi SuperH
7 * port by Greg Banks <gbanks@pocketpenguins.com>
Elliott Hughesb7556142018-02-20 17:03:16 -08008 * Copyright (c) 1999-2018 The strace developers.
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00009 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. The name of the author may not be used to endorse or promote products
20 * derived from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000032 */
33
34#include "defs.h"
Elliott Hughesb7556142018-02-20 17:03:16 -080035#include <linux/mman.h>
Wichert Akkerman2e2553a1999-05-09 00:29:58 +000036#include <sys/mman.h>
Denys Vlasenko1ba85432013-02-19 11:28:20 +010037
Dmitry V. Levinea1fea62015-03-31 19:45:08 +000038unsigned long
39get_pagesize(void)
Dmitry V. Levinc76a3632013-03-05 14:58:24 +000040{
41 static unsigned long pagesize;
42
Elliott Hughes03a418e2018-06-15 13:11:40 -070043 if (!pagesize) {
44 long ret = sysconf(_SC_PAGESIZE);
45
46 if (ret < 0)
47 perror_func_msg_and_die("sysconf(_SC_PAGESIZE)");
48 if (ret == 0)
49 error_func_msg_and_die("sysconf(_SC_PAGESIZE) "
50 "returned 0");
51
52 pagesize = (unsigned long) ret;
53 }
54
Dmitry V. Levinc76a3632013-03-05 14:58:24 +000055 return pagesize;
56}
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000057
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000058SYS_FUNC(brk)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000059{
Dmitry V. Levin85813ce2015-07-19 23:37:40 +000060 printaddr(tcp->u_arg[0]);
61
62 return RVAL_DECODED | RVAL_HEX;
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000063}
64
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +000065#include "xlat/mmap_prot.h"
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +000066#include "xlat/mmap_flags.h"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000067
Elliott Hughesb7556142018-02-20 17:03:16 -080068#ifndef MAP_HUGE_SHIFT
69# define MAP_HUGE_SHIFT 26
70#endif
71
72#ifndef MAP_HUGE_MASK
73# define MAP_HUGE_MASK 0x3f
74#endif
75
76static void
77print_mmap_flags(kernel_ulong_t flags)
78{
79 printxval64(mmap_flags, flags & MAP_TYPE, "MAP_???");
80 flags &= ~MAP_TYPE;
81
82 const unsigned int mask = MAP_HUGE_MASK << MAP_HUGE_SHIFT;
83 const unsigned int hugetlb_value = flags & mask;
84
85 flags &= ~mask;
Elliott Hughes28e98bc2018-06-14 16:59:04 -070086 if (flags) {
87 tprints("|");
88 printflags64(mmap_flags, flags, NULL);
89 }
Elliott Hughesb7556142018-02-20 17:03:16 -080090
91 if (hugetlb_value)
92 tprintf("|%u<<MAP_HUGE_SHIFT",
93 hugetlb_value >> MAP_HUGE_SHIFT);
94}
95
Dmitry V. Levin85813ce2015-07-19 23:37:40 +000096static void
Elliott Hughesd35df492017-02-15 15:19:05 -080097print_mmap(struct tcb *tcp, kernel_ulong_t *u_arg, unsigned long long offset)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000098{
Elliott Hughesd35df492017-02-15 15:19:05 -080099 const kernel_ulong_t addr = u_arg[0];
100 const kernel_ulong_t len = u_arg[1];
101 const kernel_ulong_t prot = u_arg[2];
102 const kernel_ulong_t flags = u_arg[3];
Dmitry V. Levin3ae86902016-04-01 15:31:23 +0000103 const int fd = u_arg[4];
104
105 printaddr(addr);
Elliott Hughesd35df492017-02-15 15:19:05 -0800106 tprintf(", %" PRI_klu ", ", len);
107 printflags64(mmap_prot, prot, "PROT_???");
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000108 tprints(", ");
Elliott Hughesb7556142018-02-20 17:03:16 -0800109 print_mmap_flags(flags);
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000110 tprints(", ");
Dmitry V. Levin3ae86902016-04-01 15:31:23 +0000111 printfd(tcp, fd);
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000112 tprintf(", %#llx", offset);
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000113}
114
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100115/* Syscall name<->function correspondence is messed up on many arches.
116 * For example:
117 * i386 has __NR_mmap == 90, and it is "old mmap", and
118 * also it has __NR_mmap2 == 192, which is a "new mmap with page offsets".
119 * But x86_64 has just one __NR_mmap == 9, a "new mmap with byte offsets".
120 * Confused? Me too!
121 */
122
Elliott Hughesb7556142018-02-20 17:03:16 -0800123#if HAVE_ARCH_OLD_MMAP
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100124/* Params are pointed to by u_arg[0], offset is in bytes */
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000125SYS_FUNC(old_mmap)
Wichert Akkerman4dc8a2a1999-12-23 14:20:14 +0000126{
Elliott Hughesb7556142018-02-20 17:03:16 -0800127 kernel_ulong_t *args =
128 fetch_indirect_syscall_args(tcp, tcp->u_arg[0], 6);
129
130 if (args)
131 print_mmap(tcp, args, args[5]);
132 else
133 printaddr(tcp->u_arg[0]);
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000134
135 return RVAL_DECODED | RVAL_HEX;
Wichert Akkerman4dc8a2a1999-12-23 14:20:14 +0000136}
Wichert Akkerman4dc8a2a1999-12-23 14:20:14 +0000137
Elliott Hughesb7556142018-02-20 17:03:16 -0800138# if HAVE_ARCH_OLD_MMAP_PGOFF
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100139/* Params are pointed to by u_arg[0], offset is in pages */
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000140SYS_FUNC(old_mmap_pgoff)
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100141{
Elliott Hughesb7556142018-02-20 17:03:16 -0800142 kernel_ulong_t *args =
143 fetch_indirect_syscall_args(tcp, tcp->u_arg[0], 6);
144
145 if (args) {
146 unsigned long long offset;
147
148 offset = args[5];
149 offset *= get_pagesize();
150
151 print_mmap(tcp, args, offset);
152 } else {
153 printaddr(tcp->u_arg[0]);
154 }
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000155
156 return RVAL_DECODED | RVAL_HEX;
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100157}
Elliott Hughesb7556142018-02-20 17:03:16 -0800158# endif /* HAVE_ARCH_OLD_MMAP_PGOFF */
159#endif /* HAVE_ARCH_OLD_MMAP */
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100160
161/* Params are passed directly, offset is in bytes */
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000162SYS_FUNC(mmap)
Wichert Akkerman4dc8a2a1999-12-23 14:20:14 +0000163{
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100164 /* Example of kernel-side handling of this variety of mmap:
165 * arch/x86/kernel/sys_x86_64.c::SYSCALL_DEFINE6(mmap, ...) calls
166 * sys_mmap_pgoff(..., off >> PAGE_SHIFT); i.e. off is in bytes,
167 * since the above code converts off to pages.
168 */
Elliott Hughesd35df492017-02-15 15:19:05 -0800169 print_mmap(tcp, tcp->u_arg, tcp->u_arg[5]);
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000170
171 return RVAL_DECODED | RVAL_HEX;
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100172}
173
174/* Params are passed directly, offset is in pages */
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000175SYS_FUNC(mmap_pgoff)
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100176{
177 /* Try test/mmap_offset_decode.c */
178 unsigned long long offset;
Elliott Hughesd35df492017-02-15 15:19:05 -0800179 offset = tcp->u_arg[5];
Dmitry V. Levinc76a3632013-03-05 14:58:24 +0000180 offset *= get_pagesize();
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000181 print_mmap(tcp, tcp->u_arg, offset);
182
183 return RVAL_DECODED | RVAL_HEX;
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100184}
185
186/* Params are passed directly, offset is in 4k units */
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000187SYS_FUNC(mmap_4koff)
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100188{
189 unsigned long long offset;
Elliott Hughesd35df492017-02-15 15:19:05 -0800190 offset = tcp->u_arg[5];
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100191 offset <<= 12;
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000192 print_mmap(tcp, tcp->u_arg, offset);
193
194 return RVAL_DECODED | RVAL_HEX;
Wichert Akkerman4dc8a2a1999-12-23 14:20:14 +0000195}
196
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000197SYS_FUNC(munmap)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000198{
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000199 printaddr(tcp->u_arg[0]);
Elliott Hughesd35df492017-02-15 15:19:05 -0800200 tprintf(", %" PRI_klu, tcp->u_arg[1]);
201
202 return RVAL_DECODED;
203}
204
205static int
206do_mprotect(struct tcb *tcp, bool has_pkey)
207{
208 printaddr(tcp->u_arg[0]);
209 tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
210 printflags64(mmap_prot, tcp->u_arg[2], "PROT_???");
211
212 if (has_pkey)
213 tprintf(", %d", (int) tcp->u_arg[3]);
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000214
215 return RVAL_DECODED;
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000216}
217
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000218SYS_FUNC(mprotect)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000219{
Elliott Hughesd35df492017-02-15 15:19:05 -0800220 return do_mprotect(tcp, false);
221}
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000222
Elliott Hughesd35df492017-02-15 15:19:05 -0800223SYS_FUNC(pkey_mprotect)
224{
225 return do_mprotect(tcp, true);
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000226}
227
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +0000228#include "xlat/mremap_flags.h"
Wichert Akkerman2e2553a1999-05-09 00:29:58 +0000229
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000230SYS_FUNC(mremap)
Wichert Akkerman2e2553a1999-05-09 00:29:58 +0000231{
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000232 printaddr(tcp->u_arg[0]);
Elliott Hughesd35df492017-02-15 15:19:05 -0800233 tprintf(", %" PRI_klu ", %" PRI_klu ", ", tcp->u_arg[1], tcp->u_arg[2]);
234 printflags64(mremap_flags, tcp->u_arg[3], "MREMAP_???");
Dmitry V. Levinfdc45592009-12-24 23:34:58 +0000235#ifdef MREMAP_FIXED
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000236 if ((tcp->u_arg[3] & (MREMAP_MAYMOVE | MREMAP_FIXED)) ==
237 (MREMAP_MAYMOVE | MREMAP_FIXED)) {
238 tprints(", ");
239 printaddr(tcp->u_arg[4]);
Wichert Akkerman2e2553a1999-05-09 00:29:58 +0000240 }
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000241#endif
242 return RVAL_DECODED | RVAL_HEX;
Wichert Akkerman2e2553a1999-05-09 00:29:58 +0000243}
244
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +0000245#include "xlat/madvise_cmds.h"
Wichert Akkermanc7926982000-04-10 22:22:31 +0000246
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000247SYS_FUNC(madvise)
Wichert Akkermanc7926982000-04-10 22:22:31 +0000248{
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000249 printaddr(tcp->u_arg[0]);
Elliott Hughesd35df492017-02-15 15:19:05 -0800250 tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000251 printxval(madvise_cmds, tcp->u_arg[2], "MADV_???");
252
253 return RVAL_DECODED;
Wichert Akkermanc7926982000-04-10 22:22:31 +0000254}
255
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +0000256#include "xlat/mlockall_flags.h"
Wichert Akkermanc7926982000-04-10 22:22:31 +0000257
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000258SYS_FUNC(mlockall)
Wichert Akkermanc7926982000-04-10 22:22:31 +0000259{
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000260 printflags(mlockall_flags, tcp->u_arg[0], "MCL_???");
261
262 return RVAL_DECODED;
Wichert Akkermanc7926982000-04-10 22:22:31 +0000263}
264
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +0000265#include "xlat/mctl_sync.h"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000266
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000267SYS_FUNC(msync)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000268{
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000269 /* addr */
270 printaddr(tcp->u_arg[0]);
271 /* len */
Elliott Hughesd35df492017-02-15 15:19:05 -0800272 tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000273 /* flags */
274 printflags(mctl_sync, tcp->u_arg[2], "MS_???");
275
276 return RVAL_DECODED;
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000277}
278
Dmitry V. Levin0d0a50a2015-11-15 02:35:57 +0000279#include "xlat/mlock_flags.h"
280
281SYS_FUNC(mlock2)
282{
283 printaddr(tcp->u_arg[0]);
Elliott Hughesd35df492017-02-15 15:19:05 -0800284 tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
Dmitry V. Levin0d0a50a2015-11-15 02:35:57 +0000285 printflags(mlock_flags, tcp->u_arg[2], "MLOCK_???");
286
287 return RVAL_DECODED;
288}
289
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000290SYS_FUNC(mincore)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000291{
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000292 if (entering(tcp)) {
Dmitry V. Levin2c389f62015-07-19 23:25:56 +0000293 printaddr(tcp->u_arg[0]);
Elliott Hughesd35df492017-02-15 15:19:05 -0800294 tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000295 } else {
Dmitry V. Levindfea1da2016-01-29 01:51:54 +0000296 const unsigned long page_size = get_pagesize();
297 const unsigned long page_mask = page_size - 1;
298 unsigned long len = tcp->u_arg[1];
299 unsigned char *vec = NULL;
Denys Vlasenko1d46ba52011-08-31 14:00:02 +0200300
Dmitry V. Levindfea1da2016-01-29 01:51:54 +0000301 len = len / page_size + (len & page_mask ? 1 : 0);
Dmitry V. Levin2c389f62015-07-19 23:25:56 +0000302 if (syserror(tcp) || !verbose(tcp) ||
303 !tcp->u_arg[2] || !(vec = malloc(len)) ||
304 umoven(tcp, tcp->u_arg[2], len, vec) < 0)
305 printaddr(tcp->u_arg[2]);
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000306 else {
Dmitry V. Levindfea1da2016-01-29 01:51:54 +0000307 unsigned long i;
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200308 tprints("[");
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000309 for (i = 0; i < len; i++) {
Elliott Hughesd35df492017-02-15 15:19:05 -0800310 if (i)
311 tprints(", ");
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000312 if (abbrev(tcp) && i >= max_strlen) {
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200313 tprints("...");
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000314 break;
315 }
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200316 tprints((vec[i] & 1) ? "1" : "0");
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000317 }
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200318 tprints("]");
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000319 }
Denys Vlasenko1d46ba52011-08-31 14:00:02 +0200320 free(vec);
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000321 }
322 return 0;
323}
324
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000325SYS_FUNC(remap_file_pages)
Roland McGrath72c5b7b2003-03-05 04:08:00 +0000326{
Elliott Hughesd35df492017-02-15 15:19:05 -0800327 const kernel_ulong_t addr = tcp->u_arg[0];
328 const kernel_ulong_t size = tcp->u_arg[1];
329 const kernel_ulong_t prot = tcp->u_arg[2];
330 const kernel_ulong_t pgoff = tcp->u_arg[3];
331 const kernel_ulong_t flags = tcp->u_arg[4];
Dmitry V. Levin3ae86902016-04-01 15:31:23 +0000332
333 printaddr(addr);
Elliott Hughesd35df492017-02-15 15:19:05 -0800334 tprintf(", %" PRI_klu ", ", size);
335 printflags64(mmap_prot, prot, "PROT_???");
336 tprintf(", %" PRI_klu ", ", pgoff);
Elliott Hughesb7556142018-02-20 17:03:16 -0800337 print_mmap_flags(flags);
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000338
339 return RVAL_DECODED;
Roland McGrath72c5b7b2003-03-05 04:08:00 +0000340}
Roland McGrathb10a3352004-10-07 18:53:12 +0000341
Denys Vlasenko84703742012-02-25 02:38:52 +0100342#if defined(POWERPC)
Dmitry V. Levin0f04b9d2016-05-07 23:00:52 +0000343static bool
344print_protmap_entry(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
345{
Elliott Hughesdc75b012017-07-05 13:54:44 -0700346 tprintf("%#08x", *(unsigned int *) elem_buf);
Dmitry V. Levin0f04b9d2016-05-07 23:00:52 +0000347
348 return true;
349}
350
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000351SYS_FUNC(subpage_prot)
Roland McGrath4a6f6522008-08-25 03:09:16 +0000352{
Elliott Hughesd35df492017-02-15 15:19:05 -0800353 kernel_ulong_t addr = tcp->u_arg[0];
354 kernel_ulong_t len = tcp->u_arg[1];
355 kernel_ulong_t nmemb = len >> 16;
356 kernel_ulong_t map = tcp->u_arg[2];
Roland McGrath4a6f6522008-08-25 03:09:16 +0000357
Dmitry V. Levin0f04b9d2016-05-07 23:00:52 +0000358 printaddr(addr);
Elliott Hughesd35df492017-02-15 15:19:05 -0800359 tprintf(", %" PRI_klu ", ", len);
Dmitry V. Levin0f04b9d2016-05-07 23:00:52 +0000360
361 unsigned int entry;
362 print_array(tcp, map, nmemb, &entry, sizeof(entry),
Elliott Hughes03a418e2018-06-15 13:11:40 -0700363 tfetch_mem, print_protmap_entry, 0);
Roland McGrath4a6f6522008-08-25 03:09:16 +0000364
Dmitry V. Levin85813ce2015-07-19 23:37:40 +0000365 return RVAL_DECODED;
Roland McGrath4a6f6522008-08-25 03:09:16 +0000366}
367#endif