Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1465833pxb; Fri, 18 Feb 2022 08:18:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrvmg09XgVnOsT/wonb3xesk923lxNwDuOYJjV3WjdBWzGryyQPfWlIKT89/810J8diaZS X-Received: by 2002:a05:6402:90d:b0:412:d3fe:8460 with SMTP id g13-20020a056402090d00b00412d3fe8460mr985026edz.316.1645201126326; Fri, 18 Feb 2022 08:18:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645201126; cv=none; d=google.com; s=arc-20160816; b=Lg6ryZuJ2Kl41hFTnAk+3xtjFTn4/QqqXJhGDISYQMqJ4PnI2ViRvv5HfnWzvE71jj 6v8o5lU4BmeH+I++8eIjdNWflo4u4ew7d862bUtaSN1aCrO6hhVDfMwq/zydLI3d3UlP 15AbTQtbmz1DRvmhnHiSKmdsAvxklweeBePInRWpAd7MsIyH4FoTQ4CKLeOdYAYXFKD6 KkUQCbCSW68DMncVmDaD5digo+LOUfxzSN+SY941lOl+ktPz4+XZVGg7z/Ix6XnR31db TEjlJaRCuSywMpedi5r2GPf6BuPJXCFrhLddHobCdJLjB1JD0UsWM4W73YGY2vE/vyCu Rhgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gYcd/QBGMFO5t+xbaiunelCNfeodnNjY3U5zTNCoCNc=; b=fVG6DxDHKqZ7r0oevNW3rJQp42yAtQ12F+G2MKz2ZTb/3Q/P33zTxwmx5NjYiw/DHW ChCPEuMz7BPPwju4Li/jeIzTb7ng37MscV9MzqaHDh9np0LAEPLNhRprOzWyjoLCsCOl 1hPR02MnyUG+VClcU34X/IdlvL5qJnrsGdww+pjFjpnEh2Ivlvn2JQW73LXCIFeruMFL n/Cr15kzt6vtjafm063SJSM9DMyaXlg5eu3irT/Zo+wQd/bdxnKjK0Pvd8iZm7yI5Kzw 039H4l8fz5Mj6Z40U2jLP6IYByLEihqlxqpaeB3pZwjsgmCADS65uBUpcpeN1phtY9EY doUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vBbXWXZf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kb14si533268ejc.117.2022.02.18.08.18.21; Fri, 18 Feb 2022 08:18:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vBbXWXZf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235715AbiBRNO2 (ORCPT + 99 others); Fri, 18 Feb 2022 08:14:28 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:58318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231269AbiBRNO0 (ORCPT ); Fri, 18 Feb 2022 08:14:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 860F41B446D; Fri, 18 Feb 2022 05:14:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 209B261687; Fri, 18 Feb 2022 13:14:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9B61C340E9; Fri, 18 Feb 2022 13:14:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645190048; bh=tYfeunHQUCJoMBW4KCGOeDi3CMtMJKFVuq09f4Qy3/c=; h=From:To:Cc:Subject:Date:From; b=vBbXWXZfhyx61GlN+4nIkKHAofV3Tmyr7SoPL/JEr5O8aDuGGFkaqtwjsuHp/aWJd NyVHxUGohJ8znulkcU6/mgN478hdbs6CnYqpPVU4HyjCX7mZdBjeSEtJOQLoG+JX8i tfgZ0yR1aFtzmkQnXpRV3CxMiyI7vkizA2SIxd24= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable , Kees Cook , Daniel Micay , Nick Desaulniers , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Nathan Chancellor , linux-mm@kvack.org, llvm@lists.linux.dev Subject: [PATCH] slab: remove __alloc_size attribute from __kmalloc_track_caller Date: Fri, 18 Feb 2022 14:13:58 +0100 Message-Id: <20220218131358.3032912-1-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1953; h=from:subject; bh=tYfeunHQUCJoMBW4KCGOeDi3CMtMJKFVuq09f4Qy3/c=; b=owGbwMvMwCRo6H6F97bub03G02pJDEn8s6c4O30y6vORX/ORQXjx0QO+yZ+7OfqrVN2bJEW4TmtN 7uPpiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIlYJDIsaL/7pkRd/rig6sTwLMFXHx PEKo9OYpifbbZwheqTPMfejscylVHLrm1gNdQFAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Fixes: c37495d6254c ("slab: add __alloc_size attributes for better bounds checking") Cc: stable Cc: Kees Cook Cc: Daniel Micay Cc: Nick Desaulniers Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: Vlastimil Babka Cc: Nathan Chancellor Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Cc: llvm@lists.linux.dev Signed-off-by: Greg Kroah-Hartman --- include/linux/slab.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/linux/slab.h b/include/linux/slab.h index 37bde99b74af..5b6193fd8bd9 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -660,8 +660,7 @@ static inline __alloc_size(1, 2) void *kcalloc(size_t n, size_t size, gfp_t flag * allocator where we care about the real place the memory allocation * request comes from. */ -extern void *__kmalloc_track_caller(size_t size, gfp_t flags, unsigned long caller) - __alloc_size(1); +extern void *__kmalloc_track_caller(size_t size, gfp_t flags, unsigned long caller); #define kmalloc_track_caller(size, flags) \ __kmalloc_track_caller(size, flags, _RET_IP_) -- 2.35.1