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]
Date:   Tue, 21 Nov 2017 19:46:46 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     shuah@...nel.org, linux-kselftest@...r.kernel.org,
        Frederic Weisbecker <fweisbec@...il.com>,
        John Stultz <john.stultz@...aro.org>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Shuah Khan <shuahkh@....samsung.com>
Subject: Re: [PATCH] selftests: posix_timers: Use common error handling code
 in two functions

>> Add jump targets so that a bit of exception handling can be better reused
>> at the end of these functions.
>>
>> This issue was detected by using the Coccinelle software.
> 
> Please include Coccinelle report in the change log.

I guess that I can not append the kind of report you might be looking for
so far. This small update suggestion is just another result from one
of my evolving scripts for the semantic patch language.

It was discussed under the topic “Comparing statement lists with SmPL”
to some degree.
https://systeme.lip6.fr/pipermail/cocci/2017-August/004388.html


>> @@ -104,10 +104,8 @@ static int check_itimer(int which)
>>  		signal(SIGALRM, sig_handler);
>>  
>>  	err = gettimeofday(&start, NULL);
>> -	if (err < 0) {
>> -		perror("Can't call gettimeofday()\n");
>> -		return -1;
>> -	}
>> +	if (err < 0)
>> +		goto report_failure;
> 
> Instead of report_failure, makes this specific to the failure.
> Something like, gettimeofday_error

Would you like to achieve unique error messages in this use case?

Regards,
Markus

Powered by blists - more mailing lists