[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5jJH2FNenOpAE3Rqh8q=s01sbHmf=QobT98u4h=anjRubw@mail.gmail.com>
Date: Wed, 15 Jun 2016 16:01:49 -0700
From: Kees Cook <keescook@...omium.org>
To: Emese Revfy <re.emese@...il.com>,
Greg KH <gregkh@...uxfoundation.org>
Cc: "kernel-hardening@...ts.openwall.com"
<kernel-hardening@...ts.openwall.com>,
PaX Team <pageexec@...email.hu>,
Brad Spengler <spender@...ecurity.net>,
Michal Marek <mmarek@...e.com>,
LKML <linux-kernel@...r.kernel.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
linux-kbuild <linux-kbuild@...r.kernel.org>,
"Theodore Ts'o" <tytso@....edu>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux-MM <linux-mm@...ck.org>, Jens Axboe <axboe@...nel.dk>,
Al Viro <viro@...iv.linux.org.uk>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
bart.vanassche@...disk.com, "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH v3 0/4] Introduce the latent_entropy gcc plugin
On Wed, Jun 15, 2016 at 1:39 PM, Emese Revfy <re.emese@...il.com> wrote:
> On Wed, 15 Jun 2016 11:55:44 -0700
> Kees Cook <keescook@...omium.org> wrote:
>
>> The limit on the length of lines is 80 columns and this is a strongly
>> preferred limit.
>
> I think the code looks worse when it is truncated to 80 columns but
> I'll do it and resend the patches.
Yup, I understand your concerns, but since we're optimizing for
readability by a larger audience that has agreed to the guidelines in
CodingStyle, this is what we get. :)
One area I'm unclear on with kernel coding style, though, is if
splitting all the stuff prior to function name onto a separate line is
"acceptable", since that solves most of the long lines where
__latent_entropy has been added. For example, I don't know which is
better:
All on one line (gmail may split this, but my intention is all one line):
static __latent_entropy void rcu_process_callbacks(struct
softirq_action *unused)
Types and attributes on a separate line:
static __latent_entropy void
rcu_process_callbacks(struct softirq_action *unused)
All arguments on the next line:
static __latent_entropy void rcu_process_callbacks(
struct
softirq_action *unused)
Greg, do you have a better sense of how to split (or not split) these
kinds of long lines?
-Kees
--
Kees Cook
Chrome OS & Brillo Security
Powered by blists - more mailing lists