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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=X+YLXs8GugQUhqK9aQM_eRzoJwLc0Yb_OwW9baqHkPKw@mail.gmail.com>
Date: Mon, 28 Oct 2024 11:11:52 -0700
From: Doug Anderson <dianders@...omium.org>
To: Nir Lichtman <nir@...htman.org>
Cc: kgdb-bugreport@...ts.sourceforge.net, linux-trace-kernel@...r.kernel.org, 
	yuran.pereira@...mail.com, jason.wessel@...driver.com, 
	daniel.thompson@...aro.org, rostedt@...dmis.org, mhiramat@...nel.org, 
	linux-kernel@...r.kernel.org, linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH v3 1/3] kdb: Replace the use of simple_strto with safer
 kstrto in kdb_main

Hi,

On Sat, Oct 26, 2024 at 7:54 AM Nir Lichtman <nir@...htman.org> wrote:
>
> @@ -2083,15 +2064,10 @@ static int kdb_dmesg(int argc, const char **argv)
>         if (argc > 2)
>                 return KDB_ARGCOUNT;
>         if (argc) {
> -               char *cp;
> -               lines = simple_strtol(argv[1], &cp, 0);
> -               if (*cp)
> +               if (kstrtoint(argv[1], 0, &lines))
>                         lines = 0;
> -               if (argc > 1) {
> -                       adjust = simple_strtoul(argv[2], &cp, 0);
> -                       if (*cp || adjust < 0)
> -                               adjust = 0;
> -               }
> +               if (argc > 1 && (kstrtouint(argv[2], 0, &adjust) || adjust < 0))

Between v2 and v3 you regressed. The kstrtouint() was supposed to be
changed to kstrtoint() here.

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ