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: <20200203102809.7626e0bf9b83afc84c031f4c@kernel.org>
Date:   Mon, 3 Feb 2020 10:28:09 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     linux-kbuild@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Marc Zyngier <maz@...nel.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Will Deacon <will@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] kallsyms: fix type of kallsyms_token_table[]

On Sun,  2 Feb 2020 14:09:22 +0900
Masahiro Yamada <masahiroy@...nel.org> wrote:

> kallsyms_token_table[] only contains ASCII characters. It should be
> char instead of u8.

Indeed.

Reviewed-by: Masami Hiramatsu <mhiramat@...nel.org>

Thank you,

> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---
> 
>  kernel/kallsyms.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
> index 136ce049c4ad..53f84f685841 100644
> --- a/kernel/kallsyms.c
> +++ b/kernel/kallsyms.c
> @@ -44,7 +44,7 @@ __attribute__((weak, section(".rodata")));
>  extern const unsigned long kallsyms_relative_base
>  __attribute__((weak, section(".rodata")));
>  
> -extern const u8 kallsyms_token_table[] __weak;
> +extern const char kallsyms_token_table[] __weak;
>  extern const u16 kallsyms_token_index[] __weak;
>  
>  extern const unsigned int kallsyms_markers[] __weak;
> @@ -58,7 +58,8 @@ static unsigned int kallsyms_expand_symbol(unsigned int off,
>  					   char *result, size_t maxlen)
>  {
>  	int len, skipped_first = 0;
> -	const u8 *tptr, *data;
> +	const char *tptr;
> +	const u8 *data;
>  
>  	/* Get the compressed symbol length from the first symbol byte. */
>  	data = &kallsyms_names[off];
> -- 
> 2.17.1
> 


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ