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] [day] [month] [year] [list]
Date:   Mon, 15 May 2017 11:00:34 +0100
From:   Russell King - ARM Linux <linux@...linux.org.uk>
To:     Mark Rutland <mark.rutland@....com>
Cc:     yanjiang.jin@...driver.com, hiraku.toyooka.gu@...achi.com,
        dinguyen@...nel.org, dinguyen@...nsource.altera.com,
        jinyanjiang@...il.com, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

On Fri, May 12, 2017 at 03:36:01PM +0100, Mark Rutland wrote:
> However, AFAICT, this patch forcibly resets is without any teardown
> having happened. That will surely result in data being lost from the
> caches, for example.

You're wrong on that point.  Having each bloody platform implement
the same friggin teardown is utter madness, and leads to all sorts
of synchronisation issues.

The generic code already deals with the cache issues, and has
synchronisation to ensure that the dying CPU completes the cache
handling before the requesting CPU continues with the killing.
The only thing that platform code need concern itself with is doing
is the "make the CPU die" thing.

It's not perfect, but it's good enough for the majority of cases.

In any case, encouraging people to add flush_cache_all() into their
cpu_die() function is NOT the way forward if there is a problem -
that introduces a new race between flush_cache_all() walking all the
cache lines and cpu_kill() actually turning the power off to the CPU,
which could very well happen either before or during the
flush_cache_all() execution.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ