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] [day] [month] [year] [list]
Message-ID: <20130614072918.GT12218@rric.localhost>
Date:	Fri, 14 Jun 2013 09:29:18 +0200
From:	Robert Richter <rric@...nel.org>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Borislav Petkov <bp@...en8.de>, Jiri Olsa <jolsa@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] perf tools: Retry mapping buffers readonly on EACCES

On 14.06.13 11:08:40, Namhyung Kim wrote:
> > -	if (perf_evlist__mmap(evlist, opts->mmap_pages, false) < 0) {
> > +try_again2:
> > +	if (perf_evlist__mmap(evlist, opts->mmap_pages, opts->mmap_ro) < 0) {
> > +		if (!opts->mmap_ro && errno == EACCES) {
> > +			opts->mmap_ro = true;
> > +			goto try_again2;
> > +		}
> >  		ui__error("Failed to mmap with %d (%s)\n",
> >  			    errno, strerror(errno));
> >  		goto out_err;
> 
> 
> You will need this also:
> 
> 
> @@ -161,7 +161,8 @@ static int perf_record__mmap_read(struct perf_record *rec,
>         }
>  
>         md->prev = old;
> -       perf_mmap__write_tail(md, old);
> +       if (!rec->opts.mmap_ro)
> +               perf_mmap__write_tail(md, old);
>  
>  out:
>         return rc;

Yes, indeed. Will add your change

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