From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96AA33451A3 for ; Tue, 9 Sep 2025 14:10:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757427012; cv=none; b=tcQNe6PXpQpqdJ65qPZPu26lX4Pzfmfp7xa+8MGOBBS7HlqbAZy2lgV/v7f4vSak7PjnB3mZBCkVXwrov1Tg890LHbmLiGWZiawKbY8VCAz8T9c7ZRL+++nTcp5nxRE2LYGgM+YCewSEGlMWIY00tzdJnjlA6Dbrd6vOxwoTbTc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757427012; c=relaxed/simple; bh=wZM0+a6+nk16KamsglrD/ys9d2i9gpD+owUrwmE0KxU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=AqrSTmX9myiu2Dk848b72+4rV5kYEEuZEW9eKMoqdB2aWb9E9wLP5GPVwcQr3UMn6Bd6m7iDa2XO+XqOdp7fYoSSQqspT7SCz3ynpWhciGw6AEoZh81Iq6q8cOCiFIo9Ne6pWSj8yyKl0ljeDc0fNheU6ppkK1JD/zrdFXMzuvQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ud8iRRoD; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WAVMpRvq; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ud8iRRoD"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WAVMpRvq" From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1757427003; 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: in-reply-to:in-reply-to:references:references; bh=xxlZqbqn4zYJfqeeyoY2e7WMGE7sNV1Z3HGfN5hxj3w=; b=ud8iRRoDSl3GkVwNttRRf9ic9Nhzb0igvrHkjCbQf3lMIythO/HXVfLhH2f27i7eiQ+A9I ffKptPHIreeT+DNWx33pyqJfhA3g1bvfApP2AOuWaqq/49nos4PpI7s+0pG4zRfXftJz+z 6uvDYT8vv1RP+sQscKYZYYu6T1EAfpRftfAhSOPp7YMK+U9PyKXmvdGoV2uboNNmQh+6TT kqnuRAMtBoH6KcQQvL3/dauF6uKoPunW5z1g4uQ1BS3kAvlPUriMRHrhPCLx7wL2q3diAp UEUwbOckLkyScrDtalCjhGgC1lPyG+ELIV4lAgQ1vhjH9Nn7VZXJZZkFu4oNCA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1757427003; 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: in-reply-to:in-reply-to:references:references; bh=xxlZqbqn4zYJfqeeyoY2e7WMGE7sNV1Z3HGfN5hxj3w=; b=WAVMpRvqEFEZUzgRHQJxRGAjTsJts9FgXg+PT5BCAN6UwRVHKF5NWsOJfQSf+HDgXdFPyo DJEIJ1asRakW5iDA== To: Mathieu Desnoyers , LKML Cc: Michael Jeanson , Jens Axboe , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Paolo Bonzini , Sean Christopherson , Wei Liu , Dexuan Cui , x86@kernel.org, Arnd Bergmann , Heiko Carstens , Christian Borntraeger , Sven Schnelle , Huacai Chen , Paul Walmsley , Palmer Dabbelt Subject: Re: [patch V4 12/36] entry: Inline irqentry_enter/exit_from/to_user_mode() In-Reply-To: <45ce1b35-76ee-41b8-9fd2-b3b0d8126bf1@efficios.com> References: <20250908212737.353775467@linutronix.de> <20250908212926.033244852@linutronix.de> <45ce1b35-76ee-41b8-9fd2-b3b0d8126bf1@efficios.com> Date: Tue, 09 Sep 2025 16:10:02 +0200 Message-ID: <87jz27vhs5.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, Sep 09 2025 at 09:38, Mathieu Desnoyers wrote: > On 2025-09-08 17:31, Thomas Gleixner wrote: >> There is no point to have this as a function which just inlines >> enter_from_user_mode(). The function call overhead is larger than the >> function itself. > > I'm wondering if there is a reason for making those actual functions and > not inlines. > > The functions sit in kernel/entry/common.c, which are built with > specific compiler flags in kernel/entry/Makefile: > > # Prevent the noinstr section from being pestered by sanitizer and other > goodies > # as long as these things cannot be disabled per function. > KASAN_SANITIZE := n > UBSAN_SANITIZE := n > KCOV_INSTRUMENT := n > > # Branch profiling isn't noinstr-safe > ccflags-$(CONFIG_TRACE_BRANCH_PROFILING) += -DDISABLE_BRANCH_PROFILING > > CFLAGS_REMOVE_common.o = -fstack-protector -fstack-protector-strong > CFLAGS_common.o += -fno-stack-protector > > So I wonder if we're not breaking something in the area of "noinstr" > tagging by inlining those into their caller ? No, because the call sites have to be non-instrumented as well.