Re: [PATCH] perf: enum overflow in uapi/linux/perf_event.h

2018-09-07 Thread Luc Van Oostenryck
On Fri, Sep 07, 2018 at 08:43:59PM +0200, Luc Van Oostenryck wrote: > On Fri, Sep 07, 2018 at 04:15:33PM +0200, Christophe LEROY wrote: > > Le 07/09/2018 à 15:58, Peter Zijlstra a écrit : > > > On Fri, Sep 07, 2018 at 01:50:18PM +, Christophe Leroy wrote: > > > > > > > > > > > > On 09/07/2018

Re: [PATCH] perf: enum overflow in uapi/linux/perf_event.h

2018-09-07 Thread Luc Van Oostenryck
On Fri, Sep 07, 2018 at 04:15:33PM +0200, Christophe LEROY wrote: > Le 07/09/2018 à 15:58, Peter Zijlstra a écrit : > > On Fri, Sep 07, 2018 at 01:50:18PM +, Christophe Leroy wrote: > > > > > > > > > On 09/07/2018 01:42 PM, Peter Zijlstra wrote: > > > > On Fri, Sep 07, 2018 at 01:27:19PM +000

Re: [PATCH] perf: enum overflow in uapi/linux/perf_event.h

2018-09-07 Thread Peter Zijlstra
On Fri, Sep 07, 2018 at 04:15:33PM +0200, Christophe LEROY wrote: > Ah yes, it seems that GCC is happy. So sparse should be fixed instead ? Ideally, yes. > Anyway, is it really correct to put this constant inside that enum, after > PERF_SAMPLE_MAX ? It is a bit of a hack, agreed. What we do is

Re: [PATCH] perf: enum overflow in uapi/linux/perf_event.h

2018-09-07 Thread Christophe LEROY
Le 07/09/2018 à 15:58, Peter Zijlstra a écrit : On Fri, Sep 07, 2018 at 01:50:18PM +, Christophe Leroy wrote: On 09/07/2018 01:42 PM, Peter Zijlstra wrote: On Fri, Sep 07, 2018 at 01:27:19PM +, Christophe Leroy wrote: On PPC32, enums are 32 bits, so __PERF_SAMPLE_CALLCHAIN_EARLY i

Re: [PATCH] perf: enum overflow in uapi/linux/perf_event.h

2018-09-07 Thread Peter Zijlstra
On Fri, Sep 07, 2018 at 03:58:17PM +0200, Peter Zijlstra wrote: > On Fri, Sep 07, 2018 at 01:50:18PM +, Christophe Leroy wrote: > > > > > > On 09/07/2018 01:42 PM, Peter Zijlstra wrote: > > > On Fri, Sep 07, 2018 at 01:27:19PM +, Christophe Leroy wrote: > > > > On PPC32, enums are 32 bits

Re: [PATCH] perf: enum overflow in uapi/linux/perf_event.h

2018-09-07 Thread Peter Zijlstra
On Fri, Sep 07, 2018 at 01:50:18PM +, Christophe Leroy wrote: > > > On 09/07/2018 01:42 PM, Peter Zijlstra wrote: > > On Fri, Sep 07, 2018 at 01:27:19PM +, Christophe Leroy wrote: > > > On PPC32, enums are 32 bits, so __PERF_SAMPLE_CALLCHAIN_EARLY is > > > out of scope. The following spar

Re: [PATCH] perf: enum overflow in uapi/linux/perf_event.h

2018-09-07 Thread Christophe Leroy
On 09/07/2018 01:42 PM, Peter Zijlstra wrote: On Fri, Sep 07, 2018 at 01:27:19PM +, Christophe Leroy wrote: On PPC32, enums are 32 bits, so __PERF_SAMPLE_CALLCHAIN_EARLY is out of scope. The following sparse warning is encountered: CHECK arch/powerpc/kernel/process.c ./include/uapi/

Re: [PATCH] perf: enum overflow in uapi/linux/perf_event.h

2018-09-07 Thread Peter Zijlstra
On Fri, Sep 07, 2018 at 01:27:19PM +, Christophe Leroy wrote: > On PPC32, enums are 32 bits, so __PERF_SAMPLE_CALLCHAIN_EARLY is > out of scope. The following sparse warning is encountered: > > CHECK arch/powerpc/kernel/process.c > ./include/uapi/linux/perf_event.h:147:56: warning: cast tr