Re: [GIT, RFC] Killing the Big Kernel Lock II

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Arnd Bergmann
Date: Monday, March 29, 2010 - 7:43 am

On Monday 29 March 2010, Andi Kleen wrote:

No.


There is no way for any driver or file system right now to protect
against that, nor has there been for a long time[1]. The sys_read and
sys_write functions use file_pos_write() to update the file->f_pos
without taking any lock, and they pass a local variable into the
*ppos argument of the ->read/->write file operations, which means
that the file operation itself cannot add locking to the update
either.

We never do in-place updates of file->f_pos, but on architectures
where a 64 bit load can see incorrect data from a 64 bit store,
any concurrent read/write/llseek combinations may cause problems,
except for two concurrent lseek. Also, llseek is usually serialized
with readdir/getdents for file systems.


ok, fine with me.

	Arnd

[1] http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=55f09ec0087c...
was merged in linux-2.6.8, which opened this race. 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [GIT, RFC] Killing the Big Kernel Lock, Andrew Morton, (Wed Mar 24, 2:07 pm)
[GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Wed Mar 24, 2:40 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Roland Dreier, (Wed Mar 24, 2:53 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Wed Mar 24, 2:59 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Alan Cox, (Wed Mar 24, 3:10 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Ingo Molnar, (Wed Mar 24, 3:23 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Wed Mar 24, 3:25 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Thu Mar 25, 3:26 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, Jiri Kosina, (Thu Mar 25, 5:55 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Thu Mar 25, 6:06 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Thu Mar 25, 6:38 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, Dan Carpenter, (Thu Mar 25, 6:40 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Thu Mar 25, 7:14 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, Stefan Richter, (Fri Mar 26, 4:47 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Sat Mar 27, 7:37 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, Stefan Richter, (Sun Mar 28, 5:27 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, Frederic Weisbecker, (Sun Mar 28, 1:04 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Sun Mar 28, 1:05 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Frederic Weisbecker, (Sun Mar 28, 1:11 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Frederic Weisbecker, (Sun Mar 28, 1:15 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Frederic Weisbecker, (Sun Mar 28, 1:33 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Sun Mar 28, 2:34 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Andi Kleen, (Sun Mar 28, 2:58 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Frederic Weisbecker, (Sun Mar 28, 4:18 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Frederic Weisbecker, (Sun Mar 28, 4:24 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Frederic Weisbecker, (Sun Mar 28, 4:38 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock II, Andi Kleen, (Sun Mar 28, 6:07 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Mon Mar 29, 4:04 am)
Re: [GIT, RFC] Killing the Big Kernel Lock II, Arnd Bergmann, (Mon Mar 29, 4:48 am)
Re: [GIT, RFC] Killing the Big Kernel Lock II, Andi Kleen, (Mon Mar 29, 5:30 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, John Kacur, (Mon Mar 29, 5:45 am)
Re: [GIT, RFC] Killing the Big Kernel Lock II, Arnd Bergmann, (Mon Mar 29, 7:43 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, Frederic Weisbecker, (Mon Mar 29, 10:59 am)
Re: [GIT, RFC] Killing the Big Kernel Lock II, Andi Kleen, (Mon Mar 29, 1:11 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Mon Mar 29, 2:18 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Roland Dreier, (Tue Mar 30, 10:22 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Roland Dreier, (Wed Mar 31, 3:11 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Frederic Weisbecker, (Wed Mar 31, 3:20 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Thu Apr 1, 1:50 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, Jan Blunck, (Thu Apr 8, 1:45 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Arnd Bergmann, (Thu Apr 8, 2:27 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Frederic Weisbecker, (Thu Apr 8, 2:30 pm)
Re: [GIT, RFC] Killing the Big Kernel Lock, Jan Blunck, (Fri Apr 9, 4:02 am)
Re: [GIT, RFC] Killing the Big Kernel Lock, Stefan Richter, (Sat Apr 10, 8:13 am)