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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 2 Aug 2014 23:09:40 +0100
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Tomasz Figa <t.figa@...sung.com>
Cc:	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Kukjin Kim <kgene.kim@...sung.com>, lauraa@...eaurora.org,
	linux-omap@...r.kernel.org, linus.walleij@...aro.org,
	santosh.shilimkar@...com, tony@...mide.com, drake@...lessm.com,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Tomasz Figa <tomasz.figa@...il.com>, loeliger@...il.com
Subject: Re: [PATCH v3 1/7] ARM: l2c: Refactor the driver to use
	commit-like interface

On Thu, Jul 17, 2014 at 06:38:56PM +0200, Tomasz Figa wrote:
> Certain implementations of secure hypervisors (namely the one found on
> Samsung Exynos-based boards) do not provide access to individual L2C
> registers. This makes the .write_sec()-based interface insufficient and
> provoking ugly hacks.
> 
> This patch is first step to make the driver not rely on availability of
> writes to individual registers. This is achieved by refactoring the
> driver to use a commit-like operation scheme: all register values are
> prepared first and stored in an instance of l2x0_regs struct and then a
> single callback is responsible to flush those values to the hardware.

This isn't going to work very well...

> +static const struct l2c_init_data *l2x0_data;

So you keep a pointer to the init data...

> +static void l2c_resume(void)
> +{
> +	l2x0_data->enable(l2x0_base, l2x0_saved_regs.aux_ctrl,
> +				l2x0_data->num_lock);

which you dereference at resume time...

>  static const struct l2c_init_data l2c210_data __initconst = {

but the structures which get assigned to the pointer are marked __initconst.

That's not going to work very well.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ