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: <CAH2r5mvvVwSFf7y=YB0=gxGPOhVaN2zwNvFdRSh_E5Dk7hAMEg@mail.gmail.com>
Date:   Sat, 14 Jan 2023 12:11:16 -0600
From:   Steve French <smfrench@...il.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Steve French <sfrench@...ba.org>, Paulo Alcantara <pc@....nz>,
        Ronnie Sahlberg <lsahlber@...hat.com>,
        Shyam Prasad N <sprasad@...rosoft.com>,
        Tom Talpey <tom@...pey.com>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org, linux-cifs@...r.kernel.org,
        samba-technical@...ts.samba.org
Subject: Re: [PATCH v2] cifs: Use kstrtobool() instead of strtobool()

merged into cifs-2.6.git for-next

On Sat, Jan 14, 2023 at 2:58 AM Christophe JAILLET
<christophe.jaillet@...adoo.fr> wrote:
>
> strtobool() is the same as kstrtobool().
> However, the latter is more used within the kernel.
>
> In order to remove strtobool() and slightly simplify kstrtox.h, switch to
> the other function name.
>
> While at it, include the corresponding header file (<linux/kstrtox.h>)
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> This patch was already sent as a part of a serie ([1]) that axed all usages
> of strtobool().
> Most of the patches have been merged in -next.
>
> I synch'ed with latest -next and re-send the remaining ones as individual
> patches.
>
> Changes in v2:
>   - synch with latest -next.
>
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>  fs/cifs/cifs_debug.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
> index 56b23def4c95..612f0bb284c9 100644
> --- a/fs/cifs/cifs_debug.c
> +++ b/fs/cifs/cifs_debug.c
> @@ -8,6 +8,7 @@
>  #include <linux/fs.h>
>  #include <linux/string.h>
>  #include <linux/ctype.h>
> +#include <linux/kstrtox.h>
>  #include <linux/module.h>
>  #include <linux/proc_fs.h>
>  #include <linux/uaccess.h>
> @@ -787,7 +788,7 @@ static ssize_t cifsFYI_proc_write(struct file *file, const char __user *buffer,
>         rc = get_user(c[0], buffer);
>         if (rc)
>                 return rc;
> -       if (strtobool(c, &bv) == 0)
> +       if (kstrtobool(c, &bv) == 0)
>                 cifsFYI = bv;
>         else if ((c[0] > '1') && (c[0] <= '9'))
>                 cifsFYI = (int) (c[0] - '0'); /* see cifs_debug.h for meanings */
> @@ -947,7 +948,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
>
>         if (count < 3) {
>                 /* single char or single char followed by null */
> -               if (strtobool(flags_string, &bv) == 0) {
> +               if (kstrtobool(flags_string, &bv) == 0) {
>                         global_secflags = bv ? CIFSSEC_MAX : CIFSSEC_DEF;
>                         return count;
>                 } else if (!isdigit(flags_string[0])) {
> --
> 2.34.1
>


-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ