svn commit: r359330 - in head/sys: kern sys
Conrad Meyer
cem at freebsd.org
Thu Mar 26 16:56:11 UTC 2020
Thanks!
On Thu, Mar 26, 2020 at 08:03 Mark Johnston <markj at freebsd.org> wrote:
> Author: markj
> Date: Thu Mar 26 15:02:37 2020
> New Revision: 359330
> URL: https://svnweb.freebsd.org/changeset/base/359330
>
> Log:
> Remove unused SYSINIT macros for capability rights.
>
> Static rights are initialized in cap_rights_sysinit().
>
> MFC after: 1 week
>
> Modified:
> head/sys/kern/subr_capability.c
> head/sys/sys/capsicum.h
>
> Modified: head/sys/kern/subr_capability.c
>
> ==============================================================================
> --- head/sys/kern/subr_capability.c Thu Mar 26 12:17:49 2020
> (r359329)
> +++ head/sys/kern/subr_capability.c Thu Mar 26 15:02:37 2020
> (r359330)
> @@ -101,7 +101,7 @@ __read_mostly cap_rights_t cap_write_rights;
> __read_mostly cap_rights_t cap_no_rights;
>
> static void
> -__cap_rights_sysinit1(void *arg)
> +cap_rights_sysinit(void *arg)
> {
> cap_rights_init_one(&cap_accept_rights, CAP_ACCEPT);
> cap_rights_init_one(&cap_bind_rights, CAP_BIND);
> @@ -149,8 +149,8 @@ __cap_rights_sysinit1(void *arg)
> cap_rights_init_one(&cap_write_rights, CAP_WRITE);
> cap_rights_init(&cap_no_rights);
> }
> -SYSINIT(cap_rights1_sysinit, SI_SUB_COPYRIGHT, SI_ORDER_ANY, \
> - __cap_rights_sysinit1, NULL);
> +SYSINIT(cap_rights_sysinit, SI_SUB_COPYRIGHT, SI_ORDER_ANY,
> cap_rights_sysinit,
> + NULL);
>
> #endif
>
> @@ -246,16 +246,6 @@ cap_rights_is_vset(const cap_rights_t *rights, va_list
> }
>
> return (true);
> -}
> -
> -void
> -__cap_rights_sysinit(void *arg)
> -{
> - struct cap_rights_init_args *cria = arg;
> - cap_rights_t *rights = cria->cria_rights;
> -
> - __cap_rights_init(CAP_RIGHTS_VERSION, rights, cria->cria_value1,
> - cria->cria_value2, cria->cria_value3, cria->cria_value4, 0ULL);
> }
>
> cap_rights_t *
>
> Modified: head/sys/sys/capsicum.h
>
> ==============================================================================
> --- head/sys/sys/capsicum.h Thu Mar 26 12:17:49 2020 (r359329)
> +++ head/sys/sys/capsicum.h Thu Mar 26 15:02:37 2020 (r359330)
> @@ -342,7 +342,6 @@ bool __cap_rights_is_set(const cap_rights_t *rights, .
> bool cap_rights_is_valid(const cap_rights_t *rights);
> cap_rights_t *cap_rights_merge(cap_rights_t *dst, const cap_rights_t
> *src);
> cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t
> *src);
> -void __cap_rights_sysinit(void *arg);
>
> #ifdef _KERNEL
> /*
> @@ -416,63 +415,6 @@ bool cap_rights_contains(const cap_rights_t *big, cons
> #endif
>
> __END_DECLS
> -struct cap_rights_init_args {
> - cap_rights_t *cria_rights;
> - uint64_t cria_value1;
> - uint64_t cria_value2;
> - uint64_t cria_value3;
> - uint64_t cria_value4;
> - uint64_t cria_value5;
> -};
> -
> -#define CAP_RIGHTS_SYSINIT0(name, rights) \
> - static struct cap_rights_init_args name##_args = { \
> - &(rights)
> \
> - };
> \
> - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT+1,
> SI_ORDER_ANY, \
> - __cap_rights_sysinit, &name##_args);
> -
> -#define CAP_RIGHTS_SYSINIT1(name, rights, value1) \
> - static struct cap_rights_init_args name##_args = { \
> - &(rights),
> \
> - (value1)
> \
> - };
> \
> - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT+1,
> SI_ORDER_ANY, \
> - __cap_rights_sysinit, &name##_args);
> -
> -#define CAP_RIGHTS_SYSINIT2(name, rights, value1, value2)
> \
> - static struct cap_rights_init_args name##_args = { \
> - &(rights),
> \
> - (value1),
> \
> - (value2)
> \
> - };
> \
> - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT,
> SI_ORDER_ANY, \
> - __cap_rights_sysinit, &name##_args);
> -
> -#define CAP_RIGHTS_SYSINIT3(name, rights, value1, value2, value3) \
> - static struct cap_rights_init_args name##_args = { \
> - &(rights),
> \
> - (value1),
> \
> - (value2),
> \
> - (value3)
> \
> - };
> \
> - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT,
> SI_ORDER_ANY, \
> - __cap_rights_sysinit, &name##_args);
> -
> -#define CAP_RIGHTS_SYSINIT4(name, rights, value1, value2, value3,
> value4) \
> - static struct cap_rights_init_args name##_args = { \
> - &(rights),
> \
> - (value1),
> \
> - (value2),
> \
> - (value3),
> \
> - (value4)
> \
> - };
> \
> - SYSINIT(name##_cap_rights_sysinit, SI_SUB_COPYRIGHT,
> SI_ORDER_ANY, \
> - __cap_rights_sysinit, &name##_args);
> -
> -#define CAP_RIGHTS_DEFINE1(name, value)
> \
> - __read_mostly cap_rights_t name;
> \
> - CAP_RIGHTS_SYSINIT1(name, name, value);
>
> #ifdef _KERNEL
>
>
More information about the svn-src-head
mailing list