1999-02-19 03:21:36 +03:00
/*
* Copyright ( c ) 1991 , 1992 Paul Kranenburg < pk @ cs . few . eur . nl >
* Copyright ( c ) 1993 Branko Lankester < branko @ hacktic . nl >
* Copyright ( c ) 1993 , 1994 , 1995 , 1996 Rick Sladkey < jrs @ world . std . com >
1999-12-23 17:20:14 +03:00
* Copyright ( c ) 1996 - 1999 Wichert Akkerman < wichert @ cistron . nl >
2003-06-02 23:18:58 +04:00
* Copyright ( c ) 2000 PocketPenguins Inc . Linux for Hitachi SuperH
* port by Greg Banks < gbanks @ pocketpenguins . com >
2018-02-14 01:00:00 +03:00
* Copyright ( c ) 1999 - 2018 The strace developers .
1999-02-19 03:21:36 +03:00
* All rights reserved .
*
2018-12-10 03:00:00 +03:00
* SPDX - License - Identifier : LGPL - 2.1 - or - later
1999-02-19 03:21:36 +03:00
*/
# include "defs.h"
2017-11-17 21:35:06 +03:00
# include <linux/mman.h>
1999-05-09 04:29:58 +04:00
# include <sys/mman.h>
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
2015-03-31 22:45:08 +03:00
unsigned long
get_pagesize ( void )
2013-03-05 18:58:24 +04:00
{
static unsigned long pagesize ;
2018-05-02 21:04:23 +03:00
if ( ! pagesize ) {
long ret = sysconf ( _SC_PAGESIZE ) ;
if ( ret < 0 )
perror_func_msg_and_die ( " sysconf(_SC_PAGESIZE) " ) ;
if ( ret = = 0 )
error_func_msg_and_die ( " sysconf(_SC_PAGESIZE) "
" returned 0 " ) ;
pagesize = ( unsigned long ) ret ;
}
2013-03-05 18:58:24 +04:00
return pagesize ;
}
1999-02-19 03:21:36 +03:00
2015-04-07 04:36:50 +03:00
SYS_FUNC ( brk )
1999-02-19 03:21:36 +03:00
{
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
printaddr ( tcp - > u_arg [ 0 ] ) ;
return RVAL_DECODED | RVAL_HEX ;
1999-02-19 03:21:36 +03:00
}
2014-04-26 03:30:54 +04:00
# include "xlat/mmap_prot.h"
# include "xlat/mmap_flags.h"
1999-02-19 03:21:36 +03:00
2017-11-17 21:35:06 +03:00
# ifndef MAP_HUGE_SHIFT
# define MAP_HUGE_SHIFT 26
# endif
# ifndef MAP_HUGE_MASK
# define MAP_HUGE_MASK 0x3f
# endif
2017-11-17 20:47:53 +03:00
static void
print_mmap_flags ( kernel_ulong_t flags )
{
2018-11-26 04:10:44 +03:00
if ( xlat_verbose ( xlat_verbosity ) ! = XLAT_STYLE_ABBREV )
2018-11-26 23:49:05 +03:00
tprintf ( " %# " PRI_klx , flags ) ;
2018-11-26 04:10:44 +03:00
if ( xlat_verbose ( xlat_verbosity ) = = XLAT_STYLE_RAW )
return ;
if ( xlat_verbose ( xlat_verbosity ) = = XLAT_STYLE_VERBOSE )
tprints ( " /* " ) ;
printxvals_ex ( flags & MAP_TYPE , " MAP_??? " , XLAT_STYLE_ABBREV ,
mmap_flags , NULL ) ;
2017-11-17 21:35:06 +03:00
flags & = ~ MAP_TYPE ;
const unsigned int mask = MAP_HUGE_MASK < < MAP_HUGE_SHIFT ;
const unsigned int hugetlb_value = flags & mask ;
flags & = ~ mask ;
2018-03-10 07:38:10 +03:00
if ( flags ) {
tprints ( " | " ) ;
2018-11-26 04:10:44 +03:00
printflags_ex ( flags , NULL , XLAT_STYLE_ABBREV ,
mmap_flags , NULL ) ;
2018-03-10 07:38:10 +03:00
}
2017-11-17 21:35:06 +03:00
if ( hugetlb_value )
tprintf ( " |%u<<MAP_HUGE_SHIFT " ,
hugetlb_value > > MAP_HUGE_SHIFT ) ;
2018-11-26 04:10:44 +03:00
if ( xlat_verbose ( xlat_verbosity ) = = XLAT_STYLE_VERBOSE )
tprints ( " */ " ) ;
2017-11-17 20:47:53 +03:00
}
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
static void
2016-12-26 13:26:03 +03:00
print_mmap ( struct tcb * tcp , kernel_ulong_t * u_arg , unsigned long long offset )
1999-02-19 03:21:36 +03:00
{
2016-12-26 13:26:03 +03:00
const kernel_ulong_t addr = u_arg [ 0 ] ;
const kernel_ulong_t len = u_arg [ 1 ] ;
const kernel_ulong_t prot = u_arg [ 2 ] ;
const kernel_ulong_t flags = u_arg [ 3 ] ;
2016-04-01 18:31:23 +03:00
const int fd = u_arg [ 4 ] ;
printaddr ( addr ) ;
2016-12-26 13:16:35 +03:00
tprintf ( " , % " PRI_klu " , " , len ) ;
2016-12-25 01:39:06 +03:00
printflags64 ( mmap_prot , prot , " PROT_??? " ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
tprints ( " , " ) ;
2017-11-17 20:47:53 +03:00
print_mmap_flags ( flags ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
tprints ( " , " ) ;
2016-04-01 18:31:23 +03:00
printfd ( tcp , fd ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
tprintf ( " , %#llx " , offset ) ;
1999-02-19 03:21:36 +03:00
}
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
/* Syscall name<->function correspondence is messed up on many arches.
* For example :
* i386 has __NR_mmap = = 90 , and it is " old mmap " , and
* also it has __NR_mmap2 = = 192 , which is a " new mmap with page offsets " .
* But x86_64 has just one __NR_mmap = = 9 , a " new mmap with byte offsets " .
* Confused ? Me too !
*/
2018-01-21 04:46:04 +03:00
# if HAVE_ARCH_OLD_MMAP
2018-01-17 04:18:45 +03:00
/* Params are pointed to by u_arg[0], offset is in bytes */
SYS_FUNC ( old_mmap )
{
2018-01-22 02:23:31 +03:00
kernel_ulong_t * args =
fetch_indirect_syscall_args ( tcp , tcp - > u_arg [ 0 ] , 6 ) ;
2018-01-17 04:18:45 +03:00
if ( args )
print_mmap ( tcp , args , args [ 5 ] ) ;
else
printaddr ( tcp - > u_arg [ 0 ] ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
return RVAL_DECODED | RVAL_HEX ;
1999-12-23 17:20:14 +03:00
}
2018-01-21 04:46:04 +03:00
# if HAVE_ARCH_OLD_MMAP_PGOFF
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
/* Params are pointed to by u_arg[0], offset is in pages */
2015-04-07 04:36:50 +03:00
SYS_FUNC ( old_mmap_pgoff )
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
{
2018-01-22 02:23:31 +03:00
kernel_ulong_t * args =
fetch_indirect_syscall_args ( tcp , tcp - > u_arg [ 0 ] , 6 ) ;
2018-01-17 04:18:45 +03:00
if ( args ) {
unsigned long long offset ;
offset = args [ 5 ] ;
offset * = get_pagesize ( ) ;
print_mmap ( tcp , args , offset ) ;
} else {
printaddr ( tcp - > u_arg [ 0 ] ) ;
}
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
return RVAL_DECODED | RVAL_HEX ;
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
}
Add compat support for s390x
By very popular demand.
While we are here, let's refactor the condition for old_mmap_pgoff into
an arch-specific one, as it is used more than in one place.
* NEWS: Mention this.
* strace.1.in (.SH "MULTIPLE PERSONALITY SUPPORT"): Likewise.
* configure.ac (case "$host_cpu" in) <s390x>: Set arch_m32 to s390, set
cc_flags_m32 to -m31.
(st_MPERS([m32])): Add s390x.
* defs.h [S390X]: Define NEED_UID16_PARSERS.
* linux/s390/arch_sigreturn.c [!S390_FRAME_PTR] (S390_FRAME_PTR): New
macro, define to s390_frame_ptr.
[!SIGNAL_FRAMESIZE] (SIGNAL_FRAMESIZE): New macro, define to
__SIGNAL_FRAMESIZE.
[!PTR_TYPE] (PTR_TYPE): New macro, define to unsigned long.
(arch_sigreturn): Use S390_FRAME_PTR, SIGNAL_FRAMESIZE, and PTR_TYPE
instead of s390_frame_ptr, __SIGNAL_FRAMESIZE, and pointer-sized type,
respectively.
* linux/s390/get_error.c [!ARCH_REGSET] (ARCH_REGSET): New macro, define
* to s390_regset.
(get_error): Use it instead of s390_regset.
* linux/s390/get_scno.c (arch_get_scno): Likewise.
* linux/s390/get_syscall_args.c (get_syscall_args): Likewise.
* linux/s390/set_error.c (arch_set_error, arch_set_success): Likewise.
* linux/s390/set_scno.c (arch_set_scno): Likewise.
* linux/s390x/arch_regs.c (psw_compat_t, s390_compat_regs,
s390x_regs_union, s390_frame_ptr, s390x_frame_ptr, s390x_io): New
variables.
(s390_regset, s390x_regset, ARCH_REGS_FOR_GETREGSET,
ARCH_IOVEC_FOR_GETREGSET, ARCH_PC_REG, ARCH_PERSONALITY_0_IOV_SIZE,
ARCH_PERSONALITY_1_IOV_SIZE): New macros.
* linux/s390x/arch_regs.h (s390_frame_ptr, s390x_frame_ptr): New
prototypes.
* linux/s390x/arch_rt_sigframe.c: Conditionalize on tcp->currpers.
* linux/s390x/arch_sigreturn.c: Likewise.
* linux/s390x/get_error.c: Likewise.
* linux/s390x/get_scno.c: Likewise.
* linux/s390x/get_syscall_args.c: Likewise.
* linux/s390x/set_error.c: Likewise.
* linux/s390x/set_scno.c: Likewise.
* linux/s390x/errnoent1.h: New file.
* linux/s390x/ioctls_arch1.h: Likewise.
* linux/s390x/ioctls_inc1.h: Likewise.
* linux/s390x/signalent1.h: Likewise.
* linux/s390x/syscallent1.h: Likewise.
* Makefile.am (EXTRA_DIST): Add new files added to linux/s390x.
* supported_personalities.h [S390X] (SUPPORTED_PERSONALITIES): Define
to 2.
* tests/strace-V.test: Add s390 to the list of architectures that have
m32 personality.
* linux/s390/arch_defs.h (HAVE_ARCH_OLD_MMAP_PGOFF): New macro.
* linux/s390x/arch_defs.h: Likewise.
* mem.c: Replace #ifdef S390 with #ifdef HAVE_ARCH_OLD_MMAP_PGOFF.
* pathtrace.c: Likewise.
2018-01-10 23:20:06 +03:00
# endif /* HAVE_ARCH_OLD_MMAP_PGOFF */
2018-01-17 04:18:45 +03:00
# endif /* HAVE_ARCH_OLD_MMAP */
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
/* Params are passed directly, offset is in bytes */
2015-04-07 04:36:50 +03:00
SYS_FUNC ( mmap )
1999-12-23 17:20:14 +03:00
{
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
/* Example of kernel-side handling of this variety of mmap:
* arch / x86 / kernel / sys_x86_64 . c : : SYSCALL_DEFINE6 ( mmap , . . . ) calls
* sys_mmap_pgoff ( . . . , off > > PAGE_SHIFT ) ; i . e . off is in bytes ,
* since the above code converts off to pages .
*/
2016-12-26 05:59:36 +03:00
print_mmap ( tcp , tcp - > u_arg , tcp - > u_arg [ 5 ] ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
return RVAL_DECODED | RVAL_HEX ;
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
}
/* Params are passed directly, offset is in pages */
2015-04-07 04:36:50 +03:00
SYS_FUNC ( mmap_pgoff )
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
{
/* Try test/mmap_offset_decode.c */
unsigned long long offset ;
2016-12-19 15:05:31 +03:00
offset = tcp - > u_arg [ 5 ] ;
2013-03-05 18:58:24 +04:00
offset * = get_pagesize ( ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
print_mmap ( tcp , tcp - > u_arg , offset ) ;
return RVAL_DECODED | RVAL_HEX ;
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
}
/* Params are passed directly, offset is in 4k units */
2015-04-07 04:36:50 +03:00
SYS_FUNC ( mmap_4koff )
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
{
unsigned long long offset ;
2016-12-19 15:05:31 +03:00
offset = tcp - > u_arg [ 5 ] ;
Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!
It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.
Then we just insert correct function pointers into
arch syscall tables.
It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.
A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.
There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.
* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 14:28:20 +04:00
offset < < = 12 ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
print_mmap ( tcp , tcp - > u_arg , offset ) ;
return RVAL_DECODED | RVAL_HEX ;
1999-12-23 17:20:14 +03:00
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( munmap )
1999-02-19 03:21:36 +03:00
{
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
printaddr ( tcp - > u_arg [ 0 ] ) ;
2016-12-26 13:16:35 +03:00
tprintf ( " , % " PRI_klu , tcp - > u_arg [ 1 ] ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
return RVAL_DECODED ;
1999-02-19 03:21:36 +03:00
}
2016-11-12 20:54:56 +03:00
static int
do_mprotect ( struct tcb * tcp , bool has_pkey )
1999-02-19 03:21:36 +03:00
{
2016-12-26 05:28:04 +03:00
printaddr ( tcp - > u_arg [ 0 ] ) ;
tprintf ( " , % " PRI_klu " , " , tcp - > u_arg [ 1 ] ) ;
printflags64 ( mmap_prot , tcp - > u_arg [ 2 ] , " PROT_??? " ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
2016-11-12 20:54:56 +03:00
if ( has_pkey )
tprintf ( " , %d " , ( int ) tcp - > u_arg [ 3 ] ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
return RVAL_DECODED ;
1999-02-19 03:21:36 +03:00
}
2016-11-12 20:54:56 +03:00
SYS_FUNC ( mprotect )
{
return do_mprotect ( tcp , false ) ;
}
SYS_FUNC ( pkey_mprotect )
{
return do_mprotect ( tcp , true ) ;
}
2014-04-26 03:30:54 +04:00
# include "xlat/mremap_flags.h"
1999-05-09 04:29:58 +04:00
2015-04-07 04:36:50 +03:00
SYS_FUNC ( mremap )
1999-05-09 04:29:58 +04:00
{
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
printaddr ( tcp - > u_arg [ 0 ] ) ;
2016-12-26 13:16:35 +03:00
tprintf ( " , % " PRI_klu " , % " PRI_klu " , " , tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ) ;
2016-12-25 01:39:06 +03:00
printflags64 ( mremap_flags , tcp - > u_arg [ 3 ] , " MREMAP_??? " ) ;
2009-12-25 02:34:58 +03:00
# ifdef MREMAP_FIXED
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
if ( ( tcp - > u_arg [ 3 ] & ( MREMAP_MAYMOVE | MREMAP_FIXED ) ) = =
( MREMAP_MAYMOVE | MREMAP_FIXED ) ) {
tprints ( " , " ) ;
printaddr ( tcp - > u_arg [ 4 ] ) ;
1999-05-09 04:29:58 +04:00
}
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
# endif
return RVAL_DECODED | RVAL_HEX ;
1999-05-09 04:29:58 +04:00
}
2014-04-26 03:30:54 +04:00
# include "xlat/madvise_cmds.h"
2000-04-11 02:22:31 +04:00
2015-04-07 04:36:50 +03:00
SYS_FUNC ( madvise )
2000-04-11 02:22:31 +04:00
{
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
printaddr ( tcp - > u_arg [ 0 ] ) ;
2016-12-26 13:16:35 +03:00
tprintf ( " , % " PRI_klu " , " , tcp - > u_arg [ 1 ] ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
printxval ( madvise_cmds , tcp - > u_arg [ 2 ] , " MADV_??? " ) ;
return RVAL_DECODED ;
2000-04-11 02:22:31 +04:00
}
2014-04-26 03:30:54 +04:00
# include "xlat/mlockall_flags.h"
2000-04-11 02:22:31 +04:00
2015-04-07 04:36:50 +03:00
SYS_FUNC ( mlockall )
2000-04-11 02:22:31 +04:00
{
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
printflags ( mlockall_flags , tcp - > u_arg [ 0 ] , " MCL_??? " ) ;
return RVAL_DECODED ;
2000-04-11 02:22:31 +04:00
}
2014-04-26 03:30:54 +04:00
# include "xlat/mctl_sync.h"
1999-02-19 03:21:36 +03:00
2015-04-07 04:36:50 +03:00
SYS_FUNC ( msync )
1999-02-19 03:21:36 +03:00
{
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
/* addr */
printaddr ( tcp - > u_arg [ 0 ] ) ;
/* len */
2016-12-26 13:16:35 +03:00
tprintf ( " , % " PRI_klu " , " , tcp - > u_arg [ 1 ] ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
/* flags */
printflags ( mctl_sync , tcp - > u_arg [ 2 ] , " MS_??? " ) ;
return RVAL_DECODED ;
1999-02-19 03:21:36 +03:00
}
2015-11-15 05:35:57 +03:00
# include "xlat/mlock_flags.h"
SYS_FUNC ( mlock2 )
{
printaddr ( tcp - > u_arg [ 0 ] ) ;
2016-12-26 13:16:35 +03:00
tprintf ( " , % " PRI_klu " , " , tcp - > u_arg [ 1 ] ) ;
2015-11-15 05:35:57 +03:00
printflags ( mlock_flags , tcp - > u_arg [ 2 ] , " MLOCK_??? " ) ;
return RVAL_DECODED ;
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( mincore )
1999-02-19 03:21:36 +03:00
{
if ( entering ( tcp ) ) {
mem.c: use printaddr and umove_or_printaddr
* mem.c (sys_brk, print_mmap, sys_munmap, sys_mprotect, sys_mremap,
sys_madvise, sys_msync, sys_mincore, sys_remap_file_pages, get_nodes,
sys_mbind, [POWERPC] sys_subpage_prot): Use printaddr.
(sys_get_mempolicy): Use printaddr and umove_or_printaddr.
2015-07-20 02:25:56 +03:00
printaddr ( tcp - > u_arg [ 0 ] ) ;
2016-12-26 13:16:35 +03:00
tprintf ( " , % " PRI_klu " , " , tcp - > u_arg [ 1 ] ) ;
1999-02-19 03:21:36 +03:00
} else {
2016-01-29 04:51:54 +03:00
const unsigned long page_size = get_pagesize ( ) ;
const unsigned long page_mask = page_size - 1 ;
unsigned long len = tcp - > u_arg [ 1 ] ;
unsigned char * vec = NULL ;
2011-08-31 16:00:02 +04:00
2016-01-29 04:51:54 +03:00
len = len / page_size + ( len & page_mask ? 1 : 0 ) ;
mem.c: use printaddr and umove_or_printaddr
* mem.c (sys_brk, print_mmap, sys_munmap, sys_mprotect, sys_mremap,
sys_madvise, sys_msync, sys_mincore, sys_remap_file_pages, get_nodes,
sys_mbind, [POWERPC] sys_subpage_prot): Use printaddr.
(sys_get_mempolicy): Use printaddr and umove_or_printaddr.
2015-07-20 02:25:56 +03:00
if ( syserror ( tcp ) | | ! verbose ( tcp ) | |
! tcp - > u_arg [ 2 ] | | ! ( vec = malloc ( len ) ) | |
umoven ( tcp , tcp - > u_arg [ 2 ] , len , vec ) < 0 )
printaddr ( tcp - > u_arg [ 2 ] ) ;
1999-02-19 03:21:36 +03:00
else {
2016-01-29 04:51:54 +03:00
unsigned long i ;
2011-09-01 12:00:28 +04:00
tprints ( " [ " ) ;
1999-02-19 03:21:36 +03:00
for ( i = 0 ; i < len ; i + + ) {
2016-11-28 04:28:53 +03:00
if ( i )
tprints ( " , " ) ;
1999-02-19 03:21:36 +03:00
if ( abbrev ( tcp ) & & i > = max_strlen ) {
2011-09-01 12:00:28 +04:00
tprints ( " ... " ) ;
1999-02-19 03:21:36 +03:00
break ;
}
2011-09-01 12:00:28 +04:00
tprints ( ( vec [ i ] & 1 ) ? " 1 " : " 0 " ) ;
1999-02-19 03:21:36 +03:00
}
2011-09-01 12:00:28 +04:00
tprints ( " ] " ) ;
1999-02-19 03:21:36 +03:00
}
2011-08-31 16:00:02 +04:00
free ( vec ) ;
1999-02-19 03:21:36 +03:00
}
return 0 ;
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( remap_file_pages )
2003-03-05 07:08:00 +03:00
{
2016-12-26 13:26:03 +03:00
const kernel_ulong_t addr = tcp - > u_arg [ 0 ] ;
const kernel_ulong_t size = tcp - > u_arg [ 1 ] ;
const kernel_ulong_t prot = tcp - > u_arg [ 2 ] ;
const kernel_ulong_t pgoff = tcp - > u_arg [ 3 ] ;
const kernel_ulong_t flags = tcp - > u_arg [ 4 ] ;
2016-04-01 18:31:23 +03:00
printaddr ( addr ) ;
2016-12-26 13:16:35 +03:00
tprintf ( " , % " PRI_klu " , " , size ) ;
2016-12-25 01:39:06 +03:00
printflags64 ( mmap_prot , prot , " PROT_??? " ) ;
2016-12-26 13:16:35 +03:00
tprintf ( " , % " PRI_klu " , " , pgoff ) ;
2017-11-17 20:47:53 +03:00
print_mmap_flags ( flags ) ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
return RVAL_DECODED ;
2003-03-05 07:08:00 +03:00
}
2004-10-07 22:53:12 +04:00
2012-02-25 05:38:52 +04:00
# if defined(POWERPC)
2016-05-08 02:00:52 +03:00
static bool
print_protmap_entry ( struct tcb * tcp , void * elem_buf , size_t elem_size , void * data )
{
2017-06-18 01:23:09 +03:00
tprintf ( " %#08x " , * ( unsigned int * ) elem_buf ) ;
2016-05-08 02:00:52 +03:00
return true ;
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( subpage_prot )
2008-08-25 07:09:16 +04:00
{
2016-12-26 13:26:03 +03:00
kernel_ulong_t addr = tcp - > u_arg [ 0 ] ;
kernel_ulong_t len = tcp - > u_arg [ 1 ] ;
kernel_ulong_t nmemb = len > > 16 ;
kernel_ulong_t map = tcp - > u_arg [ 2 ] ;
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
2016-05-08 02:00:52 +03:00
printaddr ( addr ) ;
2016-12-26 13:16:35 +03:00
tprintf ( " , % " PRI_klu " , " , len ) ;
2016-05-08 02:00:52 +03:00
unsigned int entry ;
print_array ( tcp , map , nmemb , & entry , sizeof ( entry ) ,
print_array: enhance printing of unfetchable object addresses
When umoven_func invocation fails to fetch data, it prints the faulty
address. If this happens to a subsequent umoven_func invocation,
the printed address may be undistinguishable from a valid data printed
by print_func, e.g. when the data is printed in a numeric form like
[0x1, 0x2, 0x3, 0xdefaced].
Fix this source of confusion by moving the printing of the faulty
address from umoven_func to print_array itself. This change renames
umoven_func to tfetch_mem_func and changes its semantics, so that
- tfetch_mem_func never prints anything;
- tfetch_mem_func returns true if the fetch succeeded,
and false otherwise.
* defs.h (print_array): Replace umoven_func argument with
tfetch_mem_func.
* util.c (print_array): Replace umoven_func argument with
tfetch_mem_func, document expected tfetch_mem_func return value
semantics. When tfetch_mem_func returns false, print either addr
or "... /* addr */" depending on the context (inside the array or not).
* bpf.c (print_ebpf_prog, print_bpf_prog_info,
BEGIN_BPF_CMD_DECODER(BPF_PROG_QUERY)): Replace umoven_or_printaddr
argument of print_array with tfetch_mem.
* bpf_filter.c (print_bpf_fprog): Likewise.
* btrfs.c (btrfs_print_logical_ino_container,
btrfs_print_ino_path_container, btrfs_print_qgroup_inherit,
btrfs_ioctl): Likewise.
* dm.c (dm_decode_dm_target_deps): Likewise.
* epoll.c (epoll_wait_common): Likewise.
* file_ioctl.c (file_ioctl): Likewise.
* ipc_sem.c (tprint_sembuf_array): Likewise.
* kexec.c (print_kexec_segments): Likewise.
* mem.c (SYS_FUNC(subpage_prot)): Likewise.
* net.c (print_getsockopt): Likewise.
* netlink.c (decode_nlmsgerr_attr_cookie): Likewise.
* netlink_netlink_diag.c (decode_netlink_diag_groups): Likewise.
* netlink_packet_diag.c (decode_packet_diag_mclist): Likewise.
* netlink_unix_diag.c (decode_unix_diag_inode): Likewise.
* nlattr.c (decode_nla_meminfo): Likewise.
* numa.c (print_nodemask, SYS_FUNC(move_pages),
* perf_ioctl.c (perf_ioctl_query_bpf): Likewise.
* poll.c (decode_poll_entering): Likewise.
* printsiginfo.c (print_siginfo_array): Likewise.
* rtnl_tc.c (decode_tca_stab_data): Likewise.
* sock.c (decode_ifconf): Likewise.
* uid.c (print_groups): Likewise.
* io.c (SYS_FUNC(io_submit), SYS_FUNC(io_getevents)): Replace
umoven_or_printaddr argument of print_array with tfetch_mem.
(tprint_iov_upto): Replace umoven_or_printaddr_ignore_syserror
with tfetch_mem_ignore_syserror.
* v4l2.c (print_v4l2_format_fmt): Replace umoven_or_printaddr argument
of print_array with tfetch_mem.
(print_v4l2_ext_controls): Replace umoven_or_printaddr_ignore_syserror
with tfetch_mem_ignore_syserror.
* mmsghdr.c (fetch_struct_mmsghdr_or_printaddr): Rename
to fetch_struct_mmsghdr_for_print, do not print address, return bool.
(decode_mmsgvec): Replace fetch_struct_mmsghdr_or_printaddr
with fetch_struct_mmsghdr_for_print.
* tests/aio.c (main): Update expected output.
* tests/bpf.c (print_BPF_PROG_QUERY_attr5): Likewise.
* tests/ioctl_perf-success.c (main): Likewise.
* tests/ioctl_v4l2.c (main): Update expected output.
* tests/kexec_load.c (main): Likewise.
* tests/mmsg_name.c (test_mmsg_name): Update expected output.
* tests/move_pages.c (print_page_array, print_node_array): Likewise.
* tests/poll.c (print_pollfd_array_entering): Likewise.
* tests/preadv-pwritev.c (main): Likewise.
* tests/preadv2-pwritev2.c (dumpio): Likewise.
* tests/process_vm_readv_writev.c (print_iov): Likewise.
* tests/pwritev.c (print_iovec): Likewise.
* tests/readv.c (main): Likewise.
* tests/seccomp-filter-v.c
* tests/semop.c (main): Likewise.
* tests/set_mempolicy.c (print_nodes): Likewise.
* tests/setgroups.c (main): Likewise.
* tests/test_nlattr.h (print_nlattr) Likewise.
Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-05-29 04:15:19 +03:00
tfetch_mem , print_protmap_entry , 0 ) ;
2008-08-25 07:09:16 +04:00
mem.c: make use of RVAL_DECODED
* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers. Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.
2015-07-20 02:37:40 +03:00
return RVAL_DECODED ;
2008-08-25 07:09:16 +04:00
}
# endif