Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp87549pxb; Thu, 30 Sep 2021 01:35:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFS5tek3rTXrF1rjXstFlEeNRDk2xT245k63l1J7zhPB7Oh6/nWh4DlLlsBiS0jMWycASh X-Received: by 2002:a17:906:c7d0:: with SMTP id dc16mr5377874ejb.555.1632990902125; Thu, 30 Sep 2021 01:35:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632990902; cv=none; d=google.com; s=arc-20160816; b=QUdvD3T9HAp7oC/1mgVZor8yXT46NpOIyK7gaLlG2RgrL0kiZWAE0FYEwRq6LS+2iE 1WVQx4Wkg0hcKlhu5iI2zcoBGzY9TfmiHPTa7gjviD17s5zZfnB4YgzsDWg1RfngEv8C Z/qx0sWUiPse0X9beDp4sraGHYqxbbZj43byZ5AACaULGA7ZnJa2hUTPRvNvL0Ya3Wi3 0/BxJqzJSlgXJFbZdQUUGkR36flLGpby1d5ZI3ZEXQssNJbgW0mIVEK7NAJrSjLt0QDB 3KjE1wY5QEL9xL2Msyfj2EvcaEbNx0hnBatdjE96BI4a6Z5UmudPmZirFUhNliNQv+/x CG6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=rngmrucDKKX7vdIHXqMF2aFdczPuqoVJOJOEzSi6QbY=; b=M003Nc0OIkEK5hwGEsASe+sD4fbna01vWQ1M/6x+OqfzDZYZ3/mvYIT91RVts5M469 o8VxmfstKHzE5FyFWDDdO56BYrDEG0Xpig7HyXlrMJinOcZlO4wiNo/uZTKOK1Bhk65/ hCKQDlYx8ALxppD0LfD+WzZDJsdDyIvYRDQI0PETeK+no/2xhhHFpCsUuRTQl3cTFaJU w58pAX/HlskAzfZPvCttGWzGuqf/REfOnSypWQIMN7PlMWRfI92ij8YisU+dH6f2PHX6 +UGzImiHCwA+kxnX1rAKnHWpO5ZCLZIh4rn5qy8/66zGENfmcQI57tRNgAbZAPbxSCyb H/FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=iNpcZg4F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x13si3565747edd.531.2021.09.30.01.34.34; Thu, 30 Sep 2021 01:35:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=iNpcZg4F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349002AbhI3IP3 (ORCPT + 99 others); Thu, 30 Sep 2021 04:15:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348866AbhI3IP2 (ORCPT ); Thu, 30 Sep 2021 04:15:28 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0762CC06176D for ; Thu, 30 Sep 2021 01:13:46 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id i4so22010479lfv.4 for ; Thu, 30 Sep 2021 01:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rngmrucDKKX7vdIHXqMF2aFdczPuqoVJOJOEzSi6QbY=; b=iNpcZg4FJSl/E0D91jTLYN066/g4fht1tZDk+kVvvvC7m46uhYrADY0r2LKAGRpsvC eMq9NuvIAdmLDYXSKlH8gq0n7rin832Urmt2vVm4t69SGxz4h7WuoI7te1dYuO7XqSIL XIpEflqiahGNwxX+hyvImbJ2T6Wrr2CE9nk5w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rngmrucDKKX7vdIHXqMF2aFdczPuqoVJOJOEzSi6QbY=; b=NRz5wKlov95iWgRm9PRduWbrvGSJ3Pl8Yli52J7FigSAXjByoWnxwNxVSGTKxWgM8c k2kYPc/qCQW/Vs8xxLhbUrKOiPvrrAE71ZGAhTTc8LnjsZIKrmggDR4/nCPyEdTmqqQQ xPueswNN2GTxQadffH1kXW/VDpcLDBlhGr7LDVirLgH/R85907oAvgQJBcGMtbnL/TKD e1ztMmpuWaBR49WFxjXg5GWeKp/I9RoUwEH9UbUzdjod4MF9epGmewdGvObldmwFgKFo v+vMg270Ma/ck+VrJVm/j6JvxBRTTgSdnO7Zw8xzcl2uMzenpQQbLSRwSRB5yEOOVtPS FcrA== X-Gm-Message-State: AOAM5324jpELuBvRPwZBg8FN7UM15TLS4O/v3SK03TnwN5QPuR7xc9RO Tgk3pO25GDmTNnVlNAEM4qZ26Q== X-Received: by 2002:a2e:8eda:: with SMTP id e26mr4699363ljl.266.1632989624326; Thu, 30 Sep 2021 01:13:44 -0700 (PDT) Received: from [172.16.11.1] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id s2sm259046lji.1.2021.09.30.01.13.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Sep 2021 01:13:43 -0700 (PDT) Subject: Re: [PATCH] modpost: add allow list for llvm IPSCCP To: Nick Desaulniers , Linus Torvalds Cc: Masahiro Yamada , Arnd Bergmann , Kees Cook , Nathan Chancellor , Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List , llvm@lists.linux.dev References: <20210929225850.3889950-1-ndesaulniers@google.com> From: Rasmus Villemoes Message-ID: <77204240-ef3a-d72c-dfe1-d8a47de5329b@rasmusvillemoes.dk> Date: Thu, 30 Sep 2021 10:13:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/09/2021 02.18, Nick Desaulniers wrote: > On Wed, Sep 29, 2021 at 4:28 PM Linus Torvalds > wrote: >> > Though for the defconfig case...somehow the cost is more than with the > sanitizers... > > arch/x86/mm/amdtopology.c:157:7: remark: '__nodes_weight' not inlined > into 'amd_numa_init' because too costly to inline (cost=930, > threshold=45) [-Rpass-missed=inline] > if (!nodes_weight(numa_nodes_parsed)) > ^ > > Looking at the output of `make LLVM=1 -j72 > arch/x86/mm/amdtopology.ll`, @__nodes_weight is just some inline asm > (.altinstructions). I wonder if I need to teach the cost model about > `asm inline`... Remind me, does clang understand 'asm inline("foo")'? Regardless, it seems that the asm (ALTERNATIVE("call __sw_hweight32", ... asm (ALTERNATIVE("call __sw_hweight64", ... in arch/x86/include/asm/arch_hweight.h could/should be made asm_inline at least for gcc's sake. Somewhat related: I really think we should remove __cold from the definition of __init: It hurts boot time (on a simple board with quite reproducible boot timing I measured 1-3% some time ago), and it is likely at least partially responsible for the never-ending tsunami of functions-that-obviously-should-have-been-inlined(TM) but were not because the caller is being optimized for size. Whatever small cost in extra .text is reclaimed after init - and those who are concerned about the size of the kernel image itself probably build with CONFIG_OPTIMIZE_FOR_SIZE=y, and I see no change in such an image whether __init includes __cold or not. Rasmus