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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZOOLIsVkwk40X_Ex@FVFF77S0Q05N>
Date:   Mon, 21 Aug 2023 17:04:50 +0100
From:   Mark Rutland <mark.rutland@....com>
To:     Florent Revest <revest@...omium.org>
Cc:     "GONG, Ruiqi" <gongruiqi@...weicloud.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
        gongruiqi1@...wei.com
Subject: Re: [PATCH] samples: ftrace: replace bti assembly with hint for
 older compiler

On Mon, Aug 21, 2023 at 05:41:21PM +0200, Florent Revest wrote:
> On Sun, Aug 20, 2023 at 1:10 PM GONG, Ruiqi <gongruiqi@...weicloud.com> wrote:
> >
> > When cross-building the arm64 kernel with allmodconfig using GCC 9.4,
> > the following error occurs on multiple files under samples/ftrace/:
> >
> > /tmp/ccPC1ODs.s: Assembler messages:
> > /tmp/ccPC1ODs.s:8: Error: selected processor does not support `bti c'
> >
> > Fix this issue by replacing `bti c` with `hint 34`, which is compatible
> > for the older compiler.
> 
> I see this hint is already used in
> tools/testing/selftests/arm64/fp/rdvl.S but I'm curious why it isn't
> used in other parts of the kernel like
> arch/arm64/kernel/entry-ftrace.S or
> tools/testing/selftests/arm64/bti/syscall.S

For assembly files, the macro in arch/arm64/include/asm/assembler.h handles
this automatically. See commit:

  9be34be87cc8d1af ("arm64: Add macro version of the BTI instruction")

For inline asembly, we need to explicitly instantiate all of that in the inline
asm block, and since clang treats each asm block independently, we can'y just
define that in one place in a header somewhere.

I'll reply to the patch in a sec...

Mark.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ