Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5015476pxb; Sun, 6 Feb 2022 10:39:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/LDKrj3T9kNL4LlHVmi6J5Rll8T7LGANCN/l+2e5K9owpAw+qVzOYuRGhUrQZU1ssZY8y X-Received: by 2002:a05:6402:370:: with SMTP id s16mr3478539edw.63.1644172770597; Sun, 06 Feb 2022 10:39:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644172770; cv=none; d=google.com; s=arc-20160816; b=fEiGvP0XDq/TWLWb474W46JFHidkSG5KgqdZKCtnnE39HlVaxW7YoGIWIafJDb6mLW e+EJlptw0vVAFLxWidxen9CpRu00YmuLYp4ngG9pGLs6D2XV/QG6F0sEiDKX/Ir+a1g2 gE9c70MoL4WCam1WqptdXp4wfIlYt99Sqe2DHr7cTdFZl02RsfHK0VQQU+mWqds9lu9Z NUNtFnlxOFuHxkfwEAZ1jkWB4vLNw5KrjfO5Qht1MYZ/Ixu5GKfPkBIR6z3FcxUKjcpQ QYH1leQyPHRXp2psXIaGDTKFDNnDCCCNdSm5u6MLoir+sYAnHP1xNF/bocmLFzFNAqCN Mrtw== 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=zPjQk2oTUAdLC1hsrbWamxWCeuB49O+XDJ3i6CqTVNA=; b=XkMLhfSSD4hyEH5vsYcANrkrHIpbv3HwPWvOojpfcv/jvkhWrNUYxQc2K2THpL4U7X xcsjHZTmnU9WZOcyAGwf24CyLteawXqjTOQ5IvBoXl2Mdi4AxylOKtsEXGwJoSZ14X4Y ad7SuOAbtTR/tkDXZzWzT7gH6QoKEXgZz3i0DHATA7qgw5Fm8fqdNs40LqDN+7ygwh1R 834PTUXgZxCD2xjlwRwFfjjBloHTiKMPXGHxKXF3lXVgypm96MnhONygIGEEUk3wLpKF oYP0efrcHKXShMUNtUvgE3bqzcrV0BGYaTj1+KSY48krio7Nq+vDUr1HiYc15Hb4+OtA cDRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=BCIXAi0H; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kx3si6657919ejc.840.2022.02.06.10.38.53; Sun, 06 Feb 2022 10:39:30 -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=@alien8.de header.s=dkim header.b=BCIXAi0H; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352664AbiBDOsv (ORCPT + 99 others); Fri, 4 Feb 2022 09:48:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbiBDOsu (ORCPT ); Fri, 4 Feb 2022 09:48:50 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C5F4C061714 for ; Fri, 4 Feb 2022 06:48:50 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id EEE1E1EC064D; Fri, 4 Feb 2022 15:48:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1643986125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=zPjQk2oTUAdLC1hsrbWamxWCeuB49O+XDJ3i6CqTVNA=; b=BCIXAi0HLfDdLqvmDTDTLBY7iCHVhNJ2JtrFZJN8wmB2kceAtqYSt0QCfMZvJgZrRIA8Lp vuh1BDmh9CwhxEcujFTgMqmxdcdNHxPrxnzwsahnyEQc7nGpY+WbDa68nZMmqWW3ri6PKS qBXYMNIGAybppJk5/hqREIF84PqRmx0= Date: Fri, 4 Feb 2022 15:48:40 +0100 From: Borislav Petkov To: Marco Elver Cc: Tony Luck , Jakub Kicinski , Linus Torvalds , X86 ML , LKML Subject: Re: [PATCH 0/3] x86/mce: Fix more noinstr fun Message-ID: References: <20220204083015.17317-1-bp@alien8.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 04, 2022 at 12:24:00PM +0100, Marco Elver wrote: > I guess to solve noinstr "calling" something else the only solution is > to make the other function noinstr as well, or __always_inline. > > Have you considered making some of these other functions 'noinstr' as > well? I guess __always_inline works, esp. if there's just 1 caller. > And by the looks of it you're getting a net .text reduction, so Yeah, I started doing that and the savings were the persuasive argument. Even more so if the function has one caller only and gets inlined, normally. I guess it doesn't get inlined when there's KASAN instrumentation or so but I haven't verified it fully why. Because even for oneliners like v8086_mode() which should get inlined trivially, the compiler ends up doing this constprop thing - I guess some constants folding optimization thing... it probably doesn't even matter so much whether oneliners get inlined in KASAN-enabled builds so I guess we might just as well force-inline them for the other configs. > Acked-by: Marco Elver Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette