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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 27 Aug 2018 09:39:07 -0700
From:   Dave Taht <dave.taht@...il.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     Yousuk Seung <ysseung@...gle.com>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        David Ahern <dsahern@...il.com>,
        Michael McLennan <nefario@...gle.com>,
        Priyaranjan Jha <priyarjha@...gle.com>,
        Neal Cardwell <ncardwell@...gle.com>
Subject: Re: [PATCH v2 iproute2-next 1/3] tc: support conversions to or from
 64 bit nanosecond-based time

On Mon, Aug 27, 2018 at 9:11 AM Stephen Hemminger
<stephen@...workplumber.org> wrote:
>
> On Sun, 26 Aug 2018 19:42:28 -0700
> Yousuk Seung <ysseung@...gle.com> wrote:
>
> > +int get_time(unsigned int *time, const char *str)
> > +{
> > +     double t;
> > +     char *p;
> > +
> > +     t = strtod(str, &p);
> > +     if (p == str)
> > +             return -1;
> > +
> > +     if (*p) {
> > +             if (strcasecmp(p, "s") == 0 || strcasecmp(p, "sec") == 0 ||
> > +                 strcasecmp(p, "secs") == 0)
> > +                     t *= TIME_UNITS_PER_SEC;
> > +             else if (strcasecmp(p, "ms") == 0 || strcasecmp(p, "msec") == 0 ||
> > +                      strcasecmp(p, "msecs") == 0)
> > +                     t *= TIME_UNITS_PER_SEC/1000;
> > +             else if (strcasecmp(p, "us") == 0 || strcasecmp(p, "usec") == 0 ||
> > +                      strcasecmp(p, "usecs") == 0)
> > +                     t *= TIME_UNITS_PER_SEC/1000000;
> > +             else
> > +                     return -1;
>
> Do we need to really support UPPER case.

But that's  ALWAYS been the case in the 32 bit version of code above.
Imagine how many former VMS and MVS hackers you'd upset if they had to
turn caps-lock off!

> Isn't existing matches semantics good enough?

But that's the existing case for the 32 bit api, now replicated in the
64 bit api. ? I think the case-insensitive ship has sailed here. Can't
break userspace.

Well.. adding UTF-8 would be cool. We could start using the actual
greek  symbols for delta (δ) and beta (β) in particular. It would
replace a lot of typing, with a whole bunch more shift keys on a
single letter, fit better into
80 column lines, and so on, and tc inputs and outputs are already
pretty greek to many.
--

Dave Täht
CEO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-669-226-2619

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ