linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* remove the last set_fs() in common code, and remove it for x86 and powerpc v3
@ 2020-09-03 14:22 Christoph Hellwig
  2020-09-03 14:22 ` [PATCH 01/14] proc: remove a level of indentation in proc_get_inode Christoph Hellwig
                   ` (16 more replies)
  0 siblings, 17 replies; 58+ messages in thread
From: Christoph Hellwig @ 2020-09-03 14:22 UTC (permalink / raw)
  To: Linus Torvalds, Al Viro, Michael Ellerman, x86
  Cc: linux-arch, Kees Cook, linux-kernel, Luis Chamberlain,
	linux-fsdevel, linuxppc-dev, Alexey Dobriyan

Hi all,

this series removes the last set_fs() used to force a kernel address
space for the uaccess code in the kernel read/write/splice code, and then
stops implementing the address space overrides entirely for x86 and
powerpc.

[Note to Linus: I'd like to get this into linux-next rather earlier
than later.  Do you think it is ok to add this tree to linux-next?]

The file system part has been posted a few times, and the read/write side
has been pretty much unchanced.  For splice this series drops the
conversion of the seq_file and sysctl code to the iter ops, and thus loses
the splice support for them.  The reasons for that is that it caused a lot
of churn for not much use - splice for these small files really isn't much
of a win, even if existing userspace uses it.  All callers I found do the
proper fallback, but if this turns out to be an issue the conversion can
be resurrected.

Besides x86 and powerpc I plan to eventually convert all other
architectures, although this will be a slow process, starting with the
easier ones once the infrastructure is merged.  The process to convert
architectures is roughtly:

 (1) ensure there is no set_fs(KERNEL_DS) left in arch specific code
 (2) implement __get_kernel_nofault and __put_kernel_nofault
 (3) remove the arch specific address limitation functionality

Changes since v2:
 - add back the patch to support splice through read_iter/write iter
   on /proc/sys/*
 - entirely remove the tests that depend on set_fs.  Note that for
   lkdtm the maintainer (Kees) disagrees with this request from Linus
 - fix a wrong check in the powerpc access_ok, and drop a few spurious
   cleanups there

Changes since v1:
 - drop the patch to remove the non-iter ops for /dev/zero and
   /dev/null as they caused a performance regression
 - don't enable user access in __get_kernel on powerpc
 - xfail the set_fs() based lkdtm tests

Diffstat:

^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2020-10-14  5:54 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 14:22 remove the last set_fs() in common code, and remove it for x86 and powerpc v3 Christoph Hellwig
2020-09-03 14:22 ` [PATCH 01/14] proc: remove a level of indentation in proc_get_inode Christoph Hellwig
2020-09-03 14:22 ` [PATCH 02/14] proc: cleanup the compat vs no compat file ops Christoph Hellwig
2020-09-03 14:22 ` [PATCH 03/14] proc: add a read_iter method to proc proc_ops Christoph Hellwig
2020-09-03 14:22 ` [PATCH 04/14] sysctl: Convert to iter interfaces Christoph Hellwig
2020-09-03 14:22 ` [PATCH 05/14] fs: don't allow kernel reads and writes without iter ops Christoph Hellwig
2020-10-01 22:38   ` Eric Biggers
2020-10-01 22:40     ` Al Viro
2020-10-02 16:27       ` Linus Torvalds
2020-10-09 22:06         ` Eric Biggers
2020-10-10  1:03           ` Linus Torvalds
2020-10-10  1:19             ` Eric Biggers
2020-10-10  1:29               ` Linus Torvalds
2020-10-10  1:55                 ` Alexander Viro
2020-10-14  5:51                   ` Christoph Hellwig
2020-09-03 14:22 ` [PATCH 06/14] fs: don't allow splice read/write without explicit ops Christoph Hellwig
2020-09-03 14:22 ` [PATCH 07/14] uaccess: add infrastructure for kernel builds with set_fs() Christoph Hellwig
2020-09-03 14:22 ` [PATCH 08/14] test_bitmap: remove user bitmap tests Christoph Hellwig
2020-09-03 14:22 ` [PATCH 09/14] lkdtm: remove set_fs-based tests Christoph Hellwig
2020-09-03 14:22 ` [PATCH 10/14] x86: move PAGE_OFFSET, TASK_SIZE & friends to page_{32, 64}_types.h Christoph Hellwig
2020-09-03 14:22 ` [PATCH 11/14] x86: make TASK_SIZE_MAX usable from assembly code Christoph Hellwig
2020-09-03 14:22 ` [PATCH 12/14] x86: remove address space overrides using set_fs() Christoph Hellwig
2020-09-03 21:30   ` David Laight
2020-09-03 23:25     ` Linus Torvalds
2020-09-04  7:59       ` David Laight
2020-09-04  2:55   ` Al Viro
2020-09-04  4:41     ` Al Viro
2020-09-04  6:38     ` Christoph Hellwig
2020-09-04  7:47       ` Christoph Hellwig
2020-09-03 14:22 ` [PATCH 13/14] powerpc: use non-set_fs based maccess routines Christoph Hellwig
2020-09-03 14:22 ` [PATCH 14/14] powerpc: remove address space overrides using set_fs() Christoph Hellwig
2020-09-03 15:43   ` Christophe Leroy
2020-09-03 15:49     ` Christoph Hellwig
2020-09-03 15:56       ` Christoph Hellwig
2020-09-03 16:03         ` Christophe Leroy
2020-09-03 14:28 ` remove the last set_fs() in common code, and remove it for x86 and powerpc v3 Al Viro
2020-09-03 14:30   ` Christoph Hellwig
2020-09-03 14:36     ` Al Viro
2020-09-03 14:40       ` Christoph Hellwig
2020-09-09 17:31   ` Linus Torvalds
2020-09-09 18:40     ` Segher Boessenkool
2020-09-09 21:33       ` Linus Torvalds
2020-09-10  8:04         ` David Laight
2020-09-10  8:13           ` Christophe Leroy
2020-09-10  9:26             ` David Laight
2020-09-10 12:26               ` David Laight
2020-09-10 15:20                 ` Segher Boessenkool
2020-09-10 15:31                   ` David Laight
2020-09-10 17:15                     ` Segher Boessenkool
2020-09-10 15:16               ` Segher Boessenkool
2020-09-10 15:44         ` Segher Boessenkool
2020-09-03 15:49 ` Linus Torvalds
2020-09-04  6:00 ` Ingo Molnar
2020-09-04 17:58   ` Alexey Dobriyan
2020-09-04 18:42     ` Linus Torvalds
2020-09-04 21:01     ` David Laight
2020-09-05  7:16       ` Christophe Leroy
2020-09-05 10:13         ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).