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: <20240913230915.7pztbotrf7cpjp7a@treble>
Date: Fri, 13 Sep 2024 16:09:15 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Joe Lawrence <joe.lawrence@...hat.com>
Cc: live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
	x86@...nel.org, Miroslav Benes <mbenes@...e.cz>,
	Petr Mladek <pmladek@...e.com>, Jiri Kosina <jikos@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Marcos Paulo de Souza <mpdesouza@...e.com>,
	Song Liu <song@...nel.org>
Subject: Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

On Fri, Sep 13, 2024 at 10:39:18AM -0400, Joe Lawrence wrote:
> and now a happy kernel build and boot.

Thanks!

> A klp-build of the usual cmdline.patch succeeds, however it generates
> some strange relocations:
> 
>   Relocation section '.rela.text' at offset 0x238 contains 6 entries:
>       Offset             Info             Type               Symbol's Value  Symbol's Name + Addend
>   0000000000000016  0000004600000004 R_X86_64_PLT32         0000000000000000 __kmalloc_noprof - 4
>   0000000000000035  0000004e00000004 R_X86_64_PLT32         0000000000000000 __fentry__ - 4
>   000000000000003c  0000000000000000 R_X86_64_NONE                             -4
>   
>   Relocation section '.rela.klp.relocs' at offset 0x1168 contains 2 entries:
>       Offset             Info             Type               Symbol's Value  Symbol's Name + Addend
>   0000000000000000  0000000700000001 R_X86_64_64            0000000000000000 .text + 3c
>   0000000000000008  0000000000000001 R_X86_64_64                               -4
>   
>   Relocation section '.klp.rela.h..text' at offset 0x53f18 contains 1 entry: 
>       Offset             Info             Type               Symbol's Value  Symbol's Name + Addend
>   000000000000003c  0000000000000002 R_X86_64_PC32                             -4
> 
> No bueno.  FWIW, Song's 0001-test-klp.patch does seem to build w/o odd
> relocations and it loads fine.

Grr, I'm guessing more toolchain issues.  A lot of tools don't seem to
like klp relocs.

Do you happen to have BTF enabled?  I saw something similar with BTF and
had a fix in mind but I haven't had a chance to do it.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ