misc/149295: kdump doesn't honor several options for acl and shutdown family of syscalls

Mikhail hidden.node at gmail.com
Wed Aug 4 19:30:11 UTC 2010


>Number:         149295
>Category:       misc
>Synopsis:       kdump doesn't honor several options for acl and shutdown family of syscalls
>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:   Wed Aug 04 19:30:10 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Mikhail
>Release:        8.1
>Organization:
>Environment:
FreeBSD lenta.bac.lab 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     root at almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
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

>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)
>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:

--- mksubr.orig 2008-03-12 14:51:01.000000000 +0300
+++ mksubr      2010-08-04 23:06:39.000000000 +0400
@@ -322,7 +322,7 @@

 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"
@@ -331,7 +331,7 @@
 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"

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list