[PATCH] ARM: kprobes: rewrite in UAL

Nick Desaulniers ndesaulniers at google.com
Thu Jan 28 13:59:05 EST 2021


On Thu, Jan 28, 2021 at 8:15 AM Arnd Bergmann <arnd at kernel.org> wrote:
>
> On Thu, Jan 28, 2021 at 5:44 AM 'Nick Desaulniers' via Clang Built
> Linux <clang-built-linux at googlegroups.com> wrote:
> >
> > Clang's integrated assembler only accepts UAL syntax, rewrite the
> > instructions that were changed by RVCTv2.1.
> >
> > The document "Assembly language changes after RVCTv2.1" was very
> > helpful.
> >
> > This exposed a bug in Clang's integrated assembler, which hopefully will
> > land in clang-12, but is required to test this patch with LLVM_IAS=1.
> >
> > Link: https://developer.arm.com/documentation/dui0473/c/writing-arm-assembly-language/assembly-language-changes-after-rvctv2-1
> > Link: https://github.com/ClangBuiltLinux/linux/issues/1271
> > Link: https://reviews.llvm.org/D95586
> > Reported-by: Arnd Bergmann <arnd at arndb.de>
> > Signed-off-by: Nick Desaulniers <ndesaulniers at google.com>
> > ---
> >  arch/arm/probes/kprobes/test-arm.c | 288 ++++++++++++++---------------
> >  1 file changed, 144 insertions(+), 144 deletions(-)
>
> This mostly works, but I see one extra case in some configurations:
>
>
> <inline asm>:20:5: note: instantiated into assembly here
>         1:      swpvsb  r0, r1, [sp]
>                 ^~~~~~

Thanks, I was able to repro with at91_dt_defconfig + Kprobes.

> Plus a lot of extra errors when building with CONFIG_THUMB2_KERNEL,
> as that uses tests in arch/arm/probes/kprobes/test-thumb.c.

Technically, that's a distinctly separate issue;
arch/arm/probes/kprobes/test-arm.c is not built with
CONFIG_THUMB2_KERNEL=y.  This patch doesn't introduce those warnings;
that file has the same issue but it is separate from test-arm.c.

Would you prefer to see a v2 with the swpvsb fix contain fixes for
test-thumb.c as well, or a separate patch for that?
-- 
Thanks,
~Nick Desaulniers



More information about the linux-arm-kernel mailing list