Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp672468pxj; Thu, 10 Jun 2021 09:53:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkBPO1USf48XOBQirtY3QUwui2jo1gdTN854K7+a38ZFw1Hqy63XHvaHN3QXEWSK0Fr7GE X-Received: by 2002:a05:6402:10c9:: with SMTP id p9mr415173edu.370.1623344037755; Thu, 10 Jun 2021 09:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623344037; cv=none; d=google.com; s=arc-20160816; b=azgYQypXLcG2AJ1gPGTZ3rvdLwJURPU3UHVfBmi0FBpzrz3qigGFDsBlT6YS4s/ebk 82xJYz2bK4osCer0nEkGYhrbQOjnTzwrtEWJbH+0n5f2YvuOfvmhJjx1ykc5RHAXAq7Y pYtgKhW+Pp2u6PPeXFS17ZpNah9Nz5TcWAOWKQhWg/HDgYi2eG5fHKwFGvSeVdeHnU23 9A9eJYIEgpI01OL7hqyuVZ9V8u+vdPmq/9fJzw1imCd6IjdvZfPMuIJ3pExnNLo/yRjw lJfuqAfD6dpz+KW6dvkiFplGzY045vjI1VYJuiV6fCwz2unZBbhP4tALMxR77PztuSwW V5AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bp6LvbTQVyzjMEi6wu5Mnp8jX00/m6s57GNvET58FOo=; b=bo3ASwQ+NwSHrt2QVx+80uj8C4OihmGADWbGb8x9uiOmhsOi8dW1EkumJ5hlhYmvwe v9/rGySf6nsIQwN2mbHbQZdZ+EUVi5Zq5UaqnO0mfQQDrdYfm38Hv9Wde5OqFierQRs6 egXgsQxzfP2jnru4bEclgxp0z5gLmDQWqL9nux1pLaLaBOrhkUsXlAKkhDHeZRZZ9hlb /e28UaviJKYVeSWxagXo1K0mlK3vWIJfpu5ek56+jZSTuQw6JSQC9FUjhCo7TK+2i5WS EChhcjqoF/BHX7gby6GFVA7giaHtyc9xqT0FS1R0oXpZyR/o6xAsqPhmX+UvEnklMwnf GDDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZnadtM5e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z4si1241272edb.208.2021.06.10.09.53.34; Thu, 10 Jun 2021 09:53:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZnadtM5e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230345AbhFJQx4 (ORCPT + 99 others); Thu, 10 Jun 2021 12:53:56 -0400 Received: from mail-ed1-f49.google.com ([209.85.208.49]:41562 "EHLO mail-ed1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbhFJQx4 (ORCPT ); Thu, 10 Jun 2021 12:53:56 -0400 Received: by mail-ed1-f49.google.com with SMTP id g18so31847706edq.8 for ; Thu, 10 Jun 2021 09:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bp6LvbTQVyzjMEi6wu5Mnp8jX00/m6s57GNvET58FOo=; b=ZnadtM5epcBD+4Cp5Oz7XjM95Tc8RoqKEZiTjoS3+g/5zNMiTlJ9tnG4dnpp5ZypOi 11CWXzvKZtG3yPeoXJ28Cgn5m6xRhPdzVqKyn/Ioedu6456TybmNOtgyKVyHH5sUuSZD Pc/X6VQitO34zJbnYbd8haf0Md4wgmUSBrXwg= 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:from:date :message-id:subject:to:cc; bh=bp6LvbTQVyzjMEi6wu5Mnp8jX00/m6s57GNvET58FOo=; b=l6mNGMADcQsnK39P+5k2uCMQ+Thqaa+e75h32gofpO9XA2xXMeL3WVOEm1NT40sjCe ugNeeAmb9oDtkQL8Vd6LB3B5MdrVQcEjyDviDVKkxruodozRvqo6E0ZDeW9ZLLbygjCg /ojXuM78dBy5Jl3YUn678OUnIAGDzfLdhncpNG5QfxIS6pEkzFn8qeStGp35km1SIqBq iY4DwRMuWsU+qPvUL+4H8l5qQYYK/hLLlLoezeAP6AhtD5OenkUsN/idXpgMekU9T8Jc CM5znFvDmJMSzI6INhChXFmCfb7sXPehWtuwa5ZxBZSSdWiFIj9PfU8JBxFvI6F8b9HU mb2g== X-Gm-Message-State: AOAM5325QPbxDPIaSl10u9B/ggNOLsmfAEnaEx/rcPZ7rfKeV/O4Sf94 iMSpj31CXzxpCquO/0Rbzo8cgMTawH+9vd03RhiY4Q== X-Received: by 2002:a05:6402:10cc:: with SMTP id p12mr411825edu.328.1623343858979; Thu, 10 Jun 2021 09:50:58 -0700 (PDT) MIME-Version: 1.0 References: <20210608230929.GA1214@raspberrypi> In-Reply-To: <20210608230929.GA1214@raspberrypi> From: Micah Morton Date: Thu, 10 Jun 2021 06:50:47 -1000 Message-ID: Subject: Re: [PATCH] LSM: SafeSetID: Mark safesetid_initialized as __initdata To: Austin Kim Cc: James Morris , "Serge E. Hallyn" , linux-security-module , Linux Kernel Mailing List , austin.kim@lge.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for the patch. Looks right, since that variable is only used in safesetid_security_init() and safesetid_init_securityfs(), which are both marked __init. I can merge it to the safesetid-next branch today and send the patch through my tree during the 5.14 merge window. On Tue, Jun 8, 2021 at 1:09 PM Austin Kim wrote: > > Mark safesetid_initialized as __initdata since it is only used > in initialization routine. > > Signed-off-by: Austin Kim > --- > security/safesetid/lsm.c | 2 +- > security/safesetid/lsm.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/security/safesetid/lsm.c b/security/safesetid/lsm.c > index 1079c6d54784..963f4ad9cb66 100644 > --- a/security/safesetid/lsm.c > +++ b/security/safesetid/lsm.c > @@ -22,7 +22,7 @@ > #include "lsm.h" > > /* Flag indicating whether initialization completed */ > -int safesetid_initialized; > +int safesetid_initialized __initdata; > > struct setid_ruleset __rcu *safesetid_setuid_rules; > struct setid_ruleset __rcu *safesetid_setgid_rules; > diff --git a/security/safesetid/lsm.h b/security/safesetid/lsm.h > index bde8c43a3767..d346f4849cea 100644 > --- a/security/safesetid/lsm.h > +++ b/security/safesetid/lsm.h > @@ -19,7 +19,7 @@ > #include > > /* Flag indicating whether initialization completed */ > -extern int safesetid_initialized; > +extern int safesetid_initialized __initdata; > > enum sid_policy_type { > SIDPOL_DEFAULT, /* source ID is unaffected by policy */ > -- > 2.20.1 >