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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 16 Sep 2019 15:57:56 +0200
From:   Eugeniu Rosca <erosca@...adit-jv.com>
To:     shuah <shuah@...nel.org>
CC:     Eugeniu Rosca <roscaeugeniu@...il.com>,
        "George G. Davis" <george_davis@...tor.com>,
        Jerry Hoemann <jerry.hoemann@....com>,
        Colin Ian King <colin.king@...onical.com>,
        <linux-kselftest@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Eugeniu Rosca <erosca@...adit-jv.com>
Subject: Re: [PATCH 2/2] selftests: watchdog: Add command line option to show
 watchdog_info

Hi Shuah,
CC George

On Mon, Sep 16, 2019 at 07:26:41AM -0600, shuah wrote:
[..]
> >   		case 'f':
> >   			/* Handled above */
> >   			break;
> > +		case 'i':
> > +			/*
> > +			 * watchdog_info was obtained as part of file open
> > +			 * validation. So we just show it here.
> > +			 */
> > +			oneshot = 1;
> > +			printf("watchdog_info:\n");
> > +			printf(" identity:\t\t%s\n", info.identity);
> > +			printf(" firmware_version:\t%u\n",
> > +			       info.firmware_version);
> > +			printf(" options:\t\t%08x\n", info.options);
> > +			break;
> >   		default:
> >   			usage(argv[0]);
> > 
> 
> I would like to see these combined. Please don't add another argument.
> Combine patch and 1&2.

With all my appreciation for your comment, why do you think it is better
to get rid of the new argument? I don't think it is user-friendly to
always report the watchdog_info to the user. Just look at outputs [1-2]
and imagine that the watchdog_info part would pop up unconditionally.
It looks too busy to me.

[1] watchdog-test -b -i
Last boot is caused by: Power-On-Reset.
watchdog_info:
 identity:              Renesas WDT Watchdog
 firmware_version:      0
 options:               000081a0

[2] watchdog-test -i --help    
watchdog_info:
 identity:              Renesas WDT Watchdog
 firmware_version:      0
 options:               000081a0
Usage: ./watchdog-test [options]
 -f, --file             Open watchdog device file
                        Default is /dev/watchdog
 -i, --info             Show watchdog_info
 -b, --bootstatus       Get last boot status (Watchdog/POR)
 -d, --disable          Turn off the watchdog timer
 -e, --enable           Turn on the watchdog timer
 -h, --help             Print the help message
 -p, --pingrate=P       Set ping rate to P seconds (default 1)
 -t, --timeout=T        Set timeout to T seconds
 -T, --gettimeout       Get the timeout
 -n, --pretimeout=T     Set the pretimeout to T seconds
 -N, --getpretimeout    Get the pretimeout
 -L, --gettimeleft      Get the time left until timer expires

Parameters are parsed left-to-right in real-time.
Example: ./watchdog-test -d -t 10 -p 5 -e
Example: ./watchdog-test -t 12 -T -n 7 -N

-- 
Best Regards,
Eugeniu.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ