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:	Wed, 7 Jul 2010 17:55:25 -0400
From:	Mike Frysinger <vapier.adi@...il.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-kernel@...r.kernel.org, John Kacur <jkacur@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Christoph Hellwig <hch@....de>, Julia Lawall <julia@...u.dk>,
	Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH 16/18] llseek: automatically add .llseek fop

On Wed, Jul 7, 2010 at 17:40, Arnd Bergmann wrote:
> All file_operations should get a .llseek
> operation so we can make nonseekable_open
> the default for future file operations
> without a .llseek pointer.
>
> The three cases that we can automatically
> detect are no_llseek, seq_lseek and
> default_llseek. For cases where we can
> we can automatically prove that the
> file offset is always ignored, we use
> noop_llseek, which maintains the current
> behavior of not returning an error from
> a seek.
>
> New drivers should normally not use
> noop_llseek but instead use no_llseek and
> call nonseekable_open at open time.
> Existing drivers can be converted to do
> the same when the maintainer knows for
> certain that no user code relies on calling
> seek on the device file.

can we skip the transition for devices that we already know ?

> --- a/arch/blackfin/kernel/kgdb_test.c
> +++ b/arch/blackfin/kernel/kgdb_test.c
> static const struct file_operations kgdb_test_proc_fops = {
> +       .llseek = noop_llseek,/* read and write both use no f_pos */
> --- a/arch/blackfin/mach-bf561/coreb.c
> +++ b/arch/blackfin/mach-bf561/coreb.c
>  static const struct file_operations coreb_fops = {
> +       .llseek = noop_llseek,/* no read or write fn */

neither of these drivers are seekable, so attempts to do so should be
an error ...

> drivers/char/bfin-otp.c
>+       .llseek = default_llseek,/* read accesses f_pos */

lseeking should work fine with bfin-otp, so this change is OK
-mike
--
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