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:	Thu, 22 Oct 2009 00:16:21 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	John Kacur <jkacur@...hat.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Jonathan Corbet <corbet@....net>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	linuxppc-dev@...abs.org, Alan Cox <alan@...rguk.ukuu.org.uk>,
	Arnd Bergmann <arndbergmann@...glemail.com>
Subject: Re: [PATCH] macintosh: Explicitly set llseek to no_llseek in
	ans-lcd

On Wed, Oct 21, 2009 at 11:53:21PM +0200, John Kacur wrote:
> > No problem with that. Setting no_llseek or generic_file_llseek_unlocked,
> > depending on the context is the right thing to do.
> > 
> > What I'm wondering about concerns the future code that will have
> > no llsek() implemented in their fops.
> > 
> > We can't continue to use default_llseek() for future code unless we
> > want to continue these post reviews and fixes forever.
> > 
> 
> I'm thinking that the simplier approach, would be to make the 
> default_llseek the unlocked one. Then you only have to audit the drivers 
> that have the BKL - ie the ones we are auditing anyway, and explicitly set 
> them to the bkl locked llseek.
> 
> There might be a hidden interaction though between the non-unlocked 
> variety of ioctls and default llseek though.


I fear that won't work because the bkl in default_llseek() does not
only synchronizes with others uses of the bkl in a driver, it also
synchronizes lseek() itself.

As an example offset change is not atomic. This is a long long, so
updating its value is not atomic in 32 bits archs.

--
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