lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250429-noautoinline-v3-6-4c49f28ea5b5@uniontech.com>
Date: Tue, 29 Apr 2025 12:06:10 +0800
From: Chen Linxuan via B4 Relay <devnull+chenlinxuan.uniontech.com@...nel.org>
To: Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...nel.dk>, 
 Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>, 
 Andrew Morton <akpm@...ux-foundation.org>, 
 Yishai Hadas <yishaih@...dia.com>, Jason Gunthorpe <jgg@...pe.ca>, 
 Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>, 
 Kevin Tian <kevin.tian@...el.com>, 
 Alex Williamson <alex.williamson@...hat.com>, 
 Peter Huewe <peterhuewe@....de>, Jarkko Sakkinen <jarkko@...nel.org>, 
 Masahiro Yamada <masahiroy@...nel.org>, 
 Nathan Chancellor <nathan@...nel.org>, 
 Nicolas Schier <nicolas.schier@...ux.dev>, 
 Nick Desaulniers <nick.desaulniers+lkml@...il.com>, 
 Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>, 
 Vlastimil Babka <vbabka@...e.cz>, Suren Baghdasaryan <surenb@...gle.com>, 
 Michal Hocko <mhocko@...e.com>, Brendan Jackman <jackmanb@...gle.com>, 
 Johannes Weiner <hannes@...xchg.org>, Zi Yan <ziy@...dia.com>, 
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, 
 Peter Zijlstra <peterz@...radead.org>, 
 "Paul E. McKenney" <paulmck@...nel.org>, Boqun Feng <boqun.feng@...il.com>, 
 Dmitry Vyukov <dvyukov@...gle.com>, Andrey Konovalov <andreyknvl@...il.com>, 
 Juergen Gross <jgross@...e.com>, 
 Boris Ostrovsky <boris.ostrovsky@...cle.com>, 
 Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, 
 Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>, 
 x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>
Cc: linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org, 
 linux-mm@...ck.org, kvm@...r.kernel.org, virtualization@...ts.linux.dev, 
 linux-integrity@...r.kernel.org, linux-kbuild@...r.kernel.org, 
 llvm@...ts.linux.dev, Winston Wen <wentao@...ontech.com>, 
 kasan-dev@...glegroups.com, xen-devel@...ts.xenproject.org, 
 Chen Linxuan <chenlinxuan@...ontech.com>, 
 Changbin Du <changbin.du@...el.com>
Subject: [PATCH RFC v3 6/8] kcov: add __always_inline for canonicalize_ip

From: Chen Linxuan <chenlinxuan@...ontech.com>

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 a objtool warning:

  vmlinux.o: warning: objtool: __sanitizer_cov_trace_pc+0xc: call to canonicalize_ip() with UACCESS enabled

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

diff --git a/kernel/kcov.c b/kernel/kcov.c
index 187ba1b80bda169d2f7efead5c6076b8829522ca..a2e2d3c655406b5a1f53e4855c782727b0541935 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -194,7 +194,7 @@ static notrace bool check_kcov_mode(enum kcov_mode needed_mode, struct task_stru
 	return mode == needed_mode;
 }
 
-static notrace unsigned long canonicalize_ip(unsigned long ip)
+static __always_inline notrace unsigned long canonicalize_ip(unsigned long ip)
 {
 #ifdef CONFIG_RANDOMIZE_BASE
 	ip -= kaslr_offset();

-- 
2.43.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ