All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mihai Donțu" <mihai.dontu@gmail.com>
To: Darren Hart <dvhart@infradead.org>
Cc: keescook@chromium.org, linux-kernel@vger.kernel.org,
	andy@infradead.org, platform-driver-x86@vger.kernel.org,
	Mario.Limonciello@dell.com
Subject: Re: [PATCH] platform/x86: wmi: Do not mix pages and kmalloc
Date: Mon, 06 Aug 2018 14:36:32 +0300	[thread overview]
Message-ID: <1533555392.28014.25.camel@gmail.com> (raw)
In-Reply-To: <20180622232730.GA27466@fury>

Hi Darren,

On Fri, 2018-06-22 at 16:27 -0700, Darren Hart wrote:
> On Thu, Jun 21, 2018 at 01:24:34AM +0000, Mario.Limonciello@dell.com wrote:
> > > -----Original Message-----
> > > From: Darren Hart [mailto:dvhart@infradead.org]
> > > Sent: Wednesday, June 20, 2018 7:17 PM
> > > To: Kees Cook
> > > Cc: LKML; Andy Shevchenko; Platform Driver; Mihai Donțu; Limonciello, Mario
> > > Subject: Re: [PATCH] platform/x86: wmi: Do not mix pages and kmalloc
> > > 
> > > On Wed, Jun 20, 2018 at 04:43:14PM -0700, Kees Cook wrote:
> > > > On Wed, Jun 20, 2018 at 4:37 PM, Darren Hart <dvhart@infradead.org> wrote:
> > > > > On Wed, Jun 20, 2018 at 02:31:41PM -0700, Kees Cook wrote:
> > > > > > The probe handler_data was being allocated with __get_free_pages()
> > > > > > for no reason I could find. The error path was using kfree(). Since
> > > > > 
> > > > > v4 of Mario's series used kmalloc:
> > > > > https://patchwork.kernel.org/patch/9985827/
> > > > > 
> > > > > This was changed in v10 to use __get_free_pages:
> > > > > https://patchwork.kernel.org/patch/10018023/
> > > > > 
> > > > > But... I'm not finding the discussion that led to this change.... Mario,
> > > > > do you recall? Something about contiguous memory? We had a similar
> > > > > discussion on an earlier series:
> > > > > 
> > > > > https://patchwork.kernel.org/patch/9975277/
> > > > 
> > > > FWIW, kmalloc gets you contiguous memory...
> > > 
> > > Yeah, I'm not finding a valid reason to use __get_free_pages over kmalloc in
> > > this case. I'll give Mario a chance to respond in case I'm just missing
> > > something, but otherwise will plan to apply this patch.
> > 
> > I think it was for contiguous memory, so if kmalloc is giving that I agree
> > no need to keep __get_free_pages instead.
> > 
> > Acked-by: Mario Limonciello <Mario.limonciello@dell.com>
> 
> Confirmed, kmalloc in physically contiguous.
> 
> Queued up, and tagged for stable. Thanks everyone.
> 

Would it be possible to queue this for 4.18 or is it too late? I just
noticed it has not reached 4.17.12 either.

Thanks,

-- 
Mihai Donțu

      reply	other threads:[~2018-08-06 11:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 21:31 [PATCH] platform/x86: wmi: Do not mix pages and kmalloc Kees Cook
2018-06-20 23:37 ` Darren Hart
2018-06-20 23:43   ` Kees Cook
2018-06-21  0:17     ` Darren Hart
2018-06-21  1:24       ` Mario.Limonciello
2018-06-21  1:24         ` Mario.Limonciello
2018-06-22 23:27         ` Darren Hart
2018-08-06 11:36           ` Mihai Donțu [this message]

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=1533555392.28014.25.camel@gmail.com \
    --to=mihai.dontu@gmail.com \
    --cc=Mario.Limonciello@dell.com \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@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.