Subject: kauth machdep actions (Re: CVS commit: src)
To: None <elad@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 12/22/2006 20:42:53
> Module Name: src
> Committed By: elad
> Date: Fri Dec 22 11:13:22 UTC 2006
>
> Modified Files:
> src/share/examples/secmodel: secmodel_example.c
> src/share/man/man9: kauth.9
> src/sys/arch/arm/arm32: mem.c
> src/sys/arch/pc532/pc532: mem.c
> src/sys/arch/powerpc/powerpc: mem.c
> src/sys/arch/sh3/sh3: mem.c
> src/sys/arch/sh5/sh5: mem.c
> src/sys/arch/vax/vax: mem.c
> src/sys/secmodel/bsd44: secmodel_bsd44_suser.c
> src/sys/sys: kauth.h
>
> Log Message:
> Add requests indicating access to unmanaged memory for arm, pc532, powerpc,
> sh3, sh5, and vax, and use them instead of KAUTH_GENERIC_ISSUSER.
>
> Update documentation and example secmodel code.
>
>
> To generate a diff of this commit:
> cvs rdiff -r1.8 -r1.9 src/share/examples/secmodel/secmodel_example.c
> cvs rdiff -r1.39 -r1.40 src/share/man/man9/kauth.9
> cvs rdiff -r1.15 -r1.16 src/sys/arch/arm/arm32/mem.c
> cvs rdiff -r1.41 -r1.42 src/sys/arch/pc532/pc532/mem.c
> cvs rdiff -r1.25 -r1.26 src/sys/arch/powerpc/powerpc/mem.c
> cvs rdiff -r1.21 -r1.22 src/sys/arch/sh3/sh3/mem.c
> cvs rdiff -r1.12 -r1.13 src/sys/arch/sh5/sh5/mem.c
> cvs rdiff -r1.32 -r1.33 src/sys/arch/vax/vax/mem.c
> cvs rdiff -r1.19 -r1.20 src/sys/secmodel/bsd44/secmodel_bsd44_suser.c
> cvs rdiff -r1.27 -r1.28 src/sys/sys/kauth.h
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
isn't it better to make KAUTH_REQ_MACHDEP_xxx actions?
ie. define __HAVE_KAUTH_MACHDEP_xxx in MD headers, say, machine/kauth.h,
so that listeners can do something like the following.
switch (action) {
case KAUTH_MACHDEP_UNMANAGEDMEM
#if defined(__HAVE_KAUTH_MACHDEP_UNMANAGEDMEM)
:
:
break;
#else
panic();
#endif
case KAUTH_MACHDEP_IOPL
#if defined(__HAVE_KAUTH_MACHDEP_IOPL)
:
:
break;
#else
panic();
#endif
}
YAMAMOTO Takashi