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, 29 Jul 2013 10:10:12 +0800
From:	Li Zefan <lizefan@...wei.com>
To:	Borislav Petkov <bp@...en8.de>
CC:	Steven Rostedt <rostedt@...dmis.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] tracing: Shrink the size of struct ftrace_event_field

>>>  static int __trace_define_field(struct list_head *head, const char *type,
>>>  				const char *name, int offset, int size,
>>>  				int is_signed, int filter_type)
>>> @@ -120,13 +123,16 @@ static int __trace_define_field(struct list_head *head, const char *type,
>>>  	field->type = type;
>>>  
>>>  	if (filter_type == FILTER_OTHER)
>>> -		field->filter_type = filter_assign_type(type);
>>> -	else
>>> -		field->filter_type = filter_type;
>>> +		filter_type = filter_assign_type(type);
>>>  
>>> +	field->filter_type = filter_type;
>>>  	field->offset = offset;
>>>  	field->size = size;
>>> -	field->is_signed = is_signed;
>>> +	field->is_signed = !!is_signed;
>>> +
>>> +	VERIFY_SIZE(filter_type);
>>> +	VERIFY_SIZE(offset);
>>> +	VERIFY_SIZE(size);
> 
> Isn't this wrap-a-macro-with-another-more-obscure-macro not a bit too
> much?
> 
> I mean,
>   	WARN_ON(filter_type > field->filter_type)
> 
> is much more readable than VERIFY_SIZE IMO.
> 

Oh, right. Using macro is a bit excessive here.

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