Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp2417898pxb; Sat, 19 Feb 2022 10:43:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyfHhKfpmoxdhg83RRb51KU1AZyhzOJg6zaYKmLDtBRwawQYR7BnpP3Z8Jq3gSLgN8Kd/hV X-Received: by 2002:a05:6a00:27a7:b0:4e1:5cf4:2429 with SMTP id bd39-20020a056a0027a700b004e15cf42429mr13337111pfb.73.1645296204936; Sat, 19 Feb 2022 10:43:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645296204; cv=none; d=google.com; s=arc-20160816; b=h5ljrG4FDX+JXa5qvfI9l4+ll3ahPwRBUw1KAfIwsCuyNatufpdx+muKFAl9zfSSBy gVqQ6w46TGULnvBUV9sXAUTvN0J81gjb9msYd6Y35VNfzYjcXVDCehoNM7enOlo369Zz a46XRKZpsO93p9lNxhXGlpQ0VL/w1AEpgk3Q6pxIJQlDTPbPwZ1Vz/0pVpr7qiwe2oaR vd7hFWIvqMu9/peaANH/7OuaNPAtilrJQEd0ukqAB3OiY6oGsKSVXbZLuUDlrTRhcUEY Y5mlUH3iHU3SQuSBkBCUO2BP4pA0ksSRC0mY3I9ylor9yorvSBQpkZZJQgQIfj2tNS02 KNJA== 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=uGCS0UYt8K8gRePv/+754res+Cn7SDQG6Rq8RITfZfU=; b=TXe8xGRZCCC0GNL4wUtoPMNQhVgWNx2JzGVEbFGIwgHPbMo5+N5zmd6sxZdO8BnNAy l25RjSBvXxmCtoXIfqDnejwOWf6QuWnNfpanSu407mhHdvrJiU/sitY+Au6+t5XWl2Wz XUuLqu6AJYWkwvL1SSai5gKldQecO35iMbnFSTNINA551dWqdZnbQsTamLmu7ghb2qsW 6rUdHhTsB4Eo6F3s0i9AjVUqWykImimDS3MRrIRKlArT9LCx5oLb4HrDIqZbVJcrRURg Ny1JuQBndz8vTDIxIzHFK6wae8fxfU1A4jCAWeMI4EMdMd1YrLHsr9ik0Ttzf50g3wNv xabA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Z3JZA0jk; 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 p20si17658586plr.117.2022.02.19.10.43.09; Sat, 19 Feb 2022 10:43:24 -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=Z3JZA0jk; 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 S241623AbiBSHTg (ORCPT + 99 others); Sat, 19 Feb 2022 02:19:36 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:58364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbiBSHTd (ORCPT ); Sat, 19 Feb 2022 02:19:33 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F22AC5F25B; Fri, 18 Feb 2022 23:19:14 -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 284BEB827D4; Sat, 19 Feb 2022 07:19:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9CCAC004E1; Sat, 19 Feb 2022 07:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645255151; bh=5N9q8YGpLg7pzimVDpcpfsBGpCNjJr17vwBuSaeLOzg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z3JZA0jkkKEqYPSuaw6XQokUqkc1pHcCOFjSe3Kzf8MHcYJHvrHCzic06q6mfeKNR lYNN0vIvNCGoRQ8agRIGhqhtIq8cKGpX5vBVKgmd12VTQNL3YuMjIn2byIcjnmIoaX vkI2LkzgzqIRBlITVjf5gJrNpIwkHLga5cTH6DnY= Date: Sat, 19 Feb 2022 08:19:02 +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 07:54:14PM +0100, Vlastimil Babka wrote: > 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!