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:   Mon, 14 May 2018 17:24:28 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Mark Rutland <mark.rutland@....com>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Will Deacon <will.deacon@....com>
Subject: Re: [PATCH] perf/ring_buffer: ensure atomicity and order of updates

On Mon, May 14, 2018 at 04:20:23PM +0100, Mark Rutland wrote:

> > @@ -10499,6 +10523,9 @@ SYSCALL_DEFINE5(perf_event_open,
> >  		goto err_cred;
> >  	}
> >  
> > +	if (in_compat_syscall())
> > +		event->event_caps |= PERF_EV_CAP_COMPAT;
> > +
> 
> After a native perf_event_open, you could pass the fd (or exec) to
> another task that was compat (or vice-versa), so this wouldn't work in
> that case (crazy as it may be).
> 
> I don't have a better suggestion at present, though.

As discussed on IRC, we could trigger off of the buffer size; if the
buffer is <4G the &= UINT_MAX is harmless, if the buffer is larger, you
have to be using a 64bit thingy anyway.

Flipping the overflow functions around on attach/detach to buffers is a
little more dodgy, but could be done I suppose.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ