diff options
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/Kconfig | 3 | ||||
-rw-r--r-- | arch/xtensa/include/asm/uaccess.h | 3 | ||||
-rw-r--r-- | arch/xtensa/kernel/xtensa_ksyms.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 3878880469d1..f02b8850b01b 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -7,6 +7,8 @@ config XTENSA select ARCH_HAS_SYNC_DMA_FOR_CPU if MMU select ARCH_HAS_SYNC_DMA_FOR_DEVICE if MMU select ARCH_HAS_DMA_SET_UNCACHED if MMU + select ARCH_HAS_STRNCPY_FROM_USER if !KASAN + select ARCH_HAS_STRNLEN_USER select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS select ARCH_USE_QUEUED_SPINLOCKS @@ -20,7 +22,6 @@ config XTENSA select GENERIC_IRQ_SHOW select GENERIC_PCI_IOMAP select GENERIC_SCHED_CLOCK - select GENERIC_STRNCPY_FROM_USER if KASAN select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL diff --git a/arch/xtensa/include/asm/uaccess.h b/arch/xtensa/include/asm/uaccess.h index 5c9fb8005aa8..75bd8fbf52ba 100644 --- a/arch/xtensa/include/asm/uaccess.h +++ b/arch/xtensa/include/asm/uaccess.h @@ -290,8 +290,7 @@ clear_user(void __user *addr, unsigned long size) #define __clear_user __xtensa_clear_user -#ifndef CONFIG_GENERIC_STRNCPY_FROM_USER - +#ifdef CONFIG_ARCH_HAS_STRNCPY_FROM_USER extern long __strncpy_user(char *dst, const char __user *src, long count); static inline long diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c index 415fe7faa37f..d79edbb98d2a 100644 --- a/arch/xtensa/kernel/xtensa_ksyms.c +++ b/arch/xtensa/kernel/xtensa_ksyms.c @@ -43,7 +43,7 @@ EXPORT_SYMBOL(memmove); EXPORT_SYMBOL(__memset); EXPORT_SYMBOL(__memcpy); EXPORT_SYMBOL(__memmove); -#ifndef CONFIG_GENERIC_STRNCPY_FROM_USER +#ifdef CONFIG_ARCH_HAS_STRNCPY_FROM_USER EXPORT_SYMBOL(__strncpy_user); #endif EXPORT_SYMBOL(clear_page); |