mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-09 06:14:34 +02:00
The kernel allows arches to select between inline and outline
implementations of the copy_{from,to}_user() by defining individual
INLINE_COPY_FROM_USER and INLINE_COPY_TO_USER, correspondingly. However,
all arches enable or disable them always together.
Without the real use-case for one helper being inlined while the other
outlined, having independent controls is excessive and error prone.
Switch the codebase to the single unified INLINE_COPY_USER control.
Link: https://lore.kernel.org/20260425020857.356850-3-ynorov@nvidia.com
Signed-off-by: Yury Norov <ynorov@nvidia.com>
Tested-by: Alice Ryhl <aliceryhl@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Viktor Malik <vmalik@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
38 lines
1.1 KiB
C
38 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* User memory access support for Hexagon
|
|
*
|
|
* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _ASM_UACCESS_H
|
|
#define _ASM_UACCESS_H
|
|
/*
|
|
* User space memory access functions
|
|
*/
|
|
#include <asm/sections.h>
|
|
|
|
/*
|
|
* When a kernel-mode page fault is taken, the faulting instruction
|
|
* address is checked against a table of exception_table_entries.
|
|
* Each entry is a tuple of the address of an instruction that may
|
|
* be authorized to fault, and the address at which execution should
|
|
* be resumed instead of the faulting instruction, so as to effect
|
|
* a workaround.
|
|
*/
|
|
|
|
/* Assembly somewhat optimized copy routines */
|
|
unsigned long raw_copy_from_user(void *to, const void __user *from,
|
|
unsigned long n);
|
|
unsigned long raw_copy_to_user(void __user *to, const void *from,
|
|
unsigned long n);
|
|
#define INLINE_COPY_USER
|
|
|
|
__kernel_size_t __clear_user_hexagon(void __user *dest, unsigned long count);
|
|
#define __clear_user(a, s) __clear_user_hexagon((a), (s))
|
|
|
|
#include <asm-generic/uaccess.h>
|
|
|
|
|
|
#endif
|