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: <1274097780.5605.4642.camel@twins>
Date:	Mon, 17 May 2010 14:03:00 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	linux-kernel@...r.kernel.org, mingo@...e.hu, paulus@...ba.org,
	davem@...emloft.net, acme@...radead.org,
	perfmon2-devel@...ts.sf.net, eranian@...il.com
Subject: Re: [PATCH] perf_events: fix errors path in perf_output_begin()

On Mon, 2010-05-17 at 13:56 +0200, Stephane Eranian wrote:
> >> +     if (!data->nr_pages) {
> >> +             atomic_inc(&data->lost);
> >> +             goto out;
> >> +     }


> Well, nr_pages = 0 means all you have is the sampling buffer
> header page. You cannot save any sample, so you  actually
> loose everything. Perf reports a dozen samples but those
> are synthetic. The kernel cannot reject an mmap() for
> just one page because of the remapped counters, thus it
> has to handle this gracefully and at least report the lost
> samples.

So you want to preserve this state for when you munmap() and mmap()
again? The only user of data->lost is writing the PERF_RECORD_LOST
event, which only ever happens when you have pages, so counting it when
there's no pages seems futile.


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