Re: [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-11-02 Thread Kees Cook
On Wed, Nov 02, 2022 at 12:52:32PM +0100, Rasmus Villemoes wrote: > On 24/10/2022 22.11, Gwan-gyeong Mun wrote: > > From: Kees Cook > > > > Implement a robust overflows_type() macro to test if a variable or > > constant value would overflow another variable or type. This can be > > used as a

Re: [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-11-02 Thread Rasmus Villemoes
On 24/10/2022 22.11, Gwan-gyeong Mun wrote: > From: Kees Cook > > Implement a robust overflows_type() macro to test if a variable or > constant value would overflow another variable or type. This can be > used as a constant expression for static_assert() (which requires a > constant

Re: [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-11-02 Thread Gwan-gyeong Mun
On 11/2/22 1:06 AM, Kees Cook wrote: On Sat, Oct 29, 2022 at 11:01:38AM +0300, Gwan-gyeong Mun wrote: On 10/29/22 10:32 AM, Kees Cook wrote: On Sat, Oct 29, 2022 at 08:55:43AM +0300, Gwan-gyeong Mun wrote: Hi Kees, Hi! :) I've updated to v5 with the last comment of Nathan. Could you

Re: [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-11-01 Thread Kees Cook
On Sat, Oct 29, 2022 at 11:01:38AM +0300, Gwan-gyeong Mun wrote: > > > On 10/29/22 10:32 AM, Kees Cook wrote: > > On Sat, Oct 29, 2022 at 08:55:43AM +0300, Gwan-gyeong Mun wrote: > > > Hi Kees, > > > > Hi! :) > > > > > I've updated to v5 with the last comment of Nathan. > > > Could you please

Re: [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-10-29 Thread Gwan-gyeong Mun
On 10/29/22 10:32 AM, Kees Cook wrote: On Sat, Oct 29, 2022 at 08:55:43AM +0300, Gwan-gyeong Mun wrote: Hi Kees, Hi! :) I've updated to v5 with the last comment of Nathan. Could you please kindly review what more is needed as we move forward with this patch? It looks fine to me -- I

Re: [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-10-29 Thread Kees Cook
On Sat, Oct 29, 2022 at 08:55:43AM +0300, Gwan-gyeong Mun wrote: > Hi Kees, Hi! :) > I've updated to v5 with the last comment of Nathan. > Could you please kindly review what more is needed as we move forward with > this patch? It looks fine to me -- I assume it'll go via the drm tree? Would

Re: [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-10-28 Thread Gwan-gyeong Mun
Hi Kees, I've updated to v5 with the last comment of Nathan. Could you please kindly review what more is needed as we move forward with this patch? Br, G.G. On 10/24/22 11:11 PM, Gwan-gyeong Mun wrote: From: Kees Cook Implement a robust overflows_type() macro to test if a variable or

[PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-10-24 Thread Gwan-gyeong Mun
From: Kees Cook Implement a robust overflows_type() macro to test if a variable or constant value would overflow another variable or type. This can be used as a constant expression for static_assert() (which requires a constant expression[1][2]) when used on constant values. This must be