lkml.org 
[lkml]   [2018]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Patch v2 4/4] x86/speculation: Add prctl to control indirect branch speculation per process
Date
On 10/02/2018 10:58 AM, Thomas Gleixner wrote:
> On Tue, 25 Sep 2018, Tim Chen wrote:
>>
>> +void arch_set_dumpable(struct task_struct *tsk, struct mm_struct *mm, int value)
>> +{
>> + if (!static_branch_unlikely(&spectre_v2_app_lite))
>> + return;
>> + if (!static_cpu_has(X86_FEATURE_STIBP))
>> + return;
>> +
>> + if ((unsigned) value != SUID_DUMP_USER) {
>
> First of all we use unsigned int and not unsigned, Aside of that why is the
> argument not unsigned int right away?


The original set_dumpable passes suid_dumpable, which was
exposed via /proc/sys/fs/suid_dumpable and defined as int.
It will make sense to define suid_dumpable as an unsigned int instead.

Would you like me to redefine suid_dumpable as unsigned int
in sysctl.c in the patch revision as a separate clean up patch?

Thanks.

Tim

\
 
 \ /
  Last update: 2018-10-05 20:14    [W:0.084 / U:1.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site