[RFC PATCH 07/11] x86/lib: Prevent UACCESS call warning from objtool

joao
2022-04-20T00:43:46Z

From: Joao Moreira <joao@overdrivepizza.com>

Objtool emits a warning whenever it finds a call that may happen with
UACCESS enabled. Prevent this b not emitting calls to the
__fineibt_handler in such circumstances, making the function
coarse-grained.

Signed-off-by: Joao Moreira <joao@overdrivepizza.com>
---
arch/x86/lib/copy_mc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/lib/copy_mc.c b/arch/x86/lib/copy_mc.c
index 80efd45a7761..554e6c6ecea2 100644
--- a/arch/x86/lib/copy_mc.c
+++ b/arch/x86/lib/copy_mc.c
@@ -22,7 +22,7 @@ void enable_copy_mc_fragile(void)
* Similar to copy_user_handle_tail, probe for the write fault point, or
* source exception point.
*/
-__visible notrace unsigned long
+__visible notrace unsigned long __coarseendbr
copy_mc_fragile_handle_tail(char *to, char *from, unsigned len)
{
for (; len; --len, to++, from++)
--
2.35.1