linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Len Baker <len.baker@gmx.com>, Kees Cook <keescook@chromium.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Iurii Zaikin <yzaikin@google.com>,
	linux-hardening@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2][next] sysctl: Avoid open coded arithmetic in memory allocator functions
Date: Sun, 24 Oct 2021 13:54:27 -0500	[thread overview]
Message-ID: <20211024185427.GA1420234@embeddedor> (raw)
In-Reply-To: <YXWeAdsMRcR5tInN@casper.infradead.org>

On Sun, Oct 24, 2021 at 06:55:13PM +0100, Matthew Wilcox wrote:
> On Sun, Oct 24, 2021 at 11:13:28AM +0200, Len Baker wrote:
> 
> I think it's better for code to be understandable.  Your patch makes
> the code less readable in the name of "security", which is a poor
> justification.

I agree with Matthew. Those functions seem to be a bit too much, for
now.

Let's keep it simple and start by replacing the open-coded instances
when possible, first. Then we can dig much deeper depending on each
particular case, taking into consideration readability, which is
certainly important.

Thanks
--
Gustavo

  reply	other threads:[~2021-10-24 18:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-23 10:54 [PATCH v2][next] sysctl: Avoid open coded arithmetic in memory allocator functions Len Baker
2021-10-23 14:27 ` Matthew Wilcox
2021-10-24  9:13   ` Len Baker
2021-10-24 16:58     ` Len Baker
2021-10-24 17:55     ` Matthew Wilcox
2021-10-24 18:54       ` Gustavo A. R. Silva [this message]
2021-10-29 16:57       ` Len Baker

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=20211024185427.GA1420234@embeddedor \
    --to=gustavoars@kernel.org \
    --cc=keescook@chromium.org \
    --cc=len.baker@gmx.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=willy@infradead.org \
    --cc=yzaikin@google.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).