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: <buovdfeocht.fsf@dhlpc061.dev.necel.com>
Date:	Thu, 07 Jan 2010 11:49:34 +0900
From:	Miles Bader <miles@....org>
To:	Arnaldo Carvalho de Melo <acme@...radead.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: tools/perf: "perf record" restricted to root in latest kernel?

Arnaldo Carvalho de Melo <acme@...radead.org> writes:
>> Next I updated to the latest linus tree (c5974b835a), and recompiled perf.
>> It still seems to work, and has obviously had a lot of features added, but
>> now it only wants to let me run "perf record" if I'm root.
>
> Don't recall noticing such problem, here it works just fine:
>
> [acme@...pio linux-2.6-tip]$ mkdir tmp
> [acme@...pio linux-2.6-tip]$ cd tmp
> [acme@...pio tmp]$ time perf record find ~/git/ > /dev/null
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.053 MB perf.data (~2312 samples) ]

Weird... if I try your recipe, I get:

   $ cd /usr/local/tmp
   $ ls
   gstlfilt.zip  q2.jpg  q3.jpg
   $ time perf record find /usr/local/src/git/ > /dev/null
     Fatal: Permission error - are you root?

   real	0m0.032s
   user	0m0.004s
   sys	0m0.012s

> [acme@...pio linux-2.6-tip]$ uname -r
> 2.6.33-rc3-tip+

Perhaps the newer version of perf works better with newer kernels, or
with some specific option enabled?  [Since it's a fairly new tool, I
suppose it may not work well unless the perf version and the kernel
version are in sync.]

I'm using a standard debian kernel:

   $ uname -r
   2.6.32-trunk-amd64

   $ grep PERF_ /boot/config-2.6.32-trunk-amd64 
   CONFIG_HAVE_PERF_EVENTS=y
   CONFIG_PERF_EVENTS=y
   # CONFIG_PERF_COUNTERS is not set
   # CONFIG_DEBUG_PERF_USE_VMALLOC is not set

I notice that the system call which results in an error for me changed
between the two versions of perf -- from "sys_perf_counter_open" to
"sys_perf_event_open" -- though I don't understand the difference.

Thanks,

-Miles

-- 
Youth, n. The Period of Possibility, when Archimedes finds a fulcrum,
Cassandra has a following and seven cities compete for the honor of endowing a
living Homer.
--
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