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:	Wed, 1 Apr 2015 20:42:20 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	Shuah Khan <shuahkh@....samsung.com>
Cc:	Prarit Bhargava <prarit@...hat.com>,
	lkml <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Richard Cochran <richardcochran@...il.com>
Subject: Re: [PATCH 1/2] kselftests: timers: Make set-timer-lat fail more
 gracefully for !CAP_WAKE_ALARM

On Tue, Mar 31, 2015 at 8:55 AM, Shuah Khan <shuahkh@....samsung.com> wrote:
> Hi John,
>
> I am seeing checkpatch warnings on this patch. See below.

Sorry!

> On 03/26/2015 05:31 AM, Prarit Bhargava wrote:
>>
>>
>> On 03/25/2015 07:44 PM, John Stultz wrote:
>>> The set-timer-lat test fails when testing CLOCK_BOOTTIME_ALARM
>>> or CLOCK_REALTIME_ALARM when the user isn't running as root or
>>> with CAP_WAKE_ALARM.
>>>
>>> So this patch improves the error checking so we report the
>>> issue more clearly and continue rather then reporting a failure.
>>>
>>> Cc: Shuah Khan <shuahkh@....samsung.com>
>>> Cc: Prarit Bhargava <prarit@...hat.com>
>>> Cc: Thomas Gleixner <tglx@...utronix.de>
>>> Cc: Richard Cochran <richardcochran@...il.com>
>>> Signed-off-by: John Stultz <john.stultz@...aro.org>
>>> Signed-off-by: John Stultz <john.stultz@...aro.org>
>
> WARNING: Duplicate signature
> #115:
> Signed-off-by: John Stultz <john.stultz@...aro.org>

Fixed.

>>> ---
>>>  tools/testing/selftests/timers/set-timer-lat.c | 7 +++++++
>>>  1 file changed, 7 insertions(+)
>>>
>>> diff --git a/tools/testing/selftests/timers/set-timer-lat.c b/tools/testing/selftests/timers/set-timer-lat.c
>>> index 3ea2eff..dbc9537c 100644
>>> --- a/tools/testing/selftests/timers/set-timer-lat.c
>>> +++ b/tools/testing/selftests/timers/set-timer-lat.c
>>> @@ -139,6 +139,13 @@ int do_timer(int clock_id, int flags)
>>>
>>>      err = timer_create(clock_id, &se, &tm1);
>>>      if (err) {
>>> +            if ((clock_id == CLOCK_REALTIME_ALARM)
>>> +                            || (clock_id == CLOCK_BOOTTIME_ALARM)) {
>>
>> I dunno of there is actually a CodingStyle rule for this, but I've always seen
>> this written with the operator on the first line:
>
> Yes it would be good to fix this one as well when you re-do the patch.

Fixed.

>>
>>       if ((clock_id == CLOCK_REALTIME_ALARM) ||
>>             (clock_id == CLOCK_BOOTTIME_ALARM)) {
>>
>>> +                    printf("%-22s %s missing CAP_WAKE_ALARM?    : [UNSUPPORTED]\n",
>>> +                                    clockstring(clock_id),
>>> +                                    flags ? "ABSTIME":"RELTIME");
>>
>
> WARNING: line over 80 characters
> #130: FILE: tools/testing/selftests/timers/set-timer-lat.c:144:
> +                       printf("%-22s %s missing CAP_WAKE_ALARM?    : [UNSUPPORTED]\n",

This I probably will leave, as the alternative is breaking the text
string across lines, which checkpatch will also gripe about.

thanks
-john
--
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