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]
Date:   Fri, 5 Aug 2022 10:09:15 -0700
From:   Ira Weiny <ira.weiny@...el.com>
To:     Borislav Petkov <bp@...en8.de>
CC:     Rik van Riel <riel@...riel.com>, Ingo Molnar <mingo@...nel.org>,
        <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
        <kernel-team@...com>, "Dave Hansen" <dave.hansen@...el.com>
Subject: Re: [PATCH v3] x86,mm: print likely CPU at segfault time

On Fri, Aug 05, 2022 at 04:27:40PM +0200, Borislav Petkov wrote:
> On Fri, Aug 05, 2022 at 10:16:44AM -0400, Rik van Riel wrote:
> > diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> > index fad8faa29d04..c7a5bbf40367 100644
> > --- a/arch/x86/mm/fault.c
> > +++ b/arch/x86/mm/fault.c
> > @@ -769,6 +769,8 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code,
> >  		unsigned long address, struct task_struct *tsk)
> >  {
> >  	const char *loglvl = task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG;
> > +	/* This is a racy snapshot, but it's better than nothing. */
> > +	int cpu = raw_smp_processor_id();
> 
> Please read this in exc_page_fault() and hand it down to helpers.
> 
> Alternatively, I'm being told there's a patchset in the works which
> will allow for any exception handler to pass in additional information
> downwards through an extended pt_regs. Then, saving the CPU number on
> which the handler is running would work generically everywhere.

Indeed that was part of the PKS series.[1]

I've thrown together a quick RFC with the relevant patches from that series and
Rik's code in show_signal_msg().

I'll post it shortly,
Ira

[1] https://lore.kernel.org/lkml/20220419170649.1022246-18-ira.weiny@intel.com/

> 
> Thx.
> 
> -- 
> Regards/Gruss,
>     Boris.
> 
> https://people.kernel.org/tglx/notes-about-netiquette
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ