[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7afa22cbbb85481cbb3fabb09a58bd63@BJMBX01.spreadtrum.com>
Date: Thu, 17 Jul 2025 01:34:43 +0000
From: 刘海燕 (Haiyan Liu) <haiyan.liu@...soc.com>
To: Carlos Llamas <cmllamas@...gle.com>, Alice Ryhl <aliceryhl@...gle.com>,
Matthew Maurer <mmaurer@...gle.com>
CC: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Miguel Ojeda
<ojeda@...nel.org>,
周平 (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>,
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
> -----邮件原件-----
> 发件人: Carlos Llamas <cmllamas@...gle.com>
> 发送时间: 2025年7月17日 2:21
> 收件人: 刘海燕 (Haiyan Liu) <haiyan.liu@...soc.com>; Alice Ryhl <aliceryhl@...gle.com>; Matthew Maurer <mmaurer@...gle.com>
> 抄送: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>; Miguel Ojeda <ojeda@...nel.org>; 周平 (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>; 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 Wed, Jul 16, 2025 at 07:01:29AM +0000, 刘海燕 (Haiyan Liu) wrote:
> >
> >
> > > -----邮件原件-----
> > > 发件人: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
> > > 发送时间: 2025年7月16日 1:51
> > > 收件人: 刘海燕 (Haiyan Liu) <haiyan.liu@...soc.com>
> > > 抄送: Miguel Ojeda <ojeda@...nel.org>; 周平 (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 Tue, Jul 15, 2025 at 11:41 AM 刘海燕 (Haiyan Liu) <haiyan.liu@...soc.com> wrote:
> > > >
> > > > The commit changes the fragment and diff is:
> > >
> > > An Android engineer should know how to handle that, but if you are
> > > reporting upstream, it is best to try to reproduce the issue with the upstream kernels (e.g. arm64 is not in 6.6.y) and provide the full
> kernel config used.
> > >
> > > > Only two rust-related global variables in fmr.rs and layout.rs have this issue. Their asan.module_ctor complied binaries are wrong.
> > >
> > > I am not sure what you mean by `fmr.rs`. As for `layout.rs`, that is
> > > in the `kernel` crate in 6.12.y -- isn't there a single `asan.module_ctor` per TU? Which object file are you referring to? I get the pair for
> my `rust/kernel.o`.
> >
> > NSX:FFFFFFC0800A7C94|F800865E asan.module_ctor: str x30,[x18],#0x8 ; x30,[x18],#8
> > NSX:FFFFFFC0800A7C98|F81F0FFE str x30,[sp,#-0x10]! ; x30,[sp,#-16]!
> > NSX:FFFFFFC0800A7C9C|F00240A0 adrp x0,0xFFFFFFC0848BE000
> > NSX:FFFFFFC0800A7CA0|911D8000 add x0,x0,#0x760 ; x0,x0,#1888
> > NSX:FFFFFFC0800A7CA4|52803D61 mov w1,#0x1EB ; w1,#491
> > NSX:FFFFFFC0800A7CA8|94233816 bl 0xFFFFFFC080975D00 ; __asan_register_globals
> > NSX:FFFFFFC0800A7CAC|F84107FE ldr x30,[sp],#0x10 ; x30,[sp],#16
> > NSX:FFFFFFC0800A7CB0|D50323BF autiasp
> > NSX:FFFFFFC0800A7CB4|D65F03C0 ret
> > The first __asan_global struct value is
> > ENAXI:FFFFFFC0848BE760|>FFFFFFC082EDB180 000000000000005F ........_.......
> > ENAXI:FFFFFFC0848BE770| 0000000000000080 FFFFFFC0836DC431 ........1.m.....
> > ENAXI:FFFFFFC0848BE780| FFFFFFC082EEC780 0000000000000000 ................
> > ENAXI:FFFFFFC0848BE790| 0000000000000000 FFFFFFFFFFFFFFFF ................
> > The address of the global is 0xFFFFFFC082EDB180 which value is
> '/proc/self/cwd/prebuilts/rust/linux-x86/1.82.0/lib/rustlib/src/rust/library/core/src/num/fmt.rs' and its viewinfo is
> 'vmlinux\Global\__unnamed_357'
> > The original size of the global is 0x5F The name of the global is
> > kmalloc-2k The module name of the global is
> > 'core.27758904ccee4c80-cgu.o'
> >
> > NSX:FFFFFFC0800A7D4C|F800865E asan.mod.:str x30,[x18],#0x8 ; x30,[x18],#8
> > NSX:FFFFFFC0800A7D50|F81F0FFE str x30,[sp,#-0x10]! ; x30,[sp,#-16]!
> > NSX:FFFFFFC0800A7D54|F00240E0 adrp x0,0xFFFFFFC0848C6000
> > NSX:FFFFFFC0800A7D58|912E8000 add x0,x0,#0xBA0 ; x0,x0,#2976
> > NSX:FFFFFFC0800A7D5C|52800961 mov w1,#0x4B ; w1,#75
> > NSX:FFFFFFC0800A7D60|942337E8 bl 0xFFFFFFC080975D00 ; __asan_register_globals
> > NSX:FFFFFFC0800A7D64|F84107FE ldr x30,[sp],#0x10 ; x30,[sp],#16
> > NSX:FFFFFFC0800A7D68|D50323BF autiasp
> > NSX:FFFFFFC0800A7D6C|D65F03C0 ret
> > The second __asan_global struct value is
> > NSD:FFFFFFC0848C6BA0|>FFFFFFC082EECA80 0000000000000020 ........ .......
> > NSD:FFFFFFC0848C6BB0| 0000000000000040 FFFFFFC0836DC431 @.......1.m.....
> > NSD:FFFFFFC0848C6BC0| FFFFFFC082EEDA80 0000000000000000 ................
> > NSD:FFFFFFC0848C6BD0| 0000000000000000 FFFFFFFFFFFFFFFF ................
> > The address of the global is 0xFFFFFFC082EECA80 which value is 0 and its viewinfo is
> '<&usize_as_core::f..vmlinux\kernel_9a6cb9fd7c8dfd66_cgu\<&usize_as_core::fmt::Debug>::{vtable}'
> > The original size of the global is 0x20 The name of the global is
> > kmalloc-2k The module name of the global is
> > 'kernel.9a6cb9fd7c8dfd66-cgu.o'
> >
> > > Cheers,
> > > Miguel
>
> We have KASAN builds with android16-6.12 and haven't seen this issue.
> Can you share your entire config file, so we can try to reproduce?
The config file is included in the compressed file kernel_artifacts.tgz which can get from ' http://artifactory.unisoc.com/ui/native/VERIFY_ANDROID/1746740/PAC/sprdroid15_sys_dev_plus_sprdroid15_vnd_dev_plus_sprdlinux6.12_kernel_dev/ums9632_1h10_64only_k612-userdebug-gms/sprdlinux6.12_kernel_dev/ums9632_1h10_64only_k612-userdebug/' . The path is 'kernel_artifacts/ums9632_arm64_kernel6.12-userdebug/kernel'.
Can you get it?
> Cc: Alice Ryhl <aliceryhl@...gle.com>
> Cc: Matthew Maurer <mmaurer@...gle.com>
>
> Alice, Matthew, have you seen this before?
>
> --
> Carlos Llamas
Powered by blists - more mailing lists