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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0FACC4332F for ; Sat, 19 Feb 2022 23:58:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240503AbiBSX7Q (ORCPT ); Sat, 19 Feb 2022 18:59:16 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232156AbiBSX7N (ORCPT ); Sat, 19 Feb 2022 18:59:13 -0500 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 110423A1AB for ; Sat, 19 Feb 2022 15:58:54 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id y11so5424064pfi.11 for ; Sat, 19 Feb 2022 15:58:54 -0800 (PST) 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=pyKnh0rifNC4U8/SpWhjiS3uUcC5kmVNLLaPc0IhXvY=; b=eFv9LIHn5T7yu7SXdfr1xRt6PH8DYtfvvMqPlhlsZ6bZC6Gwo4CnvRkxkLGP4v1/za xH7WDZlsGzhKXMPVZxNtJvfV97TeYC/+z2zTWMOzSyPurTe9RIkmSZRk2tNYowdcG0FS fqY5kUxdDE9sZFT3ljh+x03Lnvopm2Tk7vorM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pyKnh0rifNC4U8/SpWhjiS3uUcC5kmVNLLaPc0IhXvY=; b=xRFRUq+6c8DVQH46N/x2PO1DCRz9ZrwwmYAJIzYCX+n0xRXGb2CYZ9XzFRCX/uO5UA WjpNcyGMANj8J1VSMD0VcmU7WfvBnIdosnHuLFkHGYb9JAraIGXrUlrsVjlGiR4njbO/ eQVTE1ujscdiwbt1e+zikeP3WizDb7z15xV/jv+FqzhonjyMqiCxJJyxjU8XelmaCuzd j1gYhK0usF6KSGzYiZiRkWXPAzh41TpOKOLRW0r2pW5IvXkzPaoBXzhrVgVF51Nedi4Y ouc0ftCP1vw3h+17DNYV4ZAQJllYEYEUwGpHDNfBtozTLXzb3z0HSLc4PeojzWBoJqr6 GeaQ== X-Gm-Message-State: AOAM531KNQv2hmSRy4HdoNuPunzGy1d7/4o71k/IdomAZ5ZOOvJwNsQi UvR3kTbqGAE2XgvD5yMwQrtvqA== X-Google-Smtp-Source: ABdhPJz2B7x/obkYAxIzuuWmK0eIrem1Iyubh1rAOvTpZqyu2/XzDhnjlP1qJpC13eAFz3bW7Wje1A== X-Received: by 2002:a05:6a00:cd3:b0:4df:7b9e:2557 with SMTP id b19-20020a056a000cd300b004df7b9e2557mr14045768pfv.25.1645315133327; Sat, 19 Feb 2022 15:58:53 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id u11sm7756421pfi.71.2022.02.19.15.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Feb 2022 15:58:52 -0800 (PST) Date: Sat, 19 Feb 2022 15:58:51 -0800 From: Kees Cook To: Nick Desaulniers Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable , Daniel Micay , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Nathan Chancellor , linux-mm@kvack.org, llvm@lists.linux.dev Subject: Re: [PATCH] slab: remove __alloc_size attribute from __kmalloc_track_caller Message-ID: <202202191558.11C173F04@keescook> References: <20220218131358.3032912-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 18, 2022 at 09:19:51AM -0800, Nick Desaulniers wrote: > On Fri, Feb 18, 2022 at 5:14 AM Greg Kroah-Hartman > wrote: > > > > Commit c37495d6254c ("slab: add __alloc_size attributes for better > > bounds checking") added __alloc_size attributes to a bunch of kmalloc > > function prototypes. Unfortunately the change to __kmalloc_track_caller > > seems to cause clang to generate broken code and the first time this is > > called when booting, the box will crash. > > > > While the compiler problems are being reworked and attempted to be > > solved, let's just drop the attribute to solve the issue now. Once it > > is resolved it can be added back. > > Sorry about the mess; we'll get it cleaned up! > Acked-by: Nick Desaulniers > Link: https://github.com/ClangBuiltLinux/linux/issues/1599 Thanks for the issue link! Acked-by: Kees Cook -- Kees Cook