From nobody Sun Feb 8 17:04:27 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 96EC41D6C41; Tue, 3 Sep 2024 04:00:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725336041; cv=none; b=D8+n/OPVJa0u+iBcBWhkRb2iOUKDSCh8c6DZgwHCNiWe7gV6rOHQ9dPwWY5qlcSZ6qnHsBnYOnro0lbY1IV2Q/M6wUmRjKDY3oxQ5FVOizTqosjoCS92W/uhmiA9bHuhRZcmi2RhPiVES0GIdwXQvEaiCaUvc78zkZ06Uig1qwg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725336041; c=relaxed/simple; bh=XXdyiXX1GCdB3j+QVtVXuuqcqiTXMHJpdUI+rw+aD2A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Sn2XxXdbx5xzpvwcl7XjaTUkJ++ITqAooEL2/1BPoMZWazFfEn3Mrs8d1OOAnslrQgy4YeS1be77zo/vRt7Uvt1hEg28l3lMsTTr8b73F9W3oVW+Rotl3p7dvTUIS3Jz2v5Bu6xcbnAJ3D3381B74Z0mrg4QZIOQIQGyBFjw/uQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nOZ/0hSz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nOZ/0hSz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20D38C4CEC7; Tue, 3 Sep 2024 04:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725336041; bh=XXdyiXX1GCdB3j+QVtVXuuqcqiTXMHJpdUI+rw+aD2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nOZ/0hSzrhoDJ1VxreT/niydB1BKi8c0ddJX2Q5wgb2YqQa3bl/5Oytkyz/uXv05r P5jFSjUUNAg2xJUmWvnU+gGet5QfcA2DuYhqp1XZpcP5tKXEaR6oWaPG4BjWfJdOFB qOU+V21nyr0Rk7W2gKCrJu0mv+Nl5XCt0uM5abFcMG7U3lHK9NFWzwzCesS3ej/Bnd ntoS5iTJsYfu9iLgRPJqmRU+Cr1cLdi/aQxFUwV0upWhy3umvurRrZb9EeT3faOUe4 5wNwdJAxL/0u3c6aSx7Oj6GD8GAUoMuCkkEtuBOanFvGT4gD+WVzh8RvcPu8L2rj0u dHhnyM2u15Ljw== From: Josh Poimboeuf To: live-patching@vger.kernel.org Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Miroslav Benes , Petr Mladek , Joe Lawrence , Jiri Kosina , Peter Zijlstra , Marcos Paulo de Souza , Song Liu Subject: [RFC 24/31] objtool: Make STACK_FRAME_NON_STANDARD consistent Date: Mon, 2 Sep 2024 21:00:07 -0700 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The C version of STACK_FRAME_NON_STANDARD differs from its asm counterpart: - it uses an 8-byte entry (vs 4-byte) - it creates a superfluous temporary variable Make it identical to the asm version. Signed-off-by: Josh Poimboeuf --- include/linux/objtool.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/objtool.h b/include/linux/objtool.h index b3b8d3dab52d..5e66b6d26df5 100644 --- a/include/linux/objtool.h +++ b/include/linux/objtool.h @@ -30,9 +30,10 @@ * * For more information, see tools/objtool/Documentation/objtool.txt. */ -#define STACK_FRAME_NON_STANDARD(func) \ - static void __used __section(".discard.func_stack_frame_non_standard") \ - *__func_stack_frame_non_standard_##func =3D func +#define STACK_FRAME_NON_STANDARD(func) \ + asm(".pushsection .discard.func_stack_frame_non_standard, \"aw\"\n\t" \ + ".long " __stringify(func) " - .\n\t" \ + ".popsection") =20 /* * STACK_FRAME_NON_STANDARD_FP() is a frame-pointer-specific function igno= re --=20 2.45.2