lkml.org 
[lkml]   [2020]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] crypto: lib/chacha20poly1305 - Set SG_MITER_ATOMIC unconditionally
Date
On Tue, Sep 15 2020 at 20:10, Herbert Xu wrote:
> On Tue, Sep 15, 2020 at 01:08:31PM +0300, Ard Biesheuvel wrote:
>>
>> But making atomic kmap preemptible/sleepable creates the exact same
>> problem, i.e., that we have no idea which existing callers are
>> currently relying on those preemption disabling semantics, so we can't
>> just take them away. Or am I missing something?
>
> Good point.
>
> Thomas mentioned that RT has been doing this for a while now so
> perhaps someone has studied this problem already? Thomas?

RT is substituting preempt_disable() with migrate_disable() which pins
the task on the CPU so that per CPU stuff still works. And we did quite
some staring whether there is code which purely relies on the
preempt_disable() to prevent reentrancy, but there is almost none.

Though we don't have migrate disable on !RT and PeterZ is not a great
fan of making it available as it wreckages schedulability - though IMO
not much more than preempt disable :)

Thanks,

tglx

\
 
 \ /
  Last update: 2020-09-15 21:05    [W:0.035 / U:1.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site