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: <20170818183827.GF16480@axis.com>
Date:   Fri, 18 Aug 2017 20:38:27 +0200
From:   Jesper Nilsson <jesper.nilsson@...s.com>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Francis Deslauriers <francis.deslauriers@...icios.com>,
        mathieu.desnoyers@...icios.com, Ingo Molnar <mingo@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Ananth N Mavinakayanahalli <ananth@...ibm.com>,
        Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
        "David S . Miller" <davem@...emloft.net>,
        linux-kernel@...r.kernel.org,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Chris Zankel <chris@...kel.net>,
        Max Filippov <jcmvbkbc@...il.com>,
        Mikael Starvik <starvik@...s.com>,
        Jesper Nilsson <jespern@...s.com>, linux-cris-kernel@...s.com,
        linux-arch@...r.kernel.org
Subject: Re: [PATCH -tip v9 3/5] cris: mark _stext and _end as char-arrays,
 not single char


On Thu, Aug 03, 2017 at 11:37:15AM +0900, Masami Hiramatsu wrote:
> Mark _stext and _end as character arrays instead of single
> character, as same as include/asm-generic/sections.h does.

Looks good.

Acked-by: Jesper Nilsson <jesper.nilsson@...s.com>

> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> ---
>  arch/cris/arch-v32/mach-a3/arbiter.c |    4 ++--
>  arch/cris/arch-v32/mach-fs/arbiter.c |    4 ++--
>  arch/cris/kernel/traps.c             |    6 +++---
>  3 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/cris/arch-v32/mach-a3/arbiter.c b/arch/cris/arch-v32/mach-a3/arbiter.c
> index ab5c421a4de8..735a9b0abdb8 100644
> --- a/arch/cris/arch-v32/mach-a3/arbiter.c
> +++ b/arch/cris/arch-v32/mach-a3/arbiter.c
> @@ -227,7 +227,7 @@ static void crisv32_arbiter_config(int arbiter, int region, int unused_slots)
>  	}
>  }
>  
> -extern char _stext, _etext;
> +extern char _stext[], _etext[];
>  
>  static void crisv32_arbiter_init(void)
>  {
> @@ -265,7 +265,7 @@ static void crisv32_arbiter_init(void)
>  
>  #ifndef CONFIG_ETRAX_KGDB
>  	/* Global watch for writes to kernel text segment. */
> -	crisv32_arbiter_watch(virt_to_phys(&_stext), &_etext - &_stext,
> +	crisv32_arbiter_watch(virt_to_phys(_stext), _etext - _stext,
>  		MARB_CLIENTS(arbiter_all_clients, arbiter_bar_all_clients),
>  			      arbiter_all_write, NULL);
>  #endif
> diff --git a/arch/cris/arch-v32/mach-fs/arbiter.c b/arch/cris/arch-v32/mach-fs/arbiter.c
> index c97f4d8120f9..047c70bdbb23 100644
> --- a/arch/cris/arch-v32/mach-fs/arbiter.c
> +++ b/arch/cris/arch-v32/mach-fs/arbiter.c
> @@ -158,7 +158,7 @@ static void crisv32_arbiter_config(int region, int unused_slots)
>  	}
>  }
>  
> -extern char _stext, _etext;
> +extern char _stext[], _etext[];
>  
>  static void crisv32_arbiter_init(void)
>  {
> @@ -190,7 +190,7 @@ static void crisv32_arbiter_init(void)
>  
>  #ifndef CONFIG_ETRAX_KGDB
>  	/* Global watch for writes to kernel text segment. */
> -	crisv32_arbiter_watch(virt_to_phys(&_stext), &_etext - &_stext,
> +	crisv32_arbiter_watch(virt_to_phys(_stext), _etext - _stext,
>  			      arbiter_all_clients, arbiter_all_write, NULL);
>  #endif
>  }
> diff --git a/arch/cris/kernel/traps.c b/arch/cris/kernel/traps.c
> index a01636a12a6e..d98131c45bb5 100644
> --- a/arch/cris/kernel/traps.c
> +++ b/arch/cris/kernel/traps.c
> @@ -42,7 +42,7 @@ void (*nmi_handler)(struct pt_regs *);
>  void show_trace(unsigned long *stack)
>  {
>  	unsigned long addr, module_start, module_end;
> -	extern char _stext, _etext;
> +	extern char _stext[], _etext[];
>  	int i;
>  
>  	pr_err("\nCall Trace: ");
> @@ -69,8 +69,8 @@ void show_trace(unsigned long *stack)
>  		 * down the cause of the crash will be able to figure
>  		 * out the call path that was taken.
>  		 */
> -		if (((addr >= (unsigned long)&_stext) &&
> -		     (addr <= (unsigned long)&_etext)) ||
> +		if (((addr >= (unsigned long)_stext) &&
> +		     (addr <= (unsigned long)_etext)) ||
>  		    ((addr >= module_start) && (addr <= module_end))) {
>  #ifdef CONFIG_KALLSYMS
>  			print_ip_sym(addr);

/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- jesper.nilsson@...s.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ