[WIP RFC PATCH 0/3] runtime-const header split and whatnot

Mateusz Guzik posted 3 patches 3 months, 1 week ago
.../include/asm/runtime-const-accessors.h     | 151 ++++++++++++++++++
arch/riscv/include/asm/runtime-const.h        | 142 +---------------
.../x86/include/asm/runtime-const-accessors.h |  45 ++++++
arch/x86/include/asm/runtime-const.h          |  38 +----
arch/x86/include/asm/uaccess_64.h             |  17 +-
arch/x86/kernel/cpu/common.c                  |   8 +-
fs/dcache.c                                   |   1 +
include/asm-generic/vmlinux.lds.h             |   3 +-
include/linux/fs.h                            |  17 +-
9 files changed, 232 insertions(+), 190 deletions(-)
create mode 100644 arch/riscv/include/asm/runtime-const-accessors.h
create mode 100644 arch/x86/include/asm/runtime-const-accessors.h
[WIP RFC PATCH 0/3] runtime-const header split and whatnot
Posted by Mateusz Guzik 3 months, 1 week ago
So I slapped together what I described into a WIP patchset.

The runtime header treatment so far only done for x86 and riscv.

I verified things still compile with this in fs.h:
#ifndef MODULE
#include <asm/runtime-const-accessors.h>
#endif

The -accessors suffix is not my favourite, but I don't have a better
name.

If this looks like I'm going to do the needful(tm).

Mateusz Guzik (3):
  x86: fix access_ok() and valid_user_address() using wrong USER_PTR_MAX
    in modules
  runtime-const: split headers between accessors and fixup; disable for
    modules
  fs: hide names_cachep behind runtime access machinery

 .../include/asm/runtime-const-accessors.h     | 151 ++++++++++++++++++
 arch/riscv/include/asm/runtime-const.h        | 142 +---------------
 .../x86/include/asm/runtime-const-accessors.h |  45 ++++++
 arch/x86/include/asm/runtime-const.h          |  38 +----
 arch/x86/include/asm/uaccess_64.h             |  17 +-
 arch/x86/kernel/cpu/common.c                  |   8 +-
 fs/dcache.c                                   |   1 +
 include/asm-generic/vmlinux.lds.h             |   3 +-
 include/linux/fs.h                            |  17 +-
 9 files changed, 232 insertions(+), 190 deletions(-)
 create mode 100644 arch/riscv/include/asm/runtime-const-accessors.h
 create mode 100644 arch/x86/include/asm/runtime-const-accessors.h

-- 
2.34.1