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: <20190716173354.32575715@gandalf.local.home>
Date:   Tue, 16 Jul 2019 17:33:54 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     xywang.sjtu@...u.edu.cn
Cc:     mingo@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] tracing: replace simple_strtol() by kstrtoint()

On Mon, 15 Jul 2019 16:58:55 +0800
xywang.sjtu@...u.edu.cn wrote:

> From: Wang Xiayang <xywang.sjtu@...u.edu.cn>
> 
> The simple_strtol() function is deprecated. kstrto[l,int]() are
> the correct replacements as they can properly handle overflows.
> 
> This patch replaces the deprecated simple_strtol() use introduced recently.
> As skip_entries is actually int-typed, we are safe to use kstrtoint() here.
> 
> Same as before, set 0 to skip_entries on string parsing error.
> 
> Fixes: dbfe67334a17 ("tracing: kdb: The skip_lines parameter should have been skip_entries")

This patch doesn't "fix" anything. It's more of a clean up.

I'll look at it after the merge window. Same for the other patch.

-- Steve

> Signed-off-by: Wang Xiayang <xywang.sjtu@...u.edu.cn>
> ---
>  kernel/trace/trace_kdb.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel/trace/trace_kdb.c b/kernel/trace/trace_kdb.c
> index cca65044c14c..5d9dd4c3f23f 100644
> --- a/kernel/trace/trace_kdb.c
> +++ b/kernel/trace/trace_kdb.c
> @@ -104,8 +104,7 @@ static int kdb_ftdump(int argc, const char **argv)
>  		return KDB_ARGCOUNT;
>  
>  	if (argc) {
> -		skip_entries = simple_strtol(argv[1], &cp, 0);
> -		if (*cp)
> +		if (kstrtoint(argv[1], 0, &skip_entries))
>  			skip_entries = 0;
>  	}
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ