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]
Message-Id: <20091126.144455.508149124281697063.mitake@dcl.info.waseda.ac.jp>
Date:	Thu, 26 Nov 2009 14:44:55 +0900 (JST)
From:	Hitoshi Mitake <mitake@....info.waseda.ac.jp>
To:	dvhltc@...ibm.com
Cc:	mingo@...e.hu, linux-kernel@...r.kernel.org, walken@...gle.com,
	a.p.zijlstra@...llo.nl, paulus@...ba.org, fweisbec@...il.com
Subject: Re: [PATCH 1/3] perf bench: Add wrappers for atomic operation of
 GCC

From: Darren Hart <dvhltc@...ibm.com>
Subject: Re: [PATCH 1/3] perf bench: Add wrappers for atomic operation of GCC
Date: Tue, 24 Nov 2009 08:20:18 -0800

Hi Darren,

> > It contains wrappers for atomic operation of GCC,
> > I think this is useful not only for 'perf bench',
> > but also for entire of perf command.
> > 
> > This patch adds new typedefed struct 'atomic_t'.
> > I know new typedef is not a thing to welcome,
> > but I believe that atomic_t is worth to typedef
> > because it is much general.
> > 
> > I borrowed this file from Darren Hart's futextest.
> > http://git.kernel.org/?p=linux/kernel/git/dvhart/futextest.git
> 
> Hi Hitoshi-san,
> 
> I took the gcc built-ins approach for futextest.h because I didn't want 
> the hassle of maintaining per-arch asm files. Since perf is already in 
> the kernel source, I wonder if you could leverage the already existing 
> kernel atomic code? See Documentation/atomic_ops.txt.

Yes, kernel source has atomic operations for every architecture.
But some architectures which has no 64bit atomic ops, like x86_32,
uses lib/atomic64.c.

And headers provided by arch depends on autoconf.h.
So if I use kernel atomic code, 'make menuconfig' must be done
before building perf. I think it's not good for users.

So I borrowed your approach.

> 
> > 
> > Signed-off-by: Hitoshi Mitake <mitake@....info.waseda.ac.jp>
> > Cc: Michel Lespinasse <walken@...gle.com>
> > Cc: Darren Hart <dvhltc@...ibm.com>
> > Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > Cc: Paul Mackerras <paulus@...ba.org>
> > Cc: Frederic Weisbecker <fweisbec@...il.com>
> > ---
> >  tools/perf/util/include/asm/atomic.h |   91 ++++++++++++++++++++++++++++++++++
> >  1 files changed, 91 insertions(+), 0 deletions(-)
> >  create mode 100644 tools/perf/util/include/asm/atomic.h
> > 
> > diff --git a/tools/perf/util/include/asm/atomic.h b/tools/perf/util/include/asm/atomic.h
> > new file mode 100644
> > index 0000000..1cef451
> > --- /dev/null
> > +++ b/tools/perf/util/include/asm/atomic.h
> > @@ -0,0 +1,91 @@
> > +/******************************************************************************
> > + *
> > + *   Copyright B) International Business Machines  Corp., 2009
> 
> B) should be © (or (C) at the very least), I'm guessing character set issue?

Sorry:( This must be character set issue. I'll fix.

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