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, 2 Feb 2011 14:15:00 -0000
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Steven Rostedt" <rostedt@...dmis.org>,
	"Ian Munsie" <imunsie@....ibm.com>
Cc:	"Andreas Dilger" <adilger@...ger.ca>,
	"Andreas Schwab" <schwab@...ux-m68k.org>,
	"Dave Kleikamp" <shaggy@...ux.vnet.ibm.com>,
	"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
	"Namhyung Kim" <namhyung@...il.com>,
	"Jiri Kosina" <jkosina@...e.cz>, "Jason Baron" <jbaron@...hat.com>,
	<linux-kernel@...r.kernel.org>, "Alexander Graf" <agraf@...e.de>,
	"Ingo Molnar" <mingo@...hat.com>,
	"Paul Mackerras" <paulus@...ba.org>,
	"KOSAKI Motohiro" <kosaki.motohiro@...fujitsu.com>,
	"Frederic Weisbecker" <fweisbec@...il.com>,
	"Scott Wood" <scottwood@...escale.com>,
	"Nathan Lynch" <ntl@...ox.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"David Gibson" <dwg@....ibm.com>,
	"linuxppc-dev" <linuxppc-dev@...ts.ozlabs.org>,
	"Avantika Mathur" <mathur@...ux.vnet.ibm.com>
Subject: RE: [PATCH 4/6] ftrace syscalls: Allow arch specific syscallsymbol matching

 
> +#define arch_syscall_match_sym_name(sym, name) !strcmp(sym + 3, name
+ 3)

Whenever you use a #define macro arg, you should enclose it in ().
About the only time you don't need to is when it is being
passed as an argument to another function
(ie when it's use is also ',' separated).

So the above ought to be:
#define arch_syscall_match_sym_name(sym, name) (!strcmp((sym) + 3,
(name) + 3))

Whether an inline function is better or worse is much more subtle!
For instance I've used:
   asm volatile ( "# line " STR(__LINE__) :: )
to stop gcc merging the tails of conditionals.
Useful when the conditional is at the end of a loop (etc),
it might increase code size slightly, but removes a branch.

If I put one of those in an 'inline' function separate copies
of the function end up sharing code.
With a #define __LINE__ differs so they don't.

(I had some code to get below 190 clocks, these changes
were significant!)

	David


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