All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Emese Revfy <re.emese@gmail.com>, Greg KH <gregkh@linuxfoundation.org>
Cc: "kernel-hardening@lists.openwall.com" 
	<kernel-hardening@lists.openwall.com>,
	PaX Team <pageexec@freemail.hu>,
	Brad Spengler <spender@grsecurity.net>,
	Michal Marek <mmarek@suse.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	"Theodore Ts'o" <tytso@mit.edu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux-MM <linux-mm@kvack.org>, Jens Axboe <axboe@kernel.dk>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Paul McKenney <paulmck@linux.vnet.ibm.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	bart.vanassche@sandisk.com,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v3 0/4] Introduce the latent_entropy gcc plugin
Date: Wed, 15 Jun 2016 16:01:49 -0700	[thread overview]
Message-ID: <CAGXu5jJH2FNenOpAE3Rqh8q=s01sbHmf=QobT98u4h=anjRubw@mail.gmail.com> (raw)
In-Reply-To: <20160615223952.f3a4ece452b15c62babf4629@gmail.com>

On Wed, Jun 15, 2016 at 1:39 PM, Emese Revfy <re.emese@gmail.com> wrote:
> On Wed, 15 Jun 2016 11:55:44 -0700
> Kees Cook <keescook@chromium.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

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Emese Revfy <re.emese@gmail.com>, Greg KH <gregkh@linuxfoundation.org>
Cc: "kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>,
	PaX Team <pageexec@freemail.hu>,
	Brad Spengler <spender@grsecurity.net>,
	Michal Marek <mmarek@suse.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	Theodore Ts'o <tytso@mit.edu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux-MM <linux-mm@kvack.org>, Jens Axboe <axboe@kernel.dk>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Paul McKenney <paulmck@linux.vnet.ibm.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	bart.vanassche@sandisk.com,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v3 0/4] Introduce the latent_entropy gcc plugin
Date: Wed, 15 Jun 2016 16:01:49 -0700	[thread overview]
Message-ID: <CAGXu5jJH2FNenOpAE3Rqh8q=s01sbHmf=QobT98u4h=anjRubw@mail.gmail.com> (raw)
In-Reply-To: <20160615223952.f3a4ece452b15c62babf4629@gmail.com>

On Wed, Jun 15, 2016 at 1:39 PM, Emese Revfy <re.emese@gmail.com> wrote:
> On Wed, 15 Jun 2016 11:55:44 -0700
> Kees Cook <keescook@chromium.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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Emese Revfy <re.emese@gmail.com>, Greg KH <gregkh@linuxfoundation.org>
Cc: "kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>,
	PaX Team <pageexec@freemail.hu>,
	Brad Spengler <spender@grsecurity.net>,
	Michal Marek <mmarek@suse.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	Theodore Ts'o <tytso@mit.edu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux-MM <linux-mm@kvack.org>, Jens Axboe <axboe@kernel.dk>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Paul McKenney <paulmck@linux.vnet.ibm.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	bart.vanassche@sandisk.com,
	"David S. Miller" <davem@davemloft.net>
Subject: [kernel-hardening] Re: [PATCH v3 0/4] Introduce the latent_entropy gcc plugin
Date: Wed, 15 Jun 2016 16:01:49 -0700	[thread overview]
Message-ID: <CAGXu5jJH2FNenOpAE3Rqh8q=s01sbHmf=QobT98u4h=anjRubw@mail.gmail.com> (raw)
In-Reply-To: <20160615223952.f3a4ece452b15c62babf4629@gmail.com>

On Wed, Jun 15, 2016 at 1:39 PM, Emese Revfy <re.emese@gmail.com> wrote:
> On Wed, 15 Jun 2016 11:55:44 -0700
> Kees Cook <keescook@chromium.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

  reply	other threads:[~2016-06-15 23:01 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 22:17 [PATCH v3 0/4] Introduce the latent_entropy gcc plugin Emese Revfy
2016-06-14 22:17 ` [kernel-hardening] " Emese Revfy
2016-06-14 22:17 ` Emese Revfy
2016-06-14 22:19 ` [PATCH v3 1/4] Add support for passing gcc plugin arguments Emese Revfy
2016-06-14 22:19   ` [kernel-hardening] " Emese Revfy
2016-06-14 22:19   ` Emese Revfy
2016-06-14 22:20 ` [PATCH v3 2/4] Add the latent_entropy gcc plugin Emese Revfy
2016-06-14 22:20   ` [kernel-hardening] " Emese Revfy
2016-06-14 22:20   ` Emese Revfy
2016-06-15 18:07   ` Kees Cook
2016-06-15 18:07     ` [kernel-hardening] " Kees Cook
2016-06-15 18:07     ` Kees Cook
2016-06-15 18:07     ` Kees Cook
2016-06-15 20:49     ` Emese Revfy
2016-06-15 20:49       ` [kernel-hardening] " Emese Revfy
2016-06-15 20:49       ` Emese Revfy
2016-06-15 20:49       ` Emese Revfy
2016-06-15 22:38       ` Kees Cook
2016-06-15 22:38         ` [kernel-hardening] " Kees Cook
2016-06-15 22:38         ` Kees Cook
2016-06-15 22:38         ` Kees Cook
2016-06-14 22:21 ` [PATCH v3 3/4] Mark functions with the latent_entropy attribute Emese Revfy
2016-06-14 22:21   ` [kernel-hardening] " Emese Revfy
2016-06-14 22:21   ` Emese Revfy
2016-06-14 22:22 ` [PATCH v3 4/4] Add the extra_latent_entropy kernel parameter Emese Revfy
2016-06-14 22:22   ` [kernel-hardening] " Emese Revfy
2016-06-14 22:22   ` Emese Revfy
2016-06-15 18:55 ` [PATCH v3 0/4] Introduce the latent_entropy gcc plugin Kees Cook
2016-06-15 18:55   ` [kernel-hardening] " Kees Cook
2016-06-15 18:55   ` Kees Cook
2016-06-15 18:55   ` Kees Cook
2016-06-15 20:39   ` Emese Revfy
2016-06-15 20:39     ` [kernel-hardening] " Emese Revfy
2016-06-15 20:39     ` Emese Revfy
2016-06-15 20:39     ` Emese Revfy
2016-06-15 23:01     ` Kees Cook [this message]
2016-06-15 23:01       ` [kernel-hardening] " Kees Cook
2016-06-15 23:01       ` Kees Cook
2016-06-15 23:01       ` Kees Cook
2016-06-15 23:10       ` Joe Perches
2016-06-15 23:10         ` [kernel-hardening] " Joe Perches
2016-06-15 23:10         ` Joe Perches
2016-06-15 23:10         ` Joe Perches

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='CAGXu5jJH2FNenOpAE3Rqh8q=s01sbHmf=QobT98u4h=anjRubw@mail.gmail.com' \
    --to=keescook@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=bart.vanassche@sandisk.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=mmarek@suse.com \
    --cc=pageexec@freemail.hu \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=re.emese@gmail.com \
    --cc=spender@grsecurity.net \
    --cc=tglx@linutronix.de \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yamada.masahiro@socionext.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 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.