From: Alex Elder <elder@linaro.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <ak@linux.intel.com>,
bp@suse.de, Jan Kara <jack@suse.cz>,
John Stultz <john.stultz@linaro.org>,
pmladek@suse.cz, Steven Rostedt <rostedt@goodmis.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] printk: use a clever macro
Date: Wed, 09 Jul 2014 13:15:13 -0500 [thread overview]
Message-ID: <53BD86B1.7050003@linaro.org> (raw)
In-Reply-To: <CAMuHMdV9=0ZUYvvK5eZsN-fFuCHNKTW6Ab2rKvS5XsfVOhBh6Q@mail.gmail.com>
On 07/09/2014 12:58 PM, Geert Uytterhoeven wrote:
> Hi Alex,
>
> On Wed, Jul 9, 2014 at 3:04 PM, Alex Elder <elder@linaro.org> wrote:
>> --- a/kernel/printk/printk.c
>> +++ b/kernel/printk/printk.c
>> @@ -453,11 +453,7 @@ static int log_store(int facility, int level,
>> return msg->text_len;
>> }
>>
>> -#ifdef CONFIG_SECURITY_DMESG_RESTRICT
>> -int dmesg_restrict = 1;
>> -#else
>> -int dmesg_restrict;
>> -#endif
>> +int dmesg_restrict = IS_ENABLED(CONFIG_SECURITY_DMESG_RESTRICT);
>
> Doesn't this move dmesg_restrict from the bss to the data section
> in case CONFIG_SECURITY_DMESG_RESTRICT is not enabled, due
> to the explicit initialization to zero?
I honestly don't know. Is that even a well-defined behavior?
Couldn't the compiler, noting an explicit 0 initialization,
put it into BSS anyway?
In any case, does this distinction matter?
-Alex
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
>
next prev parent reply other threads:[~2014-07-09 18:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 13:04 [PATCH 0/4] printk: some minor fixups Alex Elder
2014-07-09 13:04 ` [PATCH 1/4] printk: rename DEFAULT_MESSAGE_LOGLEVEL Alex Elder
2014-07-09 15:00 ` Borislav Petkov
2014-07-09 15:10 ` Alex Elder
2014-07-09 15:13 ` Borislav Petkov
2014-07-09 15:14 ` Alex Elder
2014-07-09 15:17 ` Borislav Petkov
2014-07-09 13:04 ` [PATCH 2/4] printk: fix some comments Alex Elder
2014-07-09 15:53 ` Petr Mládek
2014-07-09 13:04 ` [PATCH 3/4] printk: use a clever macro Alex Elder
2014-07-09 15:05 ` Borislav Petkov
2014-07-09 16:19 ` Petr Mládek
2014-07-09 16:24 ` Borislav Petkov
2014-07-09 16:32 ` Petr Mládek
2014-07-09 16:40 ` Borislav Petkov
2014-07-09 17:58 ` Geert Uytterhoeven
2014-07-09 18:15 ` Alex Elder [this message]
2014-07-09 13:04 ` [PATCH 4/4] printk: miscellaneous cleanups Alex Elder
2014-07-09 16:29 ` Petr Mládek
2014-07-09 16:45 ` Alex Elder
2014-07-09 16:03 ` Alex Elder
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=53BD86B1.7050003@linaro.org \
--to=elder@linaro.org \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=bp@suse.de \
--cc=geert@linux-m68k.org \
--cc=jack@suse.cz \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.cz \
--cc=rostedt@goodmis.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.