[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
- To: Keith Busch <kbusch@xxxxxxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, Sagi Grimberg <sagi@xxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Yishai Hadas <yishaih@xxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, Shameer Kolothum <shameerali.kolothum.thodi@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Peter Huewe <peterhuewe@xxxxxx>, Jarkko Sakkinen <jarkko@xxxxxxxxxx>, Masahiro Yamada <masahiroy@xxxxxxxxxx>, Nathan Chancellor <nathan@xxxxxxxxxx>, Nicolas Schier <nicolas.schier@xxxxxxxxx>, Nick Desaulniers <nick.desaulniers+lkml@xxxxxxxxx>, Bill Wendling <morbo@xxxxxxxxxx>, Justin Stitt <justinstitt@xxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>, Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Brendan Jackman <jackmanb@xxxxxxxxxx>, Johannes Weiner <hannes@xxxxxxxxxxx>, Zi Yan <ziy@xxxxxxxxxx>, Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, "Paul E. McKenney" <paulmck@xxxxxxxxxx>, Boqun Feng <boqun.feng@xxxxxxxxx>, Dmitry Vyukov <dvyukov@xxxxxxxxxx>, Andrey Konovalov <andreyknvl@xxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>
- From: Chen Linxuan via B4 Relay <devnull+chenlinxuan.uniontech.com@xxxxxxxxxx>
- Date: Tue, 29 Apr 2025 12:06:09 +0800
- Cc: linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, kvm@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxx, linux-integrity@xxxxxxxxxxxxxxx, linux-kbuild@xxxxxxxxxxxxxxx, llvm@xxxxxxxxxxxxxxx, Winston Wen <wentao@xxxxxxxxxxxxx>, kasan-dev@xxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Chen Linxuan <chenlinxuan@xxxxxxxxxxxxx>, Changbin Du <changbin.du@xxxxxxxxx>
- Delivery-date: Tue, 29 Apr 2025 06:33:37 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
|