lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231030113416.5208-1-jirislaby@kernel.org>
Date:   Mon, 30 Oct 2023 12:34:16 +0100
From:   "Jiri Slaby (SUSE)" <jirislaby@...nel.org>
To:     masahiroy@...nel.org
Cc:     linux-kernel@...r.kernel.org,
        "Jiri Slaby (SUSE)" <jirislaby@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>,
        linux-kbuild@...r.kernel.org, Naveen N Rao <naveen@...nel.org>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        Michael Ellerman <mpe@...erman.id.au>
Subject: [PATCH] kbuild: dummy-tools: pretend we understand -fpatchable-function-entry

Commit 0f71dcfb4aef (powerpc/ftrace: Add support for
-fpatchable-function-entry) added a script to check for
-fpatchable-function-entry compiler support. The script expects compiler
to emit the section __patchable_function_entries and few nops after a
function entry.

If the compiler understands and emits the above,
CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY is set.

So teach dummy-tools' gcc about this.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@...nel.org>
Cc: Masahiro Yamada <masahiroy@...nel.org>
Cc: Nathan Chancellor <nathan@...nel.org>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Nicolas Schier <nicolas@...sle.eu>
Cc: linux-kbuild@...r.kernel.org
Cc: Naveen N Rao <naveen@...nel.org>
Cc: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: Michael Ellerman <mpe@...erman.id.au>
---
 scripts/dummy-tools/gcc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/dummy-tools/gcc b/scripts/dummy-tools/gcc
index 07f6dc4c5cf6..e6c41427c02f 100755
--- a/scripts/dummy-tools/gcc
+++ b/scripts/dummy-tools/gcc
@@ -91,6 +91,16 @@ if arg_contain -S "$@"; then
 		fi
 		exit 0
 	fi
+
+	# For arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh
+	if arg_contain -m64 "$@" && arg_contain -fpatchable-function-entry=2 "$@"; then
+		echo "func:"
+		echo ".section __patchable_function_entries"
+		echo ".localentry"
+		echo "  nop"
+		echo "  nop"
+		exit 0
+	fi
 fi
 
 # To set GCC_PLUGINS
-- 
2.42.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ