Bug 149295 - [patch] kdump(1) doesn't honor several options for acl and shutdown family of syscalls
Summary: [patch] kdump(1) doesn't honor several options for acl and shutdown family of...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alexander Leidinger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-04 20:30 UTC by Mikhail
Modified: 2010-10-06 13:50 UTC (History)
0 users

See Also:


Attachments
file.diff (1.35 KB, patch)
2010-08-04 20:30 UTC, Mikhail
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail 2010-08-04 20:30:10 UTC
Particularly for this one:

#define ACL_TYPE_ACCESS_OLD     0x00000000
#define ACL_TYPE_DEFAULT_OLD    0x00000001
#define ACL_TYPE_NFS4           0x00000004

and


#define SHUT_RD         0
#define SHUT_WR         1
#define SHUT_RDWR       2

Fix: Edit /usr/src/usr.bin/kdump/mksubr and fix regexps for acl and shutdown syscalls.
Patch against HEAD attached.

Patch attached with submission follows:
How-To-Repeat: lenta:~> cat test.c
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/acl.h>

int
main(void)
{

        shutdown(5, SHUT_RDWR);
        acl_get_fd_np(1, ACL_TYPE_NFS4);

        return (0);
}
lenta:~> gcc test.c -o test && ktrace ./test && kdump | grep -E '(acl|shutdown)' | grep invalid
 12097 test     CALL  shutdown(0x5,<invalid=2>)
 12097 test     CALL  __acl_get_fd(0x1,<invalid=4>,0x28202000)
Comment 1 Alexander Leidinger freebsd_committer freebsd_triage 2010-10-06 13:40:11 UTC
Responsible Changed
From-To: freebsd-bugs->netchild

Take the PR.
Comment 2 dfilter service freebsd_committer freebsd_triage 2010-10-06 13:41:47 UTC
Author: netchild
Date: Wed Oct  6 12:41:42 2010
New Revision: 213479
URL: http://svn.freebsd.org/changeset/base/213479

Log:
  Fix regex for some socket- and acl-related syscall values.
  
  Submitted by:	Mikhail <hidden.node@gmail.com>
  PR:		149295
  MFC-after:	2 weeks

Modified:
  head/usr.bin/kdump/mksubr

Modified: head/usr.bin/kdump/mksubr
==============================================================================
--- head/usr.bin/kdump/mksubr	Wed Oct  6 10:00:37 2010	(r213478)
+++ head/usr.bin/kdump/mksubr	Wed Oct  6 12:41:42 2010	(r213479)
@@ -324,7 +324,7 @@ auto_or_type "nfssvcname" "NFSSVC_[A-Z]+
 
 auto_switch_type "whencename" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h"
 auto_switch_type "rlimitname" "RLIMIT_[A-Z]+[[:space:]]+[0-9]+" "sys/resource.h"
-auto_switch_type "shutdownhowname" "SHUT_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h"
+auto_switch_type "shutdownhowname" "SHUT_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h"
 auto_switch_type "prioname" "PRIO_[A-Z]+[[:space:]]+[0-9]" "sys/resource.h"
 auto_switch_type "madvisebehavname" "_?MADV_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h"
 auto_switch_type "msyncflagsname" "MS_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h"
@@ -333,7 +333,7 @@ auto_switch_type "kldunloadfflagsname" "
 auto_switch_type "extattrctlname" "EXTATTR_NAMESPACE_[A-Z]+[[:space:]]+0x[0-9]+" "sys/extattr.h"
 auto_switch_type "kldsymcmdname" "KLDSYM_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h"
 auto_switch_type "sendfileflagsname" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h"
-auto_switch_type "acltypename" "ACL_TYPE_[A-Z]+[[:space:]]+0x[0-9]+" "sys/acl.h"
+auto_switch_type "acltypename" "ACL_TYPE_[A-Z4_]+[[:space:]]+0x[0-9]+" "sys/acl.h"
 auto_switch_type "sigprocmaskhowname" "SIG_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h"
 auto_switch_type "lio_listioname" "LIO_(NO)?WAIT[[:space:]]+[0-9]+" "aio.h"
 auto_switch_type "minheritname" "INHERIT_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h"
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 3 Alexander Leidinger freebsd_committer freebsd_triage 2010-10-06 13:42:20 UTC
State Changed
From-To: open->closed

Patch committed. Thanks!