Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEXv5_iLpSdeX49AQ5MrYHPEjTD1vDExRxOUqeYL9msZm=vS2g@mail.gmail.com>
Date: Wed, 7 Dec 2016 11:31:56 -0500
From: David Windsor <dwindsor@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Liljestrand Hans <ishkamiel@...il.com>, "Reshetova, Elena" <elena.reshetova@...el.com>, 
	"kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, Greg KH <gregkh@...uxfoundation.org>, 
	Kees Cook <keescook@...omium.org>, "will.deacon@....com" <will.deacon@....com>, 
	Boqun Feng <boqun.feng@...il.com>, "aik@...abs.ru" <aik@...abs.ru>, 
	"david@...son.dropbear.id.au" <david@...son.dropbear.id.au>
Subject: Re: Conversion from atomic_t to refcount_t: summary of issues

On Wed, Dec 7, 2016 at 11:26 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Wed, Dec 07, 2016 at 10:59:47AM -0500, David Windsor wrote:
>> On Wed, Dec 7, 2016 at 8:52 AM, Peter Zijlstra <peterz@...radead.org> wrote:
>
>> > All in all I'm not inclined to add {add,sub.inc,dec}_return() to
>> > refcount, as previously stated, they don't make sense.
>>
>> Is the plan now to audit all {add,sub,inc,dec}_return() call sites?
>> This should probably happen anyway, due to the amount of funkiness
>> uncovered by Hans' mini-audit. Then we can rewrite actual reference
>> counting code that calls the unsupported {add,sub,inc,dec}_return() to
>> use something else?
>
> The ip_vs_dest cache thing would receive 2 patches, one doing the global
> +1, the second conversion to refcount_t.
>
> For BPF we'd need to talk to Alexei to see if the custom limit still
> makes sense, but I'd be inclined to simply drop that in the refcount_t
> conversion.
>
> As to the tty and usb-gadget ones, those constructs are actually racy,
> but I'm not sure the races matter. But I would certainly prefer to
> rework then to be race-free.
>
> But I wouldn't go so far as to audit all *_return calls, just those that
> pop up while hunting refcounts.

Yeah, we definitely don't want to go about finding refcounts by
looking for *_return calls, but it's worth auditing the *_return calls
we've already identified in previous patches and each time we
encounter them in future refcount_t hunting.

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.