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, 14 Apr 2010 05:52:52 -0400
From:	Jeff King <peff@...f.net>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	David Miller <davem@...emloft.net>, git@...r.kernel.org,
	imunsie@....ibm.com, linux-kernel@...r.kernel.org,
	a.p.zijlstra@...llo.nl, paulus@...ba.org, acme@...hat.com,
	kosaki.motohiro@...fujitsu.com, mitake@....info.waseda.ac.jp,
	rusty@...tcorp.com.au, fweisbec@...il.com, ebmunson@...ibm.com,
	Valdis.Kletnieks@...edu, amwang@...hat.com, tfransosi@...il.com,
	mhiramat@...hat.com, xiaoguangrong@...fujitsu.com,
	jaswinderrajput@...il.com, arjan@...ux.intel.com,
	hirofumi@...l.parknet.co.jp, efault@....de, tzanussi@...il.com,
	anton@...ba.org, jkacur@...hat.com, lizf@...fujitsu.com,
	rostedt@...dmis.org
Subject: Re: [PATCH] perf: Fix endianness argument compatibility

On Wed, Apr 14, 2010 at 11:28:43AM +0200, Ingo Molnar wrote:

> > > Parsing an option from the command line with OPT_BOOLEAN on a bool data
> > > type would not work on a big-endian machine due to the manner in which
> > > the boolean was being cast into an int and incremented. For example,
> > > running 'perf probe --list' on a PowerPC machine would fail to properly
> > > set the list_events bool and would therefore print out the usage
> > > information and terminate.
> [...]
>
> Nice fix!
> 
> Btw., perf got the option parser from the Git project - i'm wondering how the 
> Git folks solved this endianness problem?

We didn't. We pass only actual ints for the value field in all cases. We
don't use C99 bools at all. We do use bit-fields, but the compiler
catches the error, since OPT_BOOLEAN tries to take its address.

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