Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1240438
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal |
| Date | 2015-10-06 15:50 +0200 |
| Message-ID | <qgAMV-7L3-5@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <qgkRQ-1x8-17@gated-at.bofh.it> <qgvke-8jp-17@gated-at.bofh.it> <qgwzD-1QA-3@gated-at.bofh.it> <qgwJl-21W-45@gated-at.bofh.it> <qgAtA-7oA-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
* Linus Torvalds <torvalds@linux-foundation.org> wrote: > On Tue, Oct 6, 2015 at 10:27 AM, Ingo Molnar <mingo@kernel.org> wrote: > > > >> > >> We really should try get rid of _all_ uses of the "__" versions unless they are > >> very locally and obviously checked with access_ok(). We've had way too many > >> cases where people thought they were clever, and weren't really. > > > > That's a good idea. > > > > The logistics worries me a bit: it looks like a major undertaking, considering the > > widespread use of these APIs in 1400+ call sites: > > Well, quite frankly, I think I'd be ok with just a mass conversion of the "__" > functions to non-underscore ones. > > From past experience, I don't think we have anything that really cares. The one > exception is probably the signal stack handling, because it really uses multiple > individual accesses, and so it is much more noticeable. > > And there should be *no* meaningful difference between the underscore version > and the non-underscore one, unless somebody does something really odd and > questionable (ie depends on a kernel pointer - which doesn't even work on all > architectures!). > > So I really think we could do a mass conversion of everything that isn't under > "arch/" (and obviously asm-generic/uaccess.h) in just one single go. > > I obviously wouldn't take that into 4.3, but I really don't think this would > merit splitting up into multiple patches either. > > Then, one by one, we might convert back to __get/put_user() when we've (a) added > the SMAP/PAN infrastructure (b) verified that there's an access_ok() > _right_there_ and (c) actually verified that it's performance-critical. > > I see drivers doing __get/put_user(), and it just makes me go "no". Not only are > drivers likely to get it wrong, I don't believe the extra couple of cycles is > going to matter compared to the cost of the hardware access itself. And if the > access_ok() isn't local and obviously in the *only* place that can possibly lead > to that code, then the code shouldn't use the underscore versions. Great, fully agreed and will implement it this way! Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Theodore Ts'o <tytso@mit.edu> - 2015-10-05 17:30 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-05 18:00 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Dave Hansen <dave.hansen@linux.intel.com> - 2015-10-05 18:30 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-05 22:30 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Dave Hansen <dave.hansen@linux.intel.com> - 2015-10-05 22:50 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-05 23:20 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-06 00:00 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Dave Hansen <dave.hansen@linux.intel.com> - 2015-10-06 01:40 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-06 11:10 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal "H. Peter Anvin" <hpa@zytor.com> - 2015-10-05 22:50 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Ingo Molnar <mingo@kernel.org> - 2015-10-06 10:00 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-06 11:20 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Ingo Molnar <mingo@kernel.org> - 2015-10-06 11:30 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-06 15:30 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Ingo Molnar <mingo@kernel.org> - 2015-10-06 15:50 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Dave Hansen <dave.hansen@linux.intel.com> - 2015-10-05 18:10 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Dave Hansen <dave.hansen@intel.com> - 2015-10-05 20:10 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Theodore Ts'o <tytso@mit.edu> - 2015-10-07 05:40 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-07 09:40 +0200
Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Theodore Ts'o <tytso@mit.edu> - 2015-10-07 17:50 +0200
[PATCH] ext4: use private version of page_zero_new_buffers() for data=journal mode Theodore Ts'o <tytso@mit.edu> - 2015-10-09 06:10 +0200
Re: [PATCH] ext4: use private version of page_zero_new_buffers() for data=journal mode "Leonid V. Fedorenchik" <Leonid.Fedorenchik@paragon-software.com> - 2015-10-13 08:40 +0200
Re: [PATCH] ext4: use private version of page_zero_new_buffers() for data=journal mode Jan Kara <jack@suse.cz> - 2015-10-15 13:20 +0200
csiph-web