[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH RFC v3 5/8] rseq: add __always_inline for rseq_kernel_fields



From: Chen Linxuan <chenlinxuan@xxxxxxxxxxxxx>

Presume that kernel is compiled for x86_64 with gcc version 13.3.0:

  make allmodconfig
  make KCFLAGS="-fno-inline-small-functions -fno-inline-functions-called-once"

This results some objtool warnings:

  vmlinux.o: warning: objtool: rseq_update_cpu_node_id+0x14c: call to 
rseq_kernel_fields() with UACCESS enabled
  vmlinux.o: warning: objtool: rseq_reset_rseq_cpu_node_id+0xef: call to 
rseq_kernel_fields() with UACCESS enabled

Signed-off-by: Chen Linxuan <chenlinxuan@xxxxxxxxxxxxx>
---
 kernel/rseq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rseq.c b/kernel/rseq.c
index 
b7a1ec327e8117b47e353cab92d62111dd261520..7a4b6c211359714087a753047581bc8ff0c6c76b
 100644
--- a/kernel/rseq.c
+++ b/kernel/rseq.c
@@ -27,7 +27,7 @@
                                  RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE)
 
 #ifdef CONFIG_DEBUG_RSEQ
-static struct rseq *rseq_kernel_fields(struct task_struct *t)
+static __always_inline struct rseq *rseq_kernel_fields(struct task_struct *t)
 {
        return (struct rseq *) t->rseq_fields;
 }

-- 
2.43.0





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.