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: <CAPhsuW6dxPtgqZaHrZEVhQXwm2+sETreZnGybZXVKYKfG9H6tg@mail.gmail.com>
Date: Fri, 14 Feb 2025 09:51:41 -0800
From: Song Liu <song@...nel.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: Puranjay Mohan <puranjay@...nel.org>, Weinan Liu <wnliu@...gle.com>, 
	Steven Rostedt <rostedt@...dmis.org>, Indu Bhagat <indu.bhagat@...cle.com>, 
	Peter Zijlstra <peterz@...radead.org>, Mark Rutland <mark.rutland@....com>, roman.gushchin@...ux.dev, 
	Will Deacon <will@...nel.org>, Ian Rogers <irogers@...gle.com>, linux-toolchains@...r.kernel.org, 
	linux-kernel@...r.kernel.org, live-patching@...r.kernel.org, 
	joe.lawrence@...hat.com, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

On Fri, Feb 14, 2025 at 12:08 AM Josh Poimboeuf <jpoimboe@...nel.org> wrote:
>
> On Thu, Feb 13, 2025 at 11:40:43AM -0800, Song Liu wrote:
> > Yeah, objdump does show the same disassembly. However, if
> > I open the file with gdb, and do "disassemble copy_process",
> > the one in livepatch-special-static.o looks very weird.
>
> The symbol table looks ok.  I'm not sure why gdb is getting confused,
> but that could possibly be a red herring.  Maybe it doesn't like the
> -ffunction-sections for some reason.
>
> It's really weird the function length reported by kallsyms is so wrong.
> Can you share the .ko?

Attached is the .ko file.

>
> The refcount warning might indicate it's passing some bogus memory to
> tty_kref_get().  Any chance you have struct randomization enabled?

No, struct randomization is disabled.

> Are you sure there's no code or .config mismatch between the built
> kernel and the running kernel?

The test is done in a vm, so the .config used to build the livepatch is
exactly the same as the testing kernel .

>
> Ignorant arm64 question: is the module's text further away from slab
> memory than vmlinux text, thus requiring a different instruction (or
> GOT/TOC) to access memory further away in the address space?

It appears to me the module text is very close to vmlinux text:

vmlinux: ffff8000800b4b68 T copy_process
module: ffff80007b0f06d0 t copy_process [livepatch_always_inline_special_static]

I run tests with CONFIG_PAGE_SIZE_64KB=y.

Thanks,
Song

Download attachment "livepatch-special-static.ko" of type "application/octet-stream" (1550608 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ