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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240907201445.pzdgxcmqwusipwzh@treble>
Date: Sat, 7 Sep 2024 13:14:45 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Song Liu <song@...nel.org>
Cc: live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
	x86@...nel.org, Miroslav Benes <mbenes@...e.cz>,
	Petr Mladek <pmladek@...e.com>,
	Joe Lawrence <joe.lawrence@...hat.com>,
	Jiri Kosina <jikos@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Marcos Paulo de Souza <mpdesouza@...e.com>
Subject: Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

On Sat, Sep 07, 2024 at 10:43:10AM -0700, Song Liu wrote:
> clang gives the following:
> 
> elf.c:102:1: error: unused function '__sym_remove' [-Werror,-Wunused-function]
>   102 | INTERVAL_TREE_DEFINE(struct symbol, node, unsigned long, __subtree_last,
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   103 |                      __sym_start, __sym_last, static inline, __sym)
>       |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /data/users/songliubraving/kernel/linux-git/tools/include/linux/interval_tree_generic.h:65:15:
> note: expanded from macro 'INTERVAL_TREE_DEFINE'
>    65 | ITSTATIC void ITPREFIX ## _remove(ITSTRUCT *node,
>                \
>       |               ^~~~~~~~~~~~~~~~~~~
> <scratch space>:155:1: note: expanded from here
>   155 | __sym_remove
>       | ^~~~~~~~~~~~
> 1 error generated.

Here's how __sym_remove() is created:

#define INTERVAL_TREE_DEFINE(ITSTRUCT, ITRB, ITTYPE, ITSUBTREE,		      \
			     ITSTART, ITLAST, ITSTATIC, ITPREFIX)	      \
...
									      
ITSTATIC void ITPREFIX ## _remove(ITSTRUCT *node,			      \
				  struct rb_root_cached *root)		      \

INTERVAL_TREE_DEFINE(struct symbol, node, unsigned long, __subtree_last,
		     __sym_start, __sym_last, static inline, __sym)

ITSTATIC is 'static inline' so it shouldn't be complaining about it
being unused, right?

If you add -E to the cflags to get preprocessed output, can you confirm
__sym_remove() is 'static inline'?

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ