All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Kees Cook <keescook@chromium.org>
Cc: Linux mtd <linux-mtd@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Silvio Cesare <silvio.cesare@gmail.com>,
	"# 3.4.x" <stable@vger.kernel.org>
Subject: Re: [PATCH 1/2] Revert "UBIFS: Fix potential integer overflow in allocation"
Date: Mon, 02 Jul 2018 23:41:42 +0200	[thread overview]
Message-ID: <5400614.4lJzJ1gdXR@blindfold> (raw)
In-Reply-To: <CAGXu5jJabYkC06ZGa1X2HweY8idyDR8a2y805btY5jKMHKbSuA@mail.gmail.com>

Am Montag, 2. Juli 2018, 20:27:00 CEST schrieb Kees Cook:
> > Let's queue another patch for the next merge window which converts
> > kmalloc() -> kmalloc_array().
> 
> I'd prefer to leave it as-is for 4.18 because it would be the only
> unconverted kmalloc()-with-multiplication in the entire tree. We did
> treewide conversions and a revert would be undoing that here. (The
> scripts that check for this case would run "clean" for 4.18.)
> 
> So, this gets back to the question of the int vs u32: if you just
> didn't revert this patch, then the kmalloc_array() would stand too.
> Easy! :)

I can queue the kmalloc_array() conversion on top of the revert.
But TBH, using kmalloc_array() here is just ridiculous, we allocate
dn->size times 2 where dn->size is at most 4k.

Thanks,
//richard

  reply	other threads:[~2018-07-02 21:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-01 21:20 [PATCH 1/2] Revert "UBIFS: Fix potential integer overflow in allocation" Richard Weinberger
2018-07-01 21:20 ` [PATCH 2/2] ubifs: Check data node size before truncate Richard Weinberger
2018-07-02 16:00   ` Kees Cook
2018-07-02 16:00 ` [PATCH 1/2] Revert "UBIFS: Fix potential integer overflow in allocation" Kees Cook
2018-07-02 17:50   ` Richard Weinberger
2018-07-02 18:27     ` Kees Cook
2018-07-02 21:41       ` Richard Weinberger [this message]
2018-07-02 21:44         ` Kees Cook

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=5400614.4lJzJ1gdXR@blindfold \
    --to=richard@nod.at \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=silvio.cesare@gmail.com \
    --cc=stable@vger.kernel.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.