[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250829185830-be502aa8-0f00-46b7-90fe-2d3cf3f1e7af@linutronix.de>
Date: Fri, 29 Aug 2025 19:07:54 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Andreas Larsson <andreas@...sler.com>
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 Fri, Aug 29, 2025 at 06:35:51PM +0200, Andreas Larsson wrote:
> 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.
Ack.
> > 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 ]---
What does this do?
diff --git a/kernel/signal.c b/kernel/signal.c
index e2c928de7d2c..6ae7afae948c 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1299,6 +1299,11 @@ 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, sig=%d errno=%d code=%d addr=%d vdso=%px",
+ info->si_signo, info->si_errno, info->si_code, info->si_addr,
+ t->mm->context.vdso);
+
spin_lock_irqsave(&t->sighand->siglock, flags);
action = &t->sighand->action[sig-1];
ignored = action->sa.sa_handler == SIG_IGN;
(...)
> > 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.
If the above works, then this one is not necessary.
Thomas
Powered by blists - more mailing lists