svn commit: r358253 - in stable: 11/usr.bin/kdump 12/usr.bin/kdump
Kyle Evans
kevans at FreeBSD.org
Sat Feb 22 21:44:01 UTC 2020
Author: kevans
Date: Sat Feb 22 21:44:00 2020
New Revision: 358253
URL: https://svnweb.freebsd.org/changeset/base/358253
Log:
MFC r358109: kdump: decode SHM_ANON as first arg to legacy shm_open(2)
The first argument to shm_open(2) as well as shm_open2(2) may be a path or
SHM_ANON. Decode SHM_ANON, at least- paths will show up as namei results in
kdump output, which may be sufficient; in those cases, we'll have printed an
address.
Modified:
stable/12/usr.bin/kdump/kdump.c
Directory Properties:
stable/12/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/11/usr.bin/kdump/kdump.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/12/usr.bin/kdump/kdump.c
==============================================================================
--- stable/12/usr.bin/kdump/kdump.c Sat Feb 22 20:50:30 2020 (r358252)
+++ stable/12/usr.bin/kdump/kdump.c Sat Feb 22 21:44:00 2020 (r358253)
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
#include <sys/uio.h>
#include <sys/event.h>
#include <sys/ktrace.h>
+#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/stat.h>
@@ -1247,7 +1248,12 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags)
narg--;
break;
case SYS_shm_open:
- print_number(ip, narg, c);
+ if (ip[0] == (uintptr_t)SHM_ANON) {
+ printf("(SHM_ANON");
+ ip++;
+ } else {
+ print_number(ip, narg, c);
+ }
putchar(',');
print_mask_arg(sysdecode_open_flags, ip[0]);
putchar(',');
More information about the svn-src-stable-12
mailing list