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, 21 Feb 2022 11:02:44 +0300
From:   Ivan Bornyakov <i.bornyakov@...rotek.ru>
To:     Shawn Guo <shawnguo@...nel.org>
Cc:     s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
        linux-imx@....com, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, system@...rotek.ru
Subject: Re: [PATCH] bus: imx-weim: add DT overlay support for WEIM bus

On Mon, Feb 21, 2022 at 03:25:29PM +0800, Shawn Guo wrote:
> On Sat, Feb 05, 2022 at 08:50:06AM +0300, Ivan Bornyakov wrote:
> > Add OF reconfiguration notifier handler for WEIM bus to setup Chip
> > Select timings on runtime creation of child devices.
> > 
> > However, it is not possible to load another DT overlay with conflicting
> > CS timings with previously loaded overlay, even if the first one is
> > unloaded.
> 
> Are we doing anything if that happens?
> 

On device removal there is no access to device node properties, thus it
is not possible to find out which of CS timings was configured for this
device to clear theirs 'is_applied'.

So, if we apply one DT overlay, configure some CS timings, remove this
overlay, apply another with conflicting timings, we will fail here

static int weim_timing_setup(...)
{
	...

	for (reg_idx = 0; reg_idx < num_regs; reg_idx++) {
		...

		/* prevent re-configuring a CS that's already been configured */
		cst = &ts->cs[cs_idx];
		if (cst->is_applied && memcmp(value, cst->regs,
					devtype->cs_regs_count * sizeof(u32))) {
			dev_err(dev, "fsl,weim-cs-timing conflict on %pOF", np);
			return -EINVAL;
		}
		...
	}
	...
}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ