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:	Fri, 20 Mar 2015 12:05:34 +0800
From:	Xie XiuQi <xiexiuqi@...wei.com>
To:	Steven Rostedt <rostedt@...dmis.org>
CC:	Borislav Petkov <bp@...e.de>, <akpm@...ux-foundation.org>,
	<n-horiguchi@...jp.nec.com>, <gong.chen@...ux.intel.com>,
	<bhelgaas@...gle.com>, <tony.luck@...el.com>,
	<linux-kernel@...r.kernel.org>, <jingle.chen@...wei.com>
Subject: Re: [PATCH] trace, RAS: remove unnecessary const

On 2015/3/19 21:00, Steven Rostedt wrote:
> On Thu, 19 Mar 2015 19:57:17 +0800
> Xie XiuQi <xiexiuqi@...wei.com> wrote:
> 
>> On 2015/3/19 18:33, Borislav Petkov wrote:
>>> On Thu, Mar 19, 2015 at 04:50:04PM +0800, Xie XiuQi wrote:
>>>> These parameters are passed by value. There's no need to make them const.
>>>
>>> I can think of a reason:
>>>
>>> include/trace/../../include/ras/ras_event.h: In function ‘ftrace_raw_event_mc_event’:
>>> include/trace/../../include/ras/ras_event.h:136:35: error: assignment of read-only parameter ‘top_layer’
>>>    __entry->top_layer  = top_layer = 12;
>>
>> Oh, indeed. Thanks, Boris!
>>
> 
> Don't get too excited about that answer. If this is indeed the case,
> then all functions with parameters that do not get modify later should
> be set to const. Do we really want that? And how does this fix:
> 
> 	__entry->top_layer = 12;

Yes, I agree. I've retrieved the entire kernel source tree, and did not find
elsewhere such usage. Both sounds reasonable. Now, I've no idea about this patch.

Thanks Steve and Boris!

--
Xie XiuQi

> 
> -- Steve
> 
> .
> 


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