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: <20230214201909.flqc3g3njnbl5hun@treble>
Date:   Tue, 14 Feb 2023 12:19:09 -0800
From:   Josh Poimboeuf <jpoimboe@...nel.org>
To:     Max Filippov <jcmvbkbc@...il.com>
Cc:     juri.lelli@...hat.com, dalias@...c.org, linux-ia64@...r.kernel.org,
        linux-sh@...r.kernel.org, peterz@...radead.org,
        catalin.marinas@....com, dave.hansen@...ux.intel.com,
        x86@...nel.org, jiaxun.yang@...goat.com,
        linux-mips@...r.kernel.org, bsegall@...gle.com, guoren@...nel.org,
        hpa@...or.com, sparclinux@...r.kernel.org, kernel@...0n.name,
        will@...nel.org, vschneid@...hat.com, f.fainelli@...il.com,
        vincent.guittot@...aro.org, ysato@...rs.sourceforge.jp,
        chenhuacai@...nel.org, linux@...linux.org.uk,
        linux-csky@...r.kernel.org, mingo@...hat.com,
        bcm-kernel-feedback-list@...adcom.com, mgorman@...e.de,
        mattst88@...il.com, linux-xtensa@...ux-xtensa.org,
        paulmck@...nel.org, richard.henderson@...aro.org,
        npiggin@...il.com, ink@...assic.park.msu.ru, rostedt@...dmis.org,
        loongarch@...ts.linux.dev, tglx@...utronix.de,
        dietmar.eggemann@....com, linux-arm-kernel@...ts.infradead.org,
        jgross@...e.com, chris@...kel.net, tsbogend@...ha.franken.de,
        Philippe Mathieu-Daudé <philmd@...aro.org>,
        bristot@...hat.com, linux-kernel@...r.kernel.org,
        linux-alpha@...r.kernel.org, bp@...en8.de,
        linuxppc-dev@...ts.ozlabs.org, davem@...emloft.net
Subject: Re: [PATCH v2 19/24] xtensa/cpu: Make sure cpu_die() doesn't return

On Tue, Feb 14, 2023 at 11:48:41AM -0800, Max Filippov wrote:
> On Tue, Feb 14, 2023 at 10:23 AM Josh Poimboeuf <jpoimboe@...nel.org> wrote:
> > On Tue, Feb 14, 2023 at 08:55:32AM +0100, Philippe Mathieu-Daudé wrote:
> > > Can you update the documentation along? Currently we have:
> > >
> > >   /*
> > >    * Called from the idle thread for the CPU which has been shutdown.
> > >    *
> > >    * Note that we disable IRQs here, but do not re-enable them
> > >    * before returning to the caller. This is also the behaviour
> > >    * of the other hotplug-cpu capable cores, so presumably coming
> > >    * out of idle fixes this.
> > >    */
> >
> > void __ref cpu_die(void)
> > {
> >         idle_task_exit();
> >         local_irq_disable();
> >         __asm__ __volatile__(
> >                         "       movi    a2, cpu_restart\n"
> >                         "       jx      a2\n");
> >
> >         BUG();
> > }
> >
> > Hm, not only is the comment wrong, but it seems to be branching to
> > cpu_restart?  That doesn't seem right at all.
> 
> Perhaps the name is a bit misleading. The CPU that enters 'cpu_restart'
> loops there until a call to 'boot_secondary' releases it, after which it goes
> to '_startup'. So it is a restart, but not immediate.

Ah, I see.  That sounds similar to what Xen does.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ