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: <f1204327-9d67-4ca2-9f55-6777453173f6@gaisler.com>
Date: Fri, 29 Aug 2025 18:35:51 +0200
From: Andreas Larsson <andreas@...sler.com>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: Andy Lutomirski <luto@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
 Vincenzo Frascino <vincenzo.frascino@....com>, Arnd Bergmann
 <arnd@...db.de>, "David S. Miller" <davem@...emloft.net>,
 Nagarathnam Muthusamy <nagarathnam.muthusamy@...cle.com>,
 Nick Alcock <nick.alcock@...cle.com>, John Stultz <jstultz@...gle.com>,
 Stephen Boyd <sboyd@...nel.org>,
 John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
 linux-kernel@...r.kernel.org, sparclinux@...r.kernel.org
Subject: Re: [PATCH v2 08/13] sparc64: vdso: Switch to the generic vDSO
 library

On 2025-08-29 16:05, Thomas Weißschuh wrote:
> How are you currently building these kernels? Are you using the packaging
> from Debian and doing full rebuilds every time?

No, I cross build it separately with incremental builds for builtin stuff.
The modules are rebuilding every time however, I guess because I want to
have the git SHA in the version to not risk messing up which modules goes
with what kernel.

Then I scp over the image and modules and install in the Debian system.

> You can also build Debian binary packages directly from a git checkout with
> 'make bindeb-pkg'. This gives you nice incremental rebuilds.
> 
> Another hunk to test, to see from where the SIGSEGV comes from.
> 
> diff --git a/kernel/signal.c b/kernel/signal.c
> index e2c928de7d2c..0b2777e88f44 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -1299,6 +1299,9 @@ force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t,
>         struct k_sigaction *action;
>         int sig = info->si_signo;
>  
> +       if (unlikely(is_global_init(t)) && sig == SIGSEGV)
> +               panic("killing init");
> +
>         spin_lock_irqsave(&t->sighand->siglock, flags);
>         action = &t->sighand->action[sig-1];
>         ignored = action->sa.sa_handler == SIG_IGN;

This results in:

[    1.661344] Run /init as init process
[    1.663057] Kernel panic - not syncing: killing init
[    1.663077] CPU: 0 UID: 0 PID: 1 Comm: init Not tainted 6.17.0-rc1-00009-gc619bda6cd8d #10 VOLUNTARY 
[    1.663102] Call Trace:
[    1.663113] [<0000000000436524>] dump_stack+0x8/0x18
[    1.663138] [<00000000004291f4>] vpanic+0xdc/0x320
[    1.663160] [<000000000042945c>] panic+0x24/0x30
[    1.663176] [<0000000000493228>] force_sig_info_to_task+0x1e8/0x200
[    1.663198] [<0000000000493700>] force_sig_fault+0x40/0x60
[    1.663217] [<0000000000439e28>] sun4v_data_access_exception+0xa8/0x140
[    1.663236] [<00000000004066d4>] sun4v_dacc+0x28/0x34
[    1.663991] Press Stop-A (L1-A) from sun keyboard or send break
[    1.663991] twice on console to return to the boot prom
[    1.664010] ---[ end Kernel panic - not syncing: killing init ]---

> diff --git a/arch/sparc/vdso/vma.c b/arch/sparc/vdso/vma.c
> index 38a664d69782..efc3fef8f9bc 100644
> --- a/arch/sparc/vdso/vma.c
> +++ b/arch/sparc/vdso/vma.c
> @@ -25,7 +25,7 @@
>  #include <vdso/datapage.h>
>  #include <asm/vdso/vsyscall.h>
>  
> -unsigned int __read_mostly vdso_enabled = 1;
> +unsigned int __read_mostly vdso_enabled = 0;
>  
>  #ifdef CONFIG_SPARC64
>  static struct vm_special_mapping vdso_mapping64 = {

The analogue to this, booting with kernel parameter vdso=0,
makes the system boot fine.


> diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
> index 02ea19f67164..ae87888fef8a 100644
> --- a/lib/vdso/gettimeofday.c
> +++ b/lib/vdso/gettimeofday.c
> @@ -318,6 +318,8 @@ __cvdso_clock_gettime_common(const struct vdso_time_data *vd, clockid_t clock,
>         const struct vdso_clock *vc = vd->clock_data;
>         u32 msk;
>  
> +       return false;
> +
>         if (!vdso_clockid_valid(clock))
>                 return false;

This (independently) makes the system boot fine.


> diff --git a/arch/sparc/vdso/vdso.lds.S b/arch/sparc/vdso/vdso.lds.S
> index f3caa29a331c..a4669f7feada 100644
> --- a/arch/sparc/vdso/vdso.lds.S
> +++ b/arch/sparc/vdso/vdso.lds.S
> @@ -16,10 +16,7 @@
>  VERSION {
>         LINUX_2.6 {
>         global:
> -               clock_gettime;
> -               __vdso_clock_gettime;
> -               gettimeofday;
> -               __vdso_gettimeofday;
> +               __nothing;
>         local: *;
>         };
>  }

I have not tried this one yet.

Cheers,
Andreas


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ