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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC354C433F5 for ; Fri, 18 Feb 2022 18:54:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5837B6B0074; Fri, 18 Feb 2022 13:54:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 50C906B0075; Fri, 18 Feb 2022 13:54:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 360276B0078; Fri, 18 Feb 2022 13:54:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0188.hostedemail.com [216.40.44.188]) by kanga.kvack.org (Postfix) with ESMTP id 2147D6B0074 for ; Fri, 18 Feb 2022 13:54:17 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D93CC8249980 for ; Fri, 18 Feb 2022 18:54:16 +0000 (UTC) X-FDA: 79156800912.13.556C9FF Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf29.hostedemail.com (Postfix) with ESMTP id 373FB120003 for ; Fri, 18 Feb 2022 18:54:16 +0000 (UTC) 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-Rspamd-Queue-Id: 373FB120003 X-Stat-Signature: f4pcwa3wi9hppr7s8rh9zu568c3zjtyr X-Rspam-User: Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=0jXyJ65e; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=80A1QJM3; dmarc=none; spf=pass (imf29.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Rspamd-Server: rspam03 X-HE-Tag: 1645210456-140176 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 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 >