Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-04-16 Thread Stefano Brivio
Andreas, On Sat, 10 Mar 2018 09:40:44 +0200 Andreas Christoforou wrote: > The kernel would like to have all stack VLA usage removed[1]. > Instead of dynamic allocation, just use XFRM_MAX_DEPTH > as already done for the "class" array, but as per feedback, > I will not

Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-04-16 Thread Stefano Brivio
Andreas, On Sat, 10 Mar 2018 09:40:44 +0200 Andreas Christoforou wrote: > The kernel would like to have all stack VLA usage removed[1]. > Instead of dynamic allocation, just use XFRM_MAX_DEPTH > as already done for the "class" array, but as per feedback, > I will not drop maxclass because that

Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-03-12 Thread Steffen Klassert
On Sat, Mar 10, 2018 at 07:26:44PM +0100, Stefano Brivio wrote: > On Sat, 10 Mar 2018 09:18:46 -0800 > Kees Cook wrote: > > > On Sat, Mar 10, 2018 at 12:43 AM, Stefano Brivio wrote: > > > On Sat, 10 Mar 2018 09:40:44 +0200 > > > Andreas Christoforou

Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-03-12 Thread Steffen Klassert
On Sat, Mar 10, 2018 at 07:26:44PM +0100, Stefano Brivio wrote: > On Sat, 10 Mar 2018 09:18:46 -0800 > Kees Cook wrote: > > > On Sat, Mar 10, 2018 at 12:43 AM, Stefano Brivio wrote: > > > On Sat, 10 Mar 2018 09:40:44 +0200 > > > Andreas Christoforou wrote: > > > > > >> diff --git

Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-03-10 Thread Stefano Brivio
On Sat, 10 Mar 2018 09:18:46 -0800 Kees Cook wrote: > On Sat, Mar 10, 2018 at 12:43 AM, Stefano Brivio wrote: > > On Sat, 10 Mar 2018 09:40:44 +0200 > > Andreas Christoforou wrote: > > > >> diff --git

Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-03-10 Thread Stefano Brivio
On Sat, 10 Mar 2018 09:18:46 -0800 Kees Cook wrote: > On Sat, Mar 10, 2018 at 12:43 AM, Stefano Brivio wrote: > > On Sat, 10 Mar 2018 09:40:44 +0200 > > Andreas Christoforou wrote: > > > >> diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c > >> index b15075a..270a53a 100644 > >>

Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-03-10 Thread Kees Cook
On Sat, Mar 10, 2018 at 12:43 AM, Stefano Brivio wrote: > On Sat, 10 Mar 2018 09:40:44 +0200 > Andreas Christoforou wrote: > >> diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c >> index b15075a..270a53a 100644 >> ---

Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-03-10 Thread Kees Cook
On Sat, Mar 10, 2018 at 12:43 AM, Stefano Brivio wrote: > On Sat, 10 Mar 2018 09:40:44 +0200 > Andreas Christoforou wrote: > >> diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c >> index b15075a..270a53a 100644 >> --- a/net/ipv6/xfrm6_state.c >> +++ b/net/ipv6/xfrm6_state.c >> @@

Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-03-10 Thread Stefano Brivio
On Sat, 10 Mar 2018 09:40:44 +0200 Andreas Christoforou wrote: > diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c > index b15075a..270a53a 100644 > --- a/net/ipv6/xfrm6_state.c > +++ b/net/ipv6/xfrm6_state.c > @@ -62,7 +62,7 @@ __xfrm6_sort(void **dst,

Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-03-10 Thread Stefano Brivio
On Sat, 10 Mar 2018 09:40:44 +0200 Andreas Christoforou wrote: > diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c > index b15075a..270a53a 100644 > --- a/net/ipv6/xfrm6_state.c > +++ b/net/ipv6/xfrm6_state.c > @@ -62,7 +62,7 @@ __xfrm6_sort(void **dst, void **src, int n, int

[PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-03-09 Thread Andreas Christoforou
The kernel would like to have all stack VLA usage removed[1]. Instead of dynamic allocation, just use XFRM_MAX_DEPTH as already done for the "class" array, but as per feedback, I will not drop maxclass because that changes the behavior. In one case, it'll do this loop up to 5, the other caller up

[PATCH v2] net: ipv6: xfrm6_state: remove VLA usage

2018-03-09 Thread Andreas Christoforou
The kernel would like to have all stack VLA usage removed[1]. Instead of dynamic allocation, just use XFRM_MAX_DEPTH as already done for the "class" array, but as per feedback, I will not drop maxclass because that changes the behavior. In one case, it'll do this loop up to 5, the other caller up