lkml.org 
[lkml]   [2018]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 5/8] x86/mm: fix exception table comments
From
Date

>> +  * Only do the expensive exception table search when we might be at
>> +  * risk of a deadlock:
>> +  * 1. We failed to acquire mmap_sem, and
>> +  * 2. The access was an explicit kernel-mode access
>> +  *    (X86_PF_USER=0).
>
> Might be worth reminding the reader that X86_PF_USER will be set in
> sw_error_code for implicit accesses.  I saw "explicit" and my mind
> immediately jumped to hw_error_code for whatever reason.  E.g.:
>
> * 2. The access was an explicit kernel-mode access (we set X86_PF_USER
> *    in sw_error_code for implicit kernel-mode accesses).

Yeah, that was not worded well. Is this better?

> * Only do the expensive exception table search when we might be at
> * risk of a deadlock:
> * 1. We failed to acquire mmap_sem, and
> * 2. The access was an explicit kernel-mode access. An access
> * from user-mode will X86_PF_USER=1 set via hw_error_code or
> * set in sw_error_code if it were an implicit kernel-mode
> * access that originated in user mode.




\
 
 \ /
  Last update: 2018-09-07 23:52    [W:0.057 / U:1.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site