Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2322621rwi; Tue, 1 Nov 2022 06:32:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6D9MadwBQp651a4DXCO4mVKAKWeDVDzb+jF6DVy8I4lFw/nT0jcl6VdHR7hc7qqYqXtPhg X-Received: by 2002:a05:6402:428a:b0:42e:8f7e:1638 with SMTP id g10-20020a056402428a00b0042e8f7e1638mr19028126edc.228.1667309527195; Tue, 01 Nov 2022 06:32:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667309527; cv=none; d=google.com; s=arc-20160816; b=PlVE1ml5ZokClk928aObn4BDzCWT+gpovrfXGeBvHPb1FJDWdHZtVtSa0RtO5x9MIm gv4/iDscUeHBM5V8u+bF8P/MbmWeai1QBnCaH0ISoU++tNwneQrtxpJNg2myAhOcU2pJ 6uCgEw8DuMnZ3SeCEK0pmhI7E+HwiIK4wG3MXTM8YsY8AiEmqjH5o6pG3vJFi4bvM8CS FGFi7Hy0phETTEu5wUN2fQ2hIbgsMvWYrjRRu39gvGj1Ht3T/XEefYIclAbaoeP4P7Tu eb+7mZ6wHn/Kqsh9pDEIwI6y9kfmSu83cya9pQceWrhKuG/op0lTIP3fWAXn8WQLiPhJ uKAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=yMqVNQ37QE/swhD8lx9zl7UI7paDGjPB00joSztAPmc=; b=VvFRIPtoXWyPfxcwWDcoxiD5DPXiBBbpnU55TA3nYuWEJYf20ZHn0/2EEQq2D1H7wL Gl4a/RO7yNFnE3+M/qUQLfi++kSjMaRy7ZtnF0wV3nrSdsDiq3ooeqfjk4Aev7RXSCMY PwiuknjhNgkPGuU2R83yMw0ZCu1V4efvi80hSmI4LoBACGePfH/2hkXlH6dF377s0XSk aMkY/ad0D7Bdme1Ygi+oIYjaz7vNGUWMv379AWfIQen98zXynQnf/7Ypkw/IatHLEk2z FXPcDq/wNpNm2uPYIJdhStG7cJoa90XaLfUKJsdmj+ZIeHu2+dRefSOLLkj7YSzcvpfw lpBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=NRxBwuer; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs15-20020a1709072d0f00b0078e1246e7d6si12961918ejc.748.2022.11.01.06.31.41; Tue, 01 Nov 2022 06:32:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=NRxBwuer; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbiKAMgC (ORCPT + 97 others); Tue, 1 Nov 2022 08:36:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbiKAMf6 (ORCPT ); Tue, 1 Nov 2022 08:35:58 -0400 Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 866E017E18; Tue, 1 Nov 2022 05:35:57 -0700 (PDT) Received: from [172.20.1.180] (unknown [62.168.35.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id ADB7A4322D; Tue, 1 Nov 2022 12:35:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1667306155; bh=yMqVNQ37QE/swhD8lx9zl7UI7paDGjPB00joSztAPmc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NRxBwuer4t7KCW2gfFyggTHYWsjAXZ9haWFs8cVWsYB8EPqoHgq5gFBj5w0jP/fA0 Le4Wme5QVbHe89ysv9n44tP7rJU4tDxq1FPPfWRox9wks+KiqKK6YBfjPDcQ6gLAYF mSRWtKfl00ZG0Cp81nGs5obenLhtnmOcq7Q9TiewYebGxH7K8kRP168jP7TyTFuIQx zx0X3lfKgzJgAamaOhdq6MqhjJU4RMNHlC/8qbXLlT7IqH8i5dTlePhTJH21UdHffr tpZ3c0Jbyy8ojGZEAWUOGsvh5GGj+6sl5azKLbg3JM1uxAVQ3Q4lJjsC2P+1BkjVv5 vVI0aU2tLzncg== Message-ID: <39d370af-9e7f-f487-8448-3ee6bcbfc9f4@canonical.com> Date: Tue, 1 Nov 2022 05:35:53 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] apparmor: Add __init annotation to aa_{setup/teardown}_dfa_engine() Content-Language: en-US To: Xiu Jianfeng , paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com Cc: apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221029012505.227136-1-xiujianfeng@huawei.com> From: John Johansen Organization: Canonical In-Reply-To: <20221029012505.227136-1-xiujianfeng@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/28/22 18:25, Xiu Jianfeng wrote: > The aa_setup_dfa_engine() and aa_teardown_dfa_engine() is only called in > apparmor_init(), so let us add __init annotation to them. > > Fixes: 11c236b89d7c ("apparmor: add a default null dfa") > Signed-off-by: Xiu Jianfeng Acked-by: John Johansen I have pulled this into my tree > --- > security/apparmor/match.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/security/apparmor/match.c b/security/apparmor/match.c > index 5095c26ca683..b97ef5e1db73 100644 > --- a/security/apparmor/match.c > +++ b/security/apparmor/match.c > @@ -31,7 +31,7 @@ static char stacksplitdfa_src[] = { > }; > struct aa_dfa *stacksplitdfa; > > -int aa_setup_dfa_engine(void) > +int __init aa_setup_dfa_engine(void) > { > int error; > > @@ -59,7 +59,7 @@ int aa_setup_dfa_engine(void) > return 0; > } > > -void aa_teardown_dfa_engine(void) > +void __init aa_teardown_dfa_engine(void) > { > aa_put_dfa(stacksplitdfa); > aa_put_dfa(nulldfa);