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] [day] [month] [year] [list]
Message-ID: <20180911124954.zwhzxshx6zzddj4v@holly.lan>
Date:   Tue, 11 Sep 2018 13:49:54 +0100
From:   Daniel Thompson <daniel.thompson@...aro.org>
To:     Laura Abbott <labbott@...hat.com>
Cc:     Jason Wessel <jason.wessel@...driver.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        kgdb-bugreport@...ts.sourceforge.net, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kgdboc: Fix restrict error

On Mon, Sep 10, 2018 at 04:20:14PM -0700, Laura Abbott wrote:
> There's an error when compiled with restrict:
> 
> drivers/tty/serial/kgdboc.c: In function ‘configure_kgdboc’:
> drivers/tty/serial/kgdboc.c:137:2: error: ‘strcpy’ source argument is the same
> as destination [-Werror=restrict]
>   strcpy(config, opt);
>   ^~~~~~~~~~~~~~~~~~~
> 
> As the error implies, this is from trying to use config as both source and
> destination. Drop the call to the function where config is the argument
> since nothing else happens in the function.
> 
> Signed-off-by: Laura Abbott <labbott@...hat.com>

Reviewed-by: Daniel Thompson <daniel.thompson@...aro.org>

> ---
>  drivers/tty/serial/kgdboc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
> index b4ba2b1dab76..dd503743bbff 100644
> --- a/drivers/tty/serial/kgdboc.c
> +++ b/drivers/tty/serial/kgdboc.c
> @@ -154,15 +154,13 @@ static int configure_kgdboc(void)
>  {
>  	struct tty_driver *p;
>  	int tty_line = 0;
> -	int err;
> +	int err = -ENODEV;
>  	char *cptr = config;
>  	struct console *cons;
>  
> -	err = kgdboc_option_setup(config);
> -	if (err || !strlen(config) || isspace(config[0]))
> +	if (!strlen(config) || isspace(config[0]))
>  		goto noconfig;
>  
> -	err = -ENODEV;
>  	kgdboc_io_ops.is_console = 0;
>  	kgdb_tty_driver = NULL;
>  
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ