Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1599428pxb; Fri, 18 Feb 2022 11:05:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJymgbCG+P78ktC1U7HoNmr7c9XdMu1nDfLlw6T79WXsonxhl9saexSgeiXmHlORaOA1X+bs X-Received: by 2002:a17:90b:4c42:b0:1ba:1b5:917b with SMTP id np2-20020a17090b4c4200b001ba01b5917bmr13984307pjb.166.1645211159184; Fri, 18 Feb 2022 11:05:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645211159; cv=none; d=google.com; s=arc-20160816; b=qUXNNPcDJc7MN2CTu0EvlJ1LJxQlA95WP1nbQiELEcxAX4pR2B3P+oKKdaThZIBrOX d3wxZ544n3HE/FpjiZG9/YCKjK44bLdN36iYMMrtH5kDNkIr9vXjBw4ONWeXrBJ38R9v Y3gkMoo5A+TxvnIsBqVXpxi09DzBbnDoKB6bqBfYRAfoR5dnX16myGaE09YyA1JtbXAI wwogKGKEM5KXQn19uHtmWSj1wL+HeAUCl0k9CC0fQMQzEj7UmxpBCgRcp4tnMnP+jPX2 2MJaW/R2sLql8KR9LxHym5qnt9aKs6Jq6ZXdKeWdysItAQ/Tc1pvQtAsCGSBbZ5mluzS gsmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=7xBLRQZhq3/skvOmeDBJB14+LYXLehKVzIynhx/JjM0=; b=WvwlqL2pi3QBv0VQc1YenTEjTRDiwea5HCgelP56+XE4JTLZKPZaXOIiy2roDbUP+0 mE3F8KgGGCECHaWCcGbI50dku1RIOR0yOR8WcjwgeofH9/bwTaVlvAgylZgyPoDNJKbE J2ZGYEGl+5dZVaoE3QjBMX/1kPK7cT3Q/LWsv5m3TRGZjBktg8ncT7MpiY2hg50Hs9dk 30yOQrEV7SyM0K5GXF+K2BcncSdyetjOoZEjPpZ+PgAhSIS8zFYo3EaOr9yIVdXS1ube uPHpo9Uc7VPtbxvXVjaLp9NV2yi+foLiyXhd/ZyaWhfqxJeCJVpRrCLgyEBkrY4iXONX bT/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=0jXyJ65e; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=80A1QJM3; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9si7181560plr.194.2022.02.18.11.05.37; Fri, 18 Feb 2022 11:05:59 -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=@suse.cz header.s=susede2_rsa header.b=0jXyJ65e; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=80A1QJM3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235173AbiBRSyh (ORCPT + 99 others); Fri, 18 Feb 2022 13:54:37 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:41958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231234AbiBRSye (ORCPT ); Fri, 18 Feb 2022 13:54:34 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FC2E212E2D; Fri, 18 Feb 2022 10:54:16 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BA49D1F380; Fri, 18 Feb 2022 18:54:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1645210454; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7xBLRQZhq3/skvOmeDBJB14+LYXLehKVzIynhx/JjM0=; b=0jXyJ65ecJsaSLvPCVibOVAuY3OGK4usVKD2EERKyiLsHHz0e7QV4ZYTI3Rbt+GijfiPAG xIwopJxYs0ot03/jzftod8OrUCu8aNBPsxw0mQJkerkALjDt7nHVaIaaaszd+tdaM61Yh8 d+1wWi8yXTM/1QG71yycfwTLocwKzPk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1645210454; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7xBLRQZhq3/skvOmeDBJB14+LYXLehKVzIynhx/JjM0=; b=80A1QJM3/GCBQg8FBevUB/VqXoEnD5gOwj9dFfPlDytKxWCjOlLQ3vd3yEu21dWjq5f7Ox JiaCkAMG6wXNfDDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 87D2513C9F; Fri, 18 Feb 2022 18:54:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Zl1lIFbrD2KneQAAMHmgww (envelope-from ); Fri, 18 Feb 2022 18:54:14 +0000 Message-ID: Date: Fri, 18 Feb 2022 19:54:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH] slab: remove __alloc_size attribute from __kmalloc_track_caller Content-Language: en-US To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable , Kees Cook , Daniel Micay , Nick Desaulniers , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Nathan Chancellor , linux-mm@kvack.org, llvm@lists.linux.dev References: <20220218131358.3032912-1-gregkh@linuxfoundation.org> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, 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 On 2/18/22 18:57, Greg Kroah-Hartman wrote: > On Fri, Feb 18, 2022 at 06:14:55PM +0100, Vlastimil Babka wrote: >> On 2/18/22 14:13, 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. >> >> Could we instead wrap it in some #ifdef that' only true for clang build? >> That would make the workaround more precise and self-documented. Even >> better if it can trigger using clang version range and once a fixed >> clang version is here, it can be updated to stay true for older clangs. > > It's not doing all that much good like this, let's just remove it for > now until it does actually provide a benifit and not just crash the box :) > > This is only 1 function, that is used in only a very small number of > callers. I do not think it will be missed. Fair enough, added to the slab tree: https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git/log/?h=for-5.17/fixup5 > thanks, > > greg k-h >