Date: Thu, 2 Dec 2010 15:29:47 GMT From: Anton Yuzhaninov <citrin@citrin.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/152781: [patch] decode semget(2) flags in kdump(1) Message-ID: <201012021529.oB2FTlx9065857@monitoring.int.vega.ru> Resent-Message-ID: <201012021530.oB2FUFPM034960@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 152781 >Category: kern >Synopsis: [patch] decode semget(2) flags in kdump(1) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 02 15:30:14 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Anton Yuzhaninov >Release: FreeBSD 9.0-CURRENT i386 >Organization: Openstat.ru >Environment: System: FreeBSD citrin.office.vega.ru 9.0-CURRENT FreeBSD 9.0-CURRENT #2 r215543M: Mon Nov 22 19:38:30 MSK 2010 root@citrin.office.vega.ru:/usr/obj/usr/src/sys/NK i386 >Description: kdump(1) decode falgs in syscalls aguments, but decode not all semget(2) flags. >How-To-Repeat: 1. Run code semget(IPC_PRIVATE, 3, IPC_CREAT | IPC_EXCL | SEM_R | SEM_A); semget(IPC_PRIVATE, 3, SEM_R | SEM_A); under ktrace(1) 2. > kdump -n | fgrep semget 87823 a.out CALL semget(0,0x3,0x780) 87823 a.out RET semget 0x60000 87823 a.out CALL semget(0,0x3,0x180) 87823 a.out RET semget 0x30001 kdump -n show 2 semget(2) syscall with differend flags, all right. > kdump | fgrep semget 87823 a.out CALL semget(0,0x3,SEM_R|SEM_A) 87823 a.out RET semget 393216/0x60000 87823 a.out CALL semget(0,0x3,SEM_R|SEM_A) 87823 a.out RET semget 196609/0x30001 Whitout -n same flags shown - it is a bug. Whith attached path correct flags shown: > kdump | fgrep semget 87823 a.out CALL semget(0,0x3,IPC_CREAT|IPC_EXCL|SEM_R|SEM_A) 87823 a.out RET semget 393216/0x60000 87823 a.out CALL semget(0,0x3,SEM_R|SEM_A) 87823 a.out RET semget 196609/0x30001 >Fix: --- mksubr.patch begins here --- Index: usr.bin/kdump/mksubr =================================================================== --- usr.bin/kdump/mksubr (revision 216121) +++ usr.bin/kdump/mksubr (working copy) @@ -254,6 +254,8 @@ void semgetname (int flag) { int or = 0; + if_print_or(flag, IPC_CREAT, or); + if_print_or(flag, IPC_EXCL, or); if_print_or(flag, SEM_R, or); if_print_or(flag, SEM_A, or); if_print_or(flag, (SEM_R>>3), or); --- mksubr.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012021529.oB2FTlx9065857>