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: <7c86c4470811260556l3b161f1fx639d7ee02285a93@mail.gmail.com>
Date:	Wed, 26 Nov 2008 14:56:44 +0100
From:	"stephane eranian" <eranian@...glemail.com>
To:	"Thomas Gleixner" <tglx@...utronix.de>
Cc:	"Stephen Rothwell" <sfr@...b.auug.org.au>,
	"Andi Kleen" <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, mingo@...e.hu, x86@...nel.org
Subject: Re: [patch 05/24] perfmon: X86 generic code (x86)

Thomas,

On Wed, Nov 26, 2008 at 2:32 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> On Wed, 26 Nov 2008, Stephen Rothwell wrote:
>> Hi Andi,
>>
>> On Wed, 26 Nov 2008 12:33:09 +0100 Andi Kleen <andi@...stfloor.org> wrote:
>> >
>> > > + * x86 does not need extra alignment requirements for the sampling buffer
>> > > + */
>> > > +#define PFM_ARCH_SMPL_ALIGN_SIZE 0
>> > > +
>> > > +asmlinkage void  pmu_interrupt(void);
>> > > +
>> > > +static inline void pfm_arch_bv_copy(u64 *a, u64 *b, int nbits)
>> >
>> > All these bitmap wrappers just seem like unnecessary obfuscation.
>> > Could you just drop them and call the standard functions directly?
>>
>> These were added after comments from the PowerPC maintainer since how the
>> bitmaps are accessed needs to be arch specific.
>
> Just because perfmon uses u64 for bitfields instead of unsigned
> long, therefor it breaks on BE32 machines.
>
> I have not yet found a good reason why it needs to use u64 instead of
> using what's there already.
>
There is a good reason why we cannot use unsigned long. We must make sure
all data structures exchanged between user mode and the kernel have fixed size.
This way, we can have a 32-bit tool run unmodified on top of a 64-bit kernel AND
we do not need trampoline code to marshall/unmarshall the parameters.

And yes, the abstraction for bitmask ops was introduced because of issues
casting u64 -> unsigned long on Big-Endian32-bit machines such as PPC32.
--
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