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-next>] [day] [month] [year] [list]
Message-ID: <c34f4f606eb04c38b64e8f3a658cd051@BJMBX01.spreadtrum.com>
Date: Tue, 15 Jul 2025 09:40:30 +0000
From: 刘海燕 (Haiyan Liu) <haiyan.liu@...soc.com>
To: Miguel Ojeda <ojeda@...nel.org>
CC: 周平 (Ping Zhou/9032) <Ping.Zhou1@...soc.com>,
        代子为 (Ziwei Dai) <Ziwei.Dai@...soc.com>,
        杨丽娜 (Lina Yang) <lina.yang@...soc.com>,
        "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        "rust-for-linux@...r.kernel.org"
	<rust-for-linux@...r.kernel.org>,
        王双 (Shuang Wang)
	<shuang.wang@...soc.com>,
        Andrey Ryabinin <ryabinin.a.a@...il.com>,
        "Alexander Potapenko" <glider@...gle.com>,
        Andrey Konovalov
	<andreyknvl@...il.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Vincenzo Frascino
	<vincenzo.frascino@....com>,
        "kasan-dev@...glegroups.com"
	<kasan-dev@...glegroups.com>,
        Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>,
        Arve Hjønnevåg
	<arve@...roid.com>,
        Todd Kjos <tkjos@...roid.com>, Martijn Coenen
	<maco@...roid.com>,
        Joel Fernandes <joelagnelf@...dia.com>,
        Christian Brauner
	<christian@...uner.io>,
        Carlos Llamas <cmllamas@...gle.com>,
        "Suren
 Baghdasaryan" <surenb@...gle.com>,
        Jamie Cunliffe <Jamie.Cunliffe@....com>,
        Catalin Marinas <catalin.marinas@....com>
Subject: 答复: Meet compiled kernel binaray abnormal issue while enabling generic kasan in kernel 6.12 with some default KBUILD_RUSTFLAGS on



> -----邮件原件-----
> 发件人: Miguel Ojeda <ojeda@...nel.org>
> 发送时间: 2025年7月15日 4:05
> 收件人: 刘海燕 (Haiyan Liu) <haiyan.liu@...soc.com>
> 抄送: 周平 (Ping Zhou/9032) <Ping.Zhou1@...soc.com>; 代子为 (Ziwei Dai) <Ziwei.Dai@...soc.com>; 杨丽娜 (Lina Yang)
> <lina.yang@...soc.com>; linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; rust-for-linux@...r.kernel.org; 王双
> (Shuang Wang) <shuang.wang@...soc.com>; Andrey Ryabinin <ryabinin.a.a@...il.com>; Alexander Potapenko <glider@...gle.com>;
> Andrey Konovalov <andreyknvl@...il.com>; Dmitry Vyukov <dvyukov@...gle.com>; Vincenzo Frascino <vincenzo.frascino@....com>;
> kasan-dev@...glegroups.com; Greg Kroah-Hartman <gregkh@...uxfoundation.org>; Arve Hjønnevåg <arve@...roid.com>; Todd Kjos
> <tkjos@...roid.com>; Martijn Coenen <maco@...roid.com>; Joel Fernandes <joelagnelf@...dia.com>; Christian Brauner
> <christian@...uner.io>; Carlos Llamas <cmllamas@...gle.com>; Suren Baghdasaryan <surenb@...gle.com>; Jamie Cunliffe
> <Jamie.Cunliffe@....com>; Catalin Marinas <catalin.marinas@....com>
> 主题: Re: Meet compiled kernel binaray abnormal issue while enabling generic kasan in kernel 6.12 with some default KBUILD_RUSTFLAGS
> on
> 
> 
> 注意: 这封邮件来自于外部。除非你确定邮件内容安全,否则不要点击任何链接和附件。
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender
> and know the content is safe.
> 
> 
> 
> On Mon, 14 Jul 2025 03:12:33 +0000 "刘海燕 (Haiyan Liu)" <haiyan.liu@...soc.com> wrote:
> >
> > After I delete the rust build flags, the asan.module_ctor binary is right and kasan feature works fine.Could you help check why
> KBUILD_RUSTFLAGS impacts kernel complication with kasan feature enabled and how can this issue fixed?
> 
> I assume Rust is enabled in that kernel, right? Or do you mean that somehow removing those lines from the `Makefile` makes the issue go
> away even if Rust is not enabled?
 
Rust is enabled in kernel, and rustc version is 1.82.0. I want to know why the pacisap/autiasp are not in pair.

> Could you please share your kernel commit and the full configuration? From a quick build arm64 KASAN in v6.12.38, I see the
> `paciasp`/`autiasp` pair in one of the Rust object files:

The commit changes the fragment and diff is:
+CONFIG_CMDLINE="stack_depot_disable=off kasan.stacktrace=on kasan.fault=panic kvm-arm.mode=protected cgroup_disable=pressure"
+CONFIG_KASAN_GENERIC=y
Only two rust-related global variables in fmr.rs and layout.rs have this issue. Their asan.module_ctor complied binaries are wrong.

>     0000000000000000 <asan.module_ctor>:
>            0: d503233f          paciasp
>            4: f81f0ffe          str     x30, [sp, #-0x10]!
>            8: 90000000          adrp    x0, 0x0 <asan.module_ctor>
>            c: 91000000          add     x0, x0, #0x0
>           10: 52800601          mov     w1, #0x30               // =48
>           14: 94000000          bl      0x14 <asan.module_ctor+0x14>
>           18: f84107fe          ldr     x30, [sp], #0x10
>           1c: d50323bf          autiasp
>           20: d65f03c0          ret
> 
> But I am definitely not an expert at all in this, so Cc'ing KASAN and Android maintainers:
> https://lore.kernel.org/rust-for-linux/4c459085b9ae42bdbf99b6014952b965@BJMBX01.spreadtrum.com/
> 
> Cheers,
> Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ