Re: [Intel-gfx] [PATCH v7 1/8] overflow: Move and add few utility macros into overflow

2022-08-24 Thread Kees Cook
On Thu, Aug 18, 2022 at 01:07:29AM +0200, Andi Shyti wrote: > Hi Kees, > > would you mind taking a look at this patch? Hi! Thanks for the heads-up! > > Thanks, > Andi > > On Tue, Aug 16, 2022 at 06:35:18PM +0900, Gwan-gyeong Mun wrote: > > It moves overflows_type utility macro into overflow he

[Intel-gfx] [PATCH v7 1/8] overflow: Move and add few utility macros into overflow

2022-08-24 Thread Gwan-gyeong Mun
It moves overflows_type utility macro into overflow header from i915_utils header. The overflows_type can be used to catch the truncation between data types. And it adds safe_conversion() macro which performs a type conversion (cast) of an source value into a new variable, checking that the destina

Re: [Intel-gfx] [PATCH v7 1/8] overflow: Move and add few utility macros into overflow

2022-08-22 Thread Gwan-gyeong Mun
On 8/23/22 5:12 AM, Kees Cook wrote: On Tue, Aug 23, 2022 at 04:32:10AM +0900, Gwan-gyeong Mun wrote: On 8/22/22 11:05 PM, Andrzej Hajda wrote: On 18.08.2022 02:12, Kees Cook wrote: On Thu, Aug 18, 2022 at 01:07:29AM +0200, Andi Shyti wrote: [...] +#define safe_conversion(ptr, value) ({ \

Re: [Intel-gfx] [PATCH v7 1/8] overflow: Move and add few utility macros into overflow

2022-08-22 Thread Kees Cook
On Tue, Aug 23, 2022 at 04:32:10AM +0900, Gwan-gyeong Mun wrote: > On 8/22/22 11:05 PM, Andrzej Hajda wrote: > > On 18.08.2022 02:12, Kees Cook wrote: > > > On Thu, Aug 18, 2022 at 01:07:29AM +0200, Andi Shyti wrote: > > > > [...] > > > > > +#define safe_conversion(ptr, value) ({ \ > > > > > +    t

Re: [Intel-gfx] [PATCH v7 1/8] overflow: Move and add few utility macros into overflow

2022-08-22 Thread Gwan-gyeong Mun
On 8/22/22 11:05 PM, Andrzej Hajda wrote: On 18.08.2022 02:12, Kees Cook wrote: On Thu, Aug 18, 2022 at 01:07:29AM +0200, Andi Shyti wrote: Hi Kees, would you mind taking a look at this patch? Hi! Thanks for the heads-up! Thanks, Andi On Tue, Aug 16, 2022 at 06:35:18PM +0900, Gwan-gye

Re: [Intel-gfx] [PATCH v7 1/8] overflow: Move and add few utility macros into overflow

2022-08-22 Thread Andrzej Hajda
On 22.08.2022 16:05, Andrzej Hajda wrote: On 18.08.2022 02:12, Kees Cook wrote: On Thu, Aug 18, 2022 at 01:07:29AM +0200, Andi Shyti wrote: Hi Kees, would you mind taking a look at this patch? Hi! Thanks for the heads-up! Thanks, Andi On Tue, Aug 16, 2022 at 06:35:18PM +0900, Gwan-gye

Re: [Intel-gfx] [PATCH v7 1/8] overflow: Move and add few utility macros into overflow

2022-08-22 Thread Andrzej Hajda
On 18.08.2022 02:12, Kees Cook wrote: On Thu, Aug 18, 2022 at 01:07:29AM +0200, Andi Shyti wrote: Hi Kees, would you mind taking a look at this patch? Hi! Thanks for the heads-up! Thanks, Andi On Tue, Aug 16, 2022 at 06:35:18PM +0900, Gwan-gyeong Mun wrote: It moves overflows_type utilit

Re: [Intel-gfx] [PATCH v7 1/8] overflow: Move and add few utility macros into overflow

2022-08-22 Thread Jani Nikula
On Wed, 17 Aug 2022, Kees Cook wrote: > On Thu, Aug 18, 2022 at 01:07:29AM +0200, Andi Shyti wrote: >> Hi Kees, >> >> would you mind taking a look at this patch? > > Hi! Thanks for the heads-up! Thanks for your review. This actually reaffirms my belief that we need to get these macros out of i91

Re: [Intel-gfx] [PATCH v7 1/8] overflow: Move and add few utility macros into overflow

2022-08-17 Thread Andi Shyti
Hi Kees, would you mind taking a look at this patch? Thanks, Andi On Tue, Aug 16, 2022 at 06:35:18PM +0900, Gwan-gyeong Mun wrote: > It moves overflows_type utility macro into overflow header from i915_utils > header. The overflows_type can be used to catch the truncation between data > types. A