lkml.org 
[lkml]   [2017]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5] printk: hash addresses printed with %p
On Thu, Oct 19, 2017 at 3:31 AM, Sergey Senozhatsky
<sergey.senozhatsky.work@gmail.com> wrote:
> On (10/19/17 03:03), Jason A. Donenfeld wrote:
> [..]
>> 1) Go back to the spinlock yourself.
>
> so we ruled out NMI deadlocks?

Oh, right. No, I haven't thought through this enough to rule it out.
Indeed if that's an issue, the locks in the _once code will also be an
issue.

So if locking is totally impossible, then a race-free way of doing
this is with a tri-state compare and exchange. Things are either: in
state 1: no key, state 2: getting key, state 3: have key. If state 1
or 2, print the placeholder token. If state 3, do the hashing.

\
 
 \ /
  Last update: 2017-10-22 17:19    [W:2.068 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site