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: <20220617040740.25631-1-lecopzer.chen@mediatek.com>
Date:   Fri, 17 Jun 2022 12:07:40 +0800
From:   Lecopzer Chen <lecopzer.chen@...iatek.com>
To:     <mark.rutland@....com>, <will@...nel.org>
CC:     <lecopzer.chen@...iatek.com>, <acme@...nel.org>,
        <akpm@...ux-foundation.org>, <alexander.shishkin@...ux.intel.com>,
        <catalin.marinas@....com>, <davem@...emloft.net>,
        <jolsa@...hat.com>, <jthierry@...hat.com>, <keescook@...omium.org>,
        <kernelfans@...il.com>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>,
        <linux-perf-users@...r.kernel.org>, <masahiroy@...nel.org>,
        <matthias.bgg@...il.com>, <maz@...nel.org>, <mcgrof@...nel.org>,
        <mingo@...hat.com>, <namhyung@...nel.org>, <nixiaoming@...wei.com>,
        <peterz@...radead.org>, <pmladek@...e.com>,
        <sparclinux@...r.kernel.org>, <sumit.garg@...aro.org>,
        <wangqing@...o.com>, <yj.chiang@...iatek.com>
Subject: RE: [PATCH v6 0/6] Support hld delayed init based on Pseudo-NMI for arm64

Hi Will, Mark


Could you help review arm parts of this patchset, please?

For the question mention in both [1] and [2],

> I'd still like Mark's Ack on this, as the approach you have taken doesn't
> really sit with what he was suggesting.
>
> I also don't understand how all the CPUs get initialised with your patch,
> since the PMU driver will be initialised after SMP is up and running.

The hardlock detector utilizes the softlockup_start_all() to start all
the cpu on watchdog_allowed_mask, which will do watchdog_nmi_enable()
that registers perf event on each CPUs.
Thus we simply need to retry lockup_detector_init() in a single cpu which
will reconfig and call to softlockup_start_all().

Also, the CONFIG_HARDLOCKUP_DETECTOR_PERF selects SOFTLOCKUP_DETECTOR,
IMO, this shows that hardlockup detector supports from softlockup.


> We should know whether pNMIs are possible once we've completed
> setup_arch() (and possibly init_IRQ()), long before SMP, so so I reckon
> we should have all the information available once we get to
> lockup_detector_init(), even if that requires some preparatory rework.

Hardlockup depends on PMU driver , I think the only way is moving
pmu driver at setup_arch() or any point which is earlier than
lockup_detector_init(), and I guess we have to reorganize the architecture
of arm PMU.

The retry function should benifit all the arch/ not only for arm64.
Any arch who needs to probe its pmu as module can use this without providing
a chance to mess up the setup order. 


Please let me know if you have any concern about this, thank you


[1] https://lore.kernel.org/all/CAFA6WYPPgUvHCpN5=EpJ2Us5h5uVWCbBA59C-YwYQX2ovyVeEw@mail.gmail.com/
[2] https://lore.kernel.org/linux-arm-kernel/20210419170331.GB31045@willie-the-truck/


BRs,
Lecopzer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ