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:	Mon, 19 Jan 2015 15:01:01 +0100
From:	Thierry Reding <thierry.reding@...il.com>
To:	Dmitry Osipenko <digetx@...il.com>
Cc:	Stephen Warren <swarren@...dotorg.org>,
	Alexandre Courbot <gnurou@...il.com>,
	Peter De Schrijver <pdeschrijver@...dia.com>,
	linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH] ARM: tegra: Store tegra_resume() address in IRAM

On Thu, Jan 15, 2015 at 01:58:58PM +0300, Dmitry Osipenko wrote:
> Commit 7232398abc6a ("ARM: tegra: Convert PMC to a driver") changed tegra_resume()
> location storing from late to early and, as a result, broke suspend on Tegra20.
> PMC scratch register 41 is used by tegra LP1 resume code for retrieving stored
> physical memory address of common resume function and in the same time used by
> tegra20_cpu_shutdown() (shared by Tegra20 cpuidle driver and platform SMP code),
> which is storing CPU1 "resettable" status. It implies strict order of scratch
> register usage, otherwise resume function address is lost on Tegra20 after
> disabling non-boot CPU's on suspend. Fix it by storing tegra_resume() physical
> address in IRAM instead of PMC scratch register.
> 
> Signed-off-by: Dmitry Osipenko <digetx@...il.com>
> Fixes: 7232398abc6a (ARM: tegra: Convert PMC to a driver)
> Cc: <stable@...r.kernel.org> # v3.17+
> ---
>  arch/arm/mach-tegra/pm.c            |  3 +++
>  arch/arm/mach-tegra/reset-handler.S |  4 ++++
>  arch/arm/mach-tegra/reset.h         |  4 ++++
>  arch/arm/mach-tegra/sleep-tegra20.S |  7 ++++---
>  arch/arm/mach-tegra/sleep-tegra30.S |  7 ++++---
>  drivers/soc/tegra/pmc.c             | 19 -------------------
>  6 files changed, 19 insertions(+), 25 deletions(-)

I don't think this is a good variant. I'm sure it'll work, but storing a
pointer to tegra_resume() is actually the documented purpose of the PMC
scratch 41 register. That is, some software (like bootloaders and
whatnot) may actually rely on this behaviour.

Thierry

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ