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]
Message-ID: <53824787.4030905@colorfullife.com>
Date:	Sun, 25 May 2014 21:41:59 +0200
From:	Manfred Spraul <manfred@...orfullife.com>
To:	Joe Perches <joe@...ches.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Davidlohr Bueso <davidlohr.bueso@...com>,
	Michael Kerrisk <mtk.manpages@...il.com>, 1vier1@....de
Subject: Re: [PATCH 7/6] ipc/sem.c: add a printk_once for semctl(GETNCNT/GETZCNT)

Hi Joe,

On 05/25/2014 08:39 PM, Joe Perches wrote:
> On Sun, 2014-05-25 at 20:21 +0200, Manfred Spraul wrote:
> +	 */
> +	printk_once(KERN_INFO "semctl(GETNCNT/GETZCNT) is since 3.16 Single " \
> +				"Unix Specification compliant.\n" \
> +				"The task %d triggered the difference, " \
> +				"watch for misbehavior.", current->pid);
> Unnecessary line continuations.
> Missing terminating newline after "misbehavior"
> Ideally coalesced or broken at linebreaks like:
>
> 	pr_info_once("semctl(GETNCNT/GETZCNT) is Single Unix Specification compliant since kernel v3.16\n"
> 		     "Task %d triggered the difference, watch for misbehavior\n",
> 		     current->pid);
Thanks. I'll try to remember to really run checkpatch instead of 
assuming what it might report.
>>   	if (sop->sem_num != semnum)
>>   		return 0;
>>   
> Should the printk_once (which could be pr_info_once or _ratelimited
> or maybe even emitted at KERN_DEBUG) be done only when
> the return is 1?
>
To fully check if there is a difference would mean that the old code and 
the new code run in parallel.

The code might trigger slightly too often, but since there are zero 
known users of GETZCNT / GETNCNT simplicity wins.

--
     Manfred
--
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