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:	Tue, 24 May 2011 23:37:35 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Vince Weaver <vweaver1@...s.utk.edu>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	linux-kernel@...r.kernel.org, paulus@...ba.org, acme@...hat.com
Subject: Re: perf: regression -- missing /sys/devices/system/cpu/perf_events


* Vince Weaver <vweaver1@...s.utk.edu> wrote:

> On Tue, 24 May 2011, Ingo Molnar wrote:
> > 
> > So, what is wrong with the method Peter suggested: the presence of the perf 
> > syscall (it not returning -ENOSYS) is bona fide evidence that perf is 
> > available.
> 
> it's just hard to do that from a shell script.

Yeah.

> also, running the perf syscall can be tricky if you have a new kernel but an 
> older set of header files that doesn't have the syscall number defined.

I suspect you could add some quick band-aid like:

#ifndef __NR_perf_event_open
# ifdef __i386__
#  define __NR_perf_event_open 336
# endif
# ifdef __x86_64__ 
#  define __NR_perf_event_open 298
# endif
# ifdef __powerpc__
#  define __NR_perf_event_open 319
# endif
# ifdef __arm__
#  define __NR_perf_event_open 364
# endif
#endif

#ifndef __NR_perf_event_open
# error Please add the __NR_perf_event_open definition for this architecture!
#endif

This should cover 99% of the users - and fill in the table as people report 
build failures :)

Thanks,

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