Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1691422pxb; Fri, 18 Feb 2022 13:16:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxb5LN3eL0g1sUyR/pn0Jn/0woGc4PYDTzwStnaloiCDxc+vhL+BQKtHNTKlLNrMcmhDp34 X-Received: by 2002:a17:902:bc83:b0:149:b26a:b9c8 with SMTP id bb3-20020a170902bc8300b00149b26ab9c8mr8946117plb.143.1645218999246; Fri, 18 Feb 2022 13:16:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645218999; cv=none; d=google.com; s=arc-20160816; b=U+t5FrDvgE19gjhRgh5ZtSuuCDNaE6ra4h2WNnqejfEjGJvHdmNYw24jCUn9gWsqaq vZx1iwTfwJGVP5nVGAFCcf3qod4q5DQmERIqzp6PApBVSxDy1YPFpt8MCc5nzOih8hAW 37Mh8qePKd8YeHuAXnJAr7hew0rzHiSerBSU2Dg89hdAqYDOm8p+zH0ITYJnVbWOUkMf 9VcygPSk9Efk/B5Xu/pGghW77HoMnGk6WekEfdjsOgfudL2qt1UFcrpU0pUjj4Gzo6dO dPzD1KRFI1I2ltYr9aMcPApchA3plbWcK/M5T8Hv0A3GuFC1BM96ekqMNyklfsx3fIMz d1BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+C0G4diR6a6qV/O4VnpDKSZUBDnEhrBpuYshIBqlaN8=; b=1Ds3UPUGe2+ZI/8qa1PhjPWCvZVnEZCXV7ctxH7CWrHtA5TWMHoVOXzGKAseVo2MG/ jyZIZigxnmFrX1FR7nJDAlZCy1nH735x9Ov+cuLIlPkAnvtDH5KrVEmH//mLZvo9vQd1 D0NwDt+YEBtsPMz+zcfixMMvUoGXdqZqRoxJtIOIl/gvlZQrru0Ur3CNaHAV6Y1oyOr0 44OENqEbsCZiXNZcreSlAsXhXK7NIaoAEmYLpcR045LMpazF0RxxcegVgWHvG4j+9Lwy oMZLtl+6ctZb/p4TcpM1wjmfmqcdPdMMNEHt6F4e6acHXbmYt3FwW7YXYo0Y5t7SyoiM HTZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QvDPAbFj; 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 f9si11859722pgc.444.2022.02.18.13.16.23; Fri, 18 Feb 2022 13:16:39 -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=QvDPAbFj; 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 S238859AbiBRR6K (ORCPT + 99 others); Fri, 18 Feb 2022 12:58:10 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237328AbiBRR6J (ORCPT ); Fri, 18 Feb 2022 12:58:09 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9931103E; Fri, 18 Feb 2022 09:57:52 -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 ams.source.kernel.org (Postfix) with ESMTPS id 6D6D2B826A7; Fri, 18 Feb 2022 17:57:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75124C340E9; Fri, 18 Feb 2022 17:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645207070; bh=dP5b+VA+uAx3bJhnVmVq20KQ+X+9Cy6qAmDwVZSVETA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QvDPAbFjC/4BDN5N4QWsBAXqH2By2fN9OfvYaiEa2EMGl4mymWW8xR+qlQyNEIuA8 TPqKYelwYUzcA6s0HPFMHH/nhichKTgj+hHrBc37kVQaDoNGGuLZTVgIDxzZ9up4Nv 3l394mt2DHKY8m9e4DnwbzD5MGioZ5eock/RE5GY= Date: Fri, 18 Feb 2022 18:57:47 +0100 From: Greg Kroah-Hartman To: Vlastimil Babka 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 Subject: Re: [PATCH] slab: remove __alloc_size attribute from __kmalloc_track_caller Message-ID: References: <20220218131358.3032912-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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. thanks, greg k-h