lkml.org 
[lkml]   [2014]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PERF_EVENT_IOC_SET_FILTER has different values based on bitness
On 10/7/14, 6:50 PM, Andi Kleen wrote:
> David Ahern <dsahern@gmail.com> writes:
>>>
>>> diff --git a/kernel/events/core.c b/kernel/events/core.c
>>> index 963bf139e2b2..c805132ac1cf 100644
>>> --- a/kernel/events/core.c
>>> +++ b/kernel/events/core.c
>>> @@ -3714,6 +3714,7 @@ static long perf_ioctl(struct file *file, unsigned
>>> int cmd, unsigned long arg)
>>> }
>>>
>>> case PERF_EVENT_IOC_SET_FILTER:
>>> + case PERF_EVENT_IOC_SET_FILTER_32:
>>> return perf_event_set_filter(event, (void __user *)arg);
>>>
>>> default:
>>>
>>
>> Oh, PERF_EVENT_IOC_ID has the same problem:
>>
>> #define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *)
>
> The right way is to add a compat_perf_ioctl()

Sure, looked into that way as well. But SET_FILTER and IOC_ID will still
compile to the same values for a 64-bit kernel.

David



\
 
 \ /
  Last update: 2014-10-08 03:22    [W:0.053 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site