core kernel fixes
Subsystems (4)
Linus,
Please pull the latest core-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-urgent-for-linus
# HEAD: 092b31aa2048cf7561a39697974adcd147fbb27b x86/asm/memcpy_mcsafe: Fix copy_to_user_mcsafe() exception handling
This is mostly the copy_to_user_mcsafe() related fixes from Dan Williams, and an ORC fix for Clang.
Thanks,
Ingo
------------------>
Dan Williams (4):
lib/iov_iter: Document _copy_to_iter_mcsafe() lib/iov_iter: Document _copy_to_iter_flushcache() lib/iov_iter: Fix pipe handling in _copy_to_iter_mcsafe() x86/asm/memcpy_mcsafe: Fix copy_to_user_mcsafe() exception handling
Simon Ser (1):
objtool: Use '.strtab' if '.shstrtab' doesn't exist, to support ORC tables on Clang
arch/x86/Kconfig | 2 +- arch/x86/include/asm/uaccess_64.h | 7 +++- lib/iov_iter.c | 77 +++++++++++++++++++++++++++++++++++++-- tools/objtool/elf.c | 6 ++- 4 files changed, 84 insertions(+), 8 deletions(-)
arch/x86/Kconfig +1 -1
@@ -63,7 +63,7 @@ config X86 select ARCH_HAS_PTE_SPECIAL select ARCH_HAS_REFCOUNT select ARCH_HAS_UACCESS_FLUSHCACHE if X86_64 - select ARCH_HAS_UACCESS_MCSAFE if X86_64 + select ARCH_HAS_UACCESS_MCSAFE if X86_64 && X86_MCE select ARCH_HAS_SET_MEMORY select ARCH_HAS_SG_CHAIN select ARCH_HAS_STRICT_KERNEL_RWX
arch/x86/include/asm/uaccess_64.h +6 -1
@@ -52,7 +52,12 @@ copy_to_user_mcsafe(void *to, const void *from, unsigned len)unsigned long ret;__uaccess_begin (); - ret =memcpy_mcsafe (to, from, len); +/* +* Note, __memcpy_mcsafe() is explicitly used since it can +* handle exceptions / faults. memcpy_mcsafe() may fall back to +* memcpy() which lacks this handling. +*/ + ret =__memcpy_mcsafe (to, from, len);__uaccess_end ();return ret; }
lib/iov_iter.c +73 -4
94 lines not on this page · raw message
tools/objtool/elf.c +4 -2
@@ -519,10 +519,12 @@ struct section *elf_create_section(struct elf *elf, const char *name, sec->sh.sh_flags =SHF_ALLOC ; -/* Add section name to .shstrtab */ +/* Add section name to .shstrtab (or .strtab for Clang) */ shstrtab =find_section_by_name (elf,".shstrtab" ); +if (!shstrtab) + shstrtab =find_section_by_name (elf,".strtab" );if (!shstrtab) { -WARN ("can't find .shstrtab section" ); +WARN ("can't find .shstrtab or .strtab section" );return NULL ; }