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]
Message-ID: <f2b55d220703071750h1a47c432ife7f39c575a4303c@mail.gmail.com>
Date:	Wed, 7 Mar 2007 17:50:05 -0800
From:	"Michael K. Edwards" <medwards.linux@...il.com>
To:	"Alan Cox" <alan@...rguk.ukuu.org.uk>
Cc:	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: f_owner.lock and file->pos updates

On 3/7/07, Alan Cox <alan@...rguk.ukuu.org.uk> wrote:
> The right way IMHO would be to do the work that was done for pread/pwrite
> and implement preadv/pwritev. The moment you want to do atomic things
> with the file->f_pos instead of doing it with a local passed pos value it
> gets ugly.. why do you need to do it with f_pos ?

I didn't see any clean way to intersperse overwrites and appends to a
record-structured file without using vfs_llseek, which steps on f_pos.
 Actually, we may already have a problem with append races in
sys_write/sys_writev.  If it's possible for two threads to write() to
the same file in different threads (both intending to append), they
may wind up passing the same "pos" value into vfs_write().  Or does
fget_light/fput_light do some sort of locking that I'm not seeing?

Cheers,
- Michael
-
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