[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202006051051.CC0F12EA@keescook>
Date: Fri, 5 Jun 2020 10:51:37 -0700
From: Kees Cook <keescook@...omium.org>
To: Vegard Nossum <vegard.nossum@...cle.com>
Cc: Vlastimil Babka <vbabka@...e.cz>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Robert Moore <robert.moore@...el.com>,
Erik Kaneda <erik.kaneda@...el.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Christoph Lameter <cl@...ux.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Marco Elver <elver@...gle.com>,
Waiman Long <longman@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
Linux MM <linux-mm@...ck.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Len Brown <lenb@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: slub freelist issue / BUG: unable to handle page fault for
address: 000000003ffe0018
On Fri, Jun 05, 2020 at 06:37:55PM +0200, Vegard Nossum wrote:
> On 2020-06-05 17:44, Kees Cook wrote:
> > On Fri, Jun 05, 2020 at 04:44:51PM +0200, Vegard Nossum wrote:
> > > That's it :-) This fixes it for me:
> > >
> > > diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
> > > index 2566e2d4c7803..b76bbab917941 100644
> > > --- a/drivers/acpi/acpica/nsaccess.c
> > > +++ b/drivers/acpi/acpica/nsaccess.c
> > > @@ -98,14 +98,12 @@ acpi_status acpi_ns_root_initialize(void)
> > > * predefined names are at the root level. It is much easier
> > > to
> > > * just create and link the new node(s) here.
> > > */
> > > - new_node =
> > > - ACPI_ALLOCATE_ZEROED(sizeof(struct
> > > acpi_namespace_node));
> > > + new_node = acpi_ns_create_node(*ACPI_CAST_PTR (u32,
> > > init_val->name));
> > > if (!new_node) {
> > > status = AE_NO_MEMORY;
> > > goto unlock_and_exit;
> > > }
> > >
> > > - ACPI_COPY_NAMESEG(new_node->name.ascii, init_val->name);
> > > new_node->descriptor_type = ACPI_DESC_TYPE_NAMED;
> > > new_node->type = init_val->type;
> >
> > I'm a bit confused by the internals of acpi_ns_create_note(). It can still
> > end up calling ACPI_ALLOCATE_ZEROED() via acpi_os_acquire_object(). Is
> > this fix correct?
> >
>
> include/acpi/platform/aclinuxex.h:static inline void
> *acpi_os_acquire_object(acpi_cache_t * cache)
> include/acpi/platform/aclinuxex.h-{
> include/acpi/platform/aclinuxex.h- return kmem_cache_zalloc(cache,
> include/acpi/platform/aclinuxex.h- irqs_disabled()? GFP_ATOMIC :
> GFP_KERNEL);
> include/acpi/platform/aclinuxex.h-}
>
> No comment.
ah! Thanks. I was looking at drivers/acpi/acpica/utcache.c
--
Kees Cook
Powered by blists - more mailing lists