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: <20141031100005.GH1313@kernel.org>
Date:	Fri, 31 Oct 2014 08:00:05 -0200
From:	Arnaldo Carvalho de Melo <acme@...radead.org>
To:	Vince Weaver <vince@...ter.net>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
	Matt Fleming <matt@...sole-pimps.org>,
	Andy Lutomirski <luto@...capital.net>,
	Stephane Eranian <eranian@...gle.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFD] perf syscall error handling

Em Thu, Oct 30, 2014 at 09:16:36PM -0400, Vince Weaver escreveu:
> On Thu, 30 Oct 2014, Peter Zijlstra wrote:
> 
> > So would something simple, like an offset into the struct
> > perf_event_attr pointing at the current field we're trying to process
> > make sense? Maybe with negative offsets to indicate the syscall
> > arguments?
> > 
> > That would narrow down the 'WTF is wrong noaw' a lot I think. But then,
> > I've not actually done a lot of userspace the last few years, so maybe
> > I'm just dreaming things.
> 
> well, as someone who spends a lot of time in userspace trying to help 
> people who report probems like 'perf_event_open() returns EINVAL, what's 
> wrong' I can say pretty much anything will be an improvement.
> 
> What would really help is if we could somehow return the 
> filename/line-number of whatever source code file that's setting errno.
> 
> Even if perf_event_open() told me that hey, we're getting EOPNOTSUPP due 
> to the precise_ip parameter (something that happened just yesterday) it's 
> still a lot of grepping and poking around source files to find out what's 
> going on.  It would be much better if it just told me the issue was at
> kernel/events/core.c line 995 or so, but I'm not sure how you could pass 
> that back to the user, and one could argue it wouldn't help much the 
> average user without a kernel tree lying around.

But perhaps we can have a mode where we can say to perf to setup
function tracing in the sys_perf_event_open() for the perf tool pid,
that would output the lines leading to the return ERRNO.

Or use 'perf probe'  like stuff to insert/enable some kretprobes, both
ideas need some prototyping and would require root privilege :-\

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