|
Message-ID: <58FDF8C4.5120.17D092B7@pageexec.freemail.hu> Date: Mon, 24 Apr 2017 15:08:20 +0200 From: "PaX Team" <pageexec@...email.hu> To: Peter Zijlstra <peterz@...radead.org> CC: Kees Cook <keescook@...omium.org>, linux-kernel@...r.kernel.org, Eric Biggers <ebiggers3@...il.com>, Christoph Hellwig <hch@...radead.org>, "axboe@...nel.dk" <axboe@...nel.dk>, James Bottomley <James.Bottomley@...senpartnership.com>, Elena Reshetova <elena.reshetova@...el.com>, Hans Liljestrand <ishkamiel@...il.com>, David Windsor <dwindsor@...il.com>, x86@...nel.org, Ingo Molnar <mingo@...nel.org>, Arnd Bergmann <arnd@...db.de>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Jann Horn <jann@...jh.net>, davem@...emloft.net, linux-arch@...r.kernel.org, kernel-hardening@...ts.openwall.com Subject: Re: [PATCH] x86/refcount: Implement fast refcount_t handling On 24 Apr 2017 at 13:15, Peter Zijlstra wrote: > On Mon, Apr 24, 2017 at 01:00:18PM +0200, PaX Team wrote: > > On 24 Apr 2017 at 10:32, Peter Zijlstra wrote: > > > > Also, you forgot nr_cpus in your bound. Afaict the worst case here is > > > O(nr_tasks + 3*nr_cpus). > > > > what does nr_cpus have to do with winning the race? > > The CPUs could each run nested softirq/hardirq/nmi context poking at the > refcount, irrespective of the (preempted) task context. that's fine but are you also assuming that the code executed in each of those contexts leaks the same refcount? otherwise whatever they do to the refcount is no more relevant than a non-leaking preemptible path that runs to completion in a bounded amount of time (i.e., you get temporary bumps and thus need to win yet another set of races to get their effects at once). > > > Because PaX does it, is not a correctness argument. And this really > > > wants one. > > > > heh, do you want to tell me about how checking for a 0 refcount prevents > > exploiting a bug? > > Not the point. All I said was that saying somebody else does it (anybody > else, doesn't matter it was you) isn't an argument for correctness. that was exactly my point: all this applies to you as well. so let me ask the 3rd time: what is your "argument for correctness" for a 0 refcount value check? how does it prevent exploitation?
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.