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-next>] [day] [month] [year] [list]
Date:	Thu, 30 Apr 2015 14:06:51 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	fabf@...net.be, ooo@...ctrozaur.com
Cc:	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1 linux-next] exofs: convert simple_str to kstr

>   case Opt_pid:
> + {
> + int rc;
> +
>   if (0 == match_strlcpy(str, &args[0], sizeof(str)))
>   return -EINVAL;
> - opts->pid = simple_strtoull(str, NULL, 0);
> + rc = kstrtoull(str, 0, &opts->pid);
> + if (rc)
> + return rc;

kstrto*() functions were designed for proc/sysfs/sysctl/debugfs/...
files accepting 1 value from shell:

  echo 42 >/proc/foo

To keep this simplest usecase simple kstrto*() functions accept
one optional newline character before mandatory NUL.
But in mount option parsing newlines aren't supposed to be.

I'll resend parse_integer() shortly which is better suited for such code
http://marc.info/?l=linux-kernel&m=142876674416451&w=4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ