linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: pnagar@codeaurora.org
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: arnd@arndb.de, dsule@codeaurora.org, eparis@parisplace.org,
	jmorris@namei.org, joe@perches.com, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org, jeffv@google.com,
	nmardana@codeaurora.org, ojeda@kernel.org, paul@paul-moore.com,
	psodagud@codeaurora.org, selinux@vger.kernel.org,
	serge@hallyn.com, stephen.smalley.work@gmail.com,
	ndesaulniers via sendgmr 
	<ndesaulniers@ndesaulniers1.mtv.corp.google.com>
Subject: Re: [RFC PATCH v2] selinux: security: Move selinux_state to a separate page
Date: Mon, 11 Jan 2021 15:21:31 +0530	[thread overview]
Message-ID: <fe452dce51f07bdbd4c0ae2bc70c3086@codeaurora.org> (raw)
In-Reply-To: <20210109010111.2299669-1-ndesaulniers@google.com>

On 2021-01-09 06:31, Nick Desaulniers wrote:
> Via:
> https://lore.kernel.org/lkml/1610099389-28329-1-git-send-email-pnagar@codeaurora.org/
> 
>> diff --git a/include/linux/init.h b/include/linux/init.h
>> index 7b53cb3..617adcf 100644
>> --- a/include/linux/init.h
>> +++ b/include/linux/init.h
>> @@ -300,6 +300,10 @@ void __init parse_early_options(char *cmdline);
>>  /* Data marked not to be saved by software suspend */
>>  #define __nosavedata __section(".data..nosave")
>> 
>> +#ifdef CONFIG_SECURITY_RTIC
>> +#define __rticdata  __section(".bss.rtic")
> 
> if you put:
> 
> #else
> #define __rticdata
> 
> here, then you wouldn't need to label each datum you put in there.
> 
>> +#endif
>> +
>>  #ifdef MODULE
>>  #define __exit_p(x) x
>>  #else
> 
>> --- a/security/selinux/hooks.c
>> +++ b/security/selinux/hooks.c
>> @@ -104,7 +104,11 @@
>>  #include "audit.h"
>>  #include "avc_ss.h"
>> 
>> +#ifdef CONFIG_SECURITY_RTIC
>> +struct selinux_state selinux_state __rticdata;
>> +#else
>>  struct selinux_state selinux_state;
>> +#endif
> 
> so you could then drop the if-def here.
Will update this in next version, thank you for the suggestion.

> Happy to see this resolved when building with LLD+LTO, which has been a
> problem in the past.
Yes, downstream we have this verified with LTO configs enabled. Let us 
know if
you are suggesting to check anything additionally here.

> Disabling selinux is a common attack vector on Android devices, so 
> happy
> to see some effort towards mitigation.  You might want to communicate
> the feature more to existing OEMs that are using your chipsets that
> support this feature.
Glad to know the idea looks good! Yes, we will work on that, will 
communicate
internally as well, thank you.

  reply	other threads:[~2021-01-11  9:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08  9:49 [RFC PATCH v2] selinux: security: Move selinux_state to a separate page Preeti Nagar
2021-01-08 15:25 ` Miguel Ojeda
2021-01-11  6:25   ` pnagar
2021-01-08 15:28 ` Miguel Ojeda
2021-01-08 17:11 ` Casey Schaufler
2021-01-12  9:36   ` pnagar
2021-01-12 17:06     ` Casey Schaufler
2021-01-13 10:56     ` David Howells
2021-01-18  6:15       ` pnagar
2021-01-09  1:01 ` Nick Desaulniers
2021-01-11  9:51   ` pnagar [this message]
2021-01-18  5:56 pnagar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe452dce51f07bdbd4c0ae2bc70c3086@codeaurora.org \
    --to=pnagar@codeaurora.org \
    --cc=arnd@arndb.de \
    --cc=dsule@codeaurora.org \
    --cc=eparis@parisplace.org \
    --cc=jeffv@google.com \
    --cc=jmorris@namei.org \
    --cc=joe@perches.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=ndesaulniers@ndesaulniers1.mtv.corp.google.com \
    --cc=nmardana@codeaurora.org \
    --cc=ojeda@kernel.org \
    --cc=paul@paul-moore.com \
    --cc=psodagud@codeaurora.org \
    --cc=selinux@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=stephen.smalley.work@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).