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: <Y+0PzlA0LijhfD8R@dev-arch.thelio-3990X>
Date:   Wed, 15 Feb 2023 10:01:02 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Chris Down <chris@...isdown.name>
Cc:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>, mcgrof@...nel.org,
        ndesaulniers@...gle.com, trix@...hat.com,
        linux-modules@...r.kernel.org, linux-kernel@...r.kernel.org,
        bpf@...r.kernel.org, llvm@...ts.linux.dev,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: Re: [PATCH] module: Remove the unused function within

On Wed, Feb 15, 2023 at 04:47:44PM +0000, Chris Down wrote:
> Jiapeng Chong writes:
> > The function within is defined in the main.c file, but not called
> > elsewhere, so remove this unused function.
> 
> Huh? It's used by __module_text_address(), no?

Not after commit 2ece476a2346 ("module: replace module_layout with
module_memory") in -next. This patch should have a fixes tag, even if
the warning is currently hidden behind W=1.

> > kernel/module/main.c:3007:19: warning: unused function 'within'.
> > 
> > Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4035
> > Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> > ---
> > kernel/module/main.c | 5 -----
> > 1 file changed, 5 deletions(-)
> > 
> > diff --git a/kernel/module/main.c b/kernel/module/main.c
> > index c598f11e7016..062065568b40 100644
> > --- a/kernel/module/main.c
> > +++ b/kernel/module/main.c
> > @@ -3004,11 +3004,6 @@ SYSCALL_DEFINE3(finit_module, int, fd, const char __user *, uargs, int, flags)
> > 	return load_module(&info, uargs, flags);
> > }
> > 
> > -static inline int within(unsigned long addr, void *start, unsigned long size)
> > -{
> > -	return ((void *)addr >= start && (void *)addr < start + size);
> > -}
> > -
> > /* Keep in sync with MODULE_FLAGS_BUF_SIZE !!! */
> > char *module_flags(struct module *mod, char *buf, bool show_state)
> > {
> > -- 
> > 2.20.1.7.g153144c
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ