From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AECAC433DF for ; Fri, 5 Jun 2020 17:51:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DBA412074B for ; Fri, 5 Jun 2020 17:51:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="cyE96yzw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727868AbgFERvl (ORCPT ); Fri, 5 Jun 2020 13:51:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbgFERvk (ORCPT ); Fri, 5 Jun 2020 13:51:40 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48360C08C5C3 for ; Fri, 5 Jun 2020 10:51:40 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id k2so2981428pjs.2 for ; Fri, 05 Jun 2020 10:51:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Elb/K3NbcNegpVMuNaXJOed2nsIqtHUVF+aE4EBGdX4=; b=cyE96yzwPDHVFbSsT4aZw5PP7inmvIcaqp2nz+vxN1Qk4NtEz/SigXV/63qONuIY4J vbG+klLGqhYzbnI6YcOgD/ScTrjUIdkFdbB72EHxjJX1ygWoZiSZxU/iFVEfzZe1QQhB GLHY0xkN5sCyhZ6FaFsduEBmeQRy5nqRSfZj4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Elb/K3NbcNegpVMuNaXJOed2nsIqtHUVF+aE4EBGdX4=; b=oBW5Aifb2/JGxBC7/TAYv0r7LVj3pcQUzO+vfNslylvsaslyotQmjuDu5/VMgGWGDb B1QaIAGusFxIGHuVD+XK1NYH4G3cC7SLL43w5IhZB+V+/d40/q23ucCNqN7UmSIWdkUB at3JwSRVQrgLM5XKiZOOPCsYs8jiZI7ihVulRTsAMC6Dq9w44qO5fUivDj/E0giHL52+ VGSwredOSSTs0LScRQIU1PRK33PI53nrZK1I2v7fpjDWj3uXbBjGix1RD7njMZwDMgcq Qhz4vjQxGzBhvAexbkFsl3genEgrIdIKScCoSQQeqnkwcg9zwJ4btOSMRttx/A6ByoP4 NJuw== X-Gm-Message-State: AOAM530nkTx69BpeDR92P1nTWlAFeCciGSBrdhY7vKDbgZOMyshl8h0D 7CXWSZsvbrZ0u5ern8p/pXUU+g== X-Google-Smtp-Source: ABdhPJzrtx43z/k6ys23I9kfo7v5ymkHJ9HRqI32HkBP+x5vnnwzrH20sVJt1WPzaLfHhsYAR2KY9g== X-Received: by 2002:a17:902:ac97:: with SMTP id h23mr11213337plr.64.1591379499793; Fri, 05 Jun 2020 10:51:39 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id 205sm205444pfc.206.2020.06.05.10.51.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 10:51:38 -0700 (PDT) Date: Fri, 5 Jun 2020 10:51:37 -0700 From: Kees Cook To: Vegard Nossum Cc: Vlastimil Babka , "Rafael J. Wysocki" , Robert Moore , Erik Kaneda , "Rafael J. Wysocki" , Christoph Lameter , Andrew Morton , Marco Elver , Waiman Long , LKML , Linux MM , ACPI Devel Maling List , Len Brown , Steven Rostedt Subject: Re: slub freelist issue / BUG: unable to handle page fault for address: 000000003ffe0018 Message-ID: <202006051051.CC0F12EA@keescook> References: <202006041054.874AA564@keescook> <34455dce-6675-1fc2-8d61-45bf56f3f554@suse.cz> <6b2b149e-c2bc-f87a-ea2c-3046c5e39bf9@oracle.com> <894e8cee-33df-1f63-fb12-72dceb024ea7@oracle.com> <202006050828.F85A75D13@keescook> <2055681b-35cf-1ca6-00d1-c47868bbf28d@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2055681b-35cf-1ca6-00d1-c47868bbf28d@oracle.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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