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] [day] [month] [year] [list]
Message-ID: <CAK7LNAT84K0RgDfLoOOLjtyCqsS19bASXRv43HF8P=C9obJPVA@mail.gmail.com>
Date: Tue, 3 Sep 2024 18:28:57 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Vegard Nossum <vegard.nossum@...cle.com>
Cc: Michael Ellerman <mpe@...erman.id.au>, linux-kbuild@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, 
	linux-omap@...r.kernel.org, kvmarm@...ts.linux.dev, kvm@...r.kernel.org, 
	linux-um@...ts.infradead.org, bpf@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] kbuild: use objcopy to generate asm-offsets

On Tue, Sep 3, 2024 at 4:21 PM Vegard Nossum <vegard.nossum@...cle.com> wrote:
>
>
> On 03/09/2024 01:45, Michael Ellerman wrote:
> > Vegard Nossum <vegard.nossum@...cle.com> writes:
> >> Remove the sed script and compile the C source listing structs and
> >> offsets to an object file (instead of assembly code) that embeds C source
> >> directly. Then extract the C source using objcopy.
> >>
> >
> > I threw some builders at this and hit a few errors:
>
> Thanks, I also got the ones from kernel test robot and figured something
> was going a bit wrong.
>
> There are several issues: clang wants - instead of /dev/stdout as an
> argument to objcopy, and then gcc has some bugs that prevent the numbers
> from appearing correctly on some architectures, also I had an extra # in
> the COMMENT() macro which only resulted in an error on some
> architectures. I've attached a tentative v2 that fixes these issues, but
> I'm still trying to figure out why m68k is giving me slightly different
> output for include/generated/asm-offsets.h and why the arc assembler
> fails.
>
> In the end I'm wondering if this patch is really worth it, given all the
> failures and little workarounds :-| If I can sort out the last few
> failures I'll submit it as an RFC.

This patch has zero benefit.

The current way (preprocess + sed) is faster than
your way (preprocess + compile + objcopy) and works
independently of tool quirks.








--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ