From owner-svn-src-head@freebsd.org Thu Mar 26 16:56:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A26D2A4515; Thu, 26 Mar 2020 16:56:11 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48pB2f4zjCz4vRm; Thu, 26 Mar 2020 16:56:09 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi1-f176.google.com with SMTP id d63so6098996oig.6; Thu, 26 Mar 2020 09:56:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=z+rpma/b4s3PmuUNGA02mRtAKFWIy+Jcwtbn3pxXR44=; b=gE+zQhlm3x9D1s2ZzPjP+nPPEidF8Z33NfTS8ez0wOy662tTboxilvXESezBCiVqD3 DYlLK7q2vFng+RgimP/0jbyMY5vuV4133AqX0NEkcS0w1+WHx5avCJbvtRQW8CFnMUeL MsHEhChZ3gYnegZNDn6Wt5YkjDVd3XHIAPpd8WY74BPypIcTrGZXc8/cc5uFXYPax2Mg cP/txraFVEdmEKxznaWEFt3QjMveoKiZK8EM2jfgTmcIgH7UXohXUHGBu9WOpyHYT264 73VwiTERGIeqfzOvjV7LpHaWdOyt1lIdGaeQdqLhrhXiF8v+08RLcclArBoE/DJB8VK2 /yXQ== X-Gm-Message-State: ANhLgQ01quPqqrAwNpz6G7GLdVCSX32QH2RKGIZ8LWnC3qqL+eVIQJsL ooPOchHER1MkSF+JTwSDogEGEMnu X-Google-Smtp-Source: ADFU+vsxRXTOcT0TXekbYW0WhE2oWs8XZBnsNnh/aHNFHWqlRD7exL+TGXroTIygxSSxvr2HNPl9WQ== X-Received: by 2002:aca:cdd1:: with SMTP id d200mr722554oig.153.1585241348647; Thu, 26 Mar 2020 09:49:08 -0700 (PDT) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com. [209.85.167.179]) by smtp.gmail.com with ESMTPSA id y132sm731972oiy.8.2020.03.26.09.49.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Mar 2020 09:49:08 -0700 (PDT) Received: by mail-oi1-f179.google.com with SMTP id m14so6124615oic.0; Thu, 26 Mar 2020 09:49:08 -0700 (PDT) X-Received: by 2002:aca:f084:: with SMTP id o126mr792208oih.81.1585241347953; Thu, 26 Mar 2020 09:49:07 -0700 (PDT) MIME-Version: 1.0 References: <202003261502.02QF2b1U024072@repo.freebsd.org> In-Reply-To: <202003261502.02QF2b1U024072@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Thu, 26 Mar 2020 09:48:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r359330 - in head/sys: kern sys To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 48pB2f4zjCz4vRm X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 16:56:11 -0000 Thanks! On Thu, Mar 26, 2020 at 08:03 Mark Johnston 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 > >