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:	Tue, 07 Oct 2008 19:11:26 +0900
From:	Hisashi Hifumi <hifumi.hisashi@....ntt.co.jp>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org
Subject: Re: [RESEND] [PATCH] VFS: make file->f_pos access atomic on
  32bit arch


At 15:43 08/10/07, Andi Kleen wrote:
>Hisashi Hifumi <hifumi.hisashi@....ntt.co.jp> writes:
>
>> Hi Andrew.
>>
>> Currently reading or writing file->f_pos is not atomic on 32bit environment,
>> so two or more simultaneous access can corrupt file->f_pos value.
>> There are some past discussions about this issue, but this is not fixed yet.
>> http://marc.info/?l=linux-kernel&m=120764199819899&w=2
>> http://marc.info/?l=linux-kernel&m=114490379102476&w=2
>
>Have you benchmarked if cmpxchg is cheaper than the seqlock?  It's not
>clear to me a seqlock is really the right locking primitive for
>this. Normally seqlocks should be used when reading is much more
>frequent than writing, but it's doubtful that this is actually the
>case for f_pos.

Maybe cmpxchg8b is good for i486 or later x86, but i386 or other architectures
that do not have similar instruction needs some locking primitive. I think lazy
seqlock is one option for making file->f_pos access atomic.

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