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 C8230C433E1 for ; Fri, 5 Jun 2020 17:51:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8DDA22074B for ; Fri, 5 Jun 2020 17:51:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="cyE96yzw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DDA22074B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0591280007; Fri, 5 Jun 2020 13:51:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 009BB8E0006; Fri, 5 Jun 2020 13:51:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E138680007; Fri, 5 Jun 2020 13:51:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C8CDF8E0006 for ; Fri, 5 Jun 2020 13:51:41 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 868C5A309D for ; Fri, 5 Jun 2020 17:51:41 +0000 (UTC) X-FDA: 76895900802.19.juice14_260316326da1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 451B61AD1B9 for ; Fri, 5 Jun 2020 17:51:41 +0000 (UTC) X-HE-Tag: juice14_260316326da1 X-Filterd-Recvd-Size: 5614 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Fri, 5 Jun 2020 17:51:40 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id ga6so2982103pjb.1 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=OQ5nRSY9Ba5T6PPmmqPAz+lft26KNupspSFCEZ8vWyktxnS26jMdAdKE4/kigIBuLi TxeKV1LkyzylFfQbYJhHnHUmG2ImBR1ocwUPI0ZuCYvYVMZdg2DZR76hJ99v1N0FOK/P 2UXzmzTMRA5e2o+9HoRbxahBit/4U4Y0R+nK9Xc6xgh4/t48QAkQ6XKYIFiGSEfNBx1K YzWfajtPHUak6PH/6SKCDlmu4y7VUbma1nni/HlV081KD8rTnzTFU2xQTG9FuIojmhUW /qbFIly00dZxtmgyq7wbXP5cpN/+YkmSxhsYXsvLvfu/wi9bsFIxWILt69L04ySkvuQa UkQg== X-Gm-Message-State: AOAM533VeK8zhbcuYR7mToDYwTjtb1/wb7Ao9oE5CBOyThlJmZOfQA8g zMwlF5fahi2RKoV1DVZm+EH3xA== 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> X-Rspamd-Queue-Id: 451B61AD1B9 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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