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, 6 Mar 2012 07:27:27 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:	Arun Sharma <asharma@...com>,
	Peter Zijlstra <peterz@...radead.org>,
	Stephane Eranian <eranian@...gle.com>,
	linux-kernel@...r.kernel.org, dsahern@...il.com, ravitillo@....gov,
	khandual@...ux.vnet.ibm.com, robert.richter@....com,
	ming.m.lin@...el.com, vweaver1@...s.utk.edu, andi@...stfloor.org
Subject: Re: [PATCH] perf report: auto-detect branch stack sampling mode


* Arnaldo Carvalho de Melo <acme@...hat.com> wrote:

> > Something like this seems to do it for me.
> > 
> >         offset = addr - sym->start;
> > +       len = sym->end - sym->start;
> > +       if (offset >= len)
> > +               return 0;
> > +
> 
> That is my fault, I should have added a BUG_ON() spitting out 
> a callchain in this case, as that function shouldn't be called 
> if the address is not within its range :-\

Btw., I'd suggest not doing a BUG_ON() but some less destructive 
warning: both symbol table errors and sample stream hickups are 
common and can lead to essentially arbitrary input data - we 
shouldn't crash on that.

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