Received: by 10.223.185.111 with SMTP id b44csp1216481wrg; Sat, 10 Mar 2018 00:45:33 -0800 (PST) X-Google-Smtp-Source: AG47ELv0WOxC07atHVME8sgVyH+jSU1a8KzXTJSnLMEx9ApzOXBNsOq9wi1WroiTV+jP0BppML5z X-Received: by 2002:a17:902:42e:: with SMTP id 43-v6mr1426837ple.186.1520671533490; Sat, 10 Mar 2018 00:45:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520671533; cv=none; d=google.com; s=arc-20160816; b=oBp7fMA1kTWuzUs4RWfgS3DAlvcBll1zxE3WQje8SFtt0Stm3kos2clkELdPRT9cgU QzAV3DuR854E64i/9UHlzMspZq35d2s2fj2LqfeF2prqULC8NKSoIeEl61GYNoGAMr33 jJ9qketxf6E0UHSOXyYZt4GSQAZefk5elu68qGJHAc+G4G1iHeanr5P6TtU9aYOx7/1h irqzuQdOn+5u4FjyQ8PlNjuM4M3InnZ3quNQ9yTiPHxeggMP71HCfuSXtq3V29w8pR+W vAdpPdGYDym9lVb5/55AjSxBJf/AWhbp6pFBElAXwg0NaGA44VRkUQMfvqDKqfjJdAX+ 0gfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=yq2M4pPUzUvJR6LfQjVlr4UMQbE3dnP8jQc3iNnoRfQ=; b=YWnHhp8d6Zdzp93sjSzwE4dGZ8L/BHCM7kpQEFTQ7nM3uM/j0refV9FSr/A82fAemH PpCpfYGN0JEZ6+JT0SvkeXxCb6npTVCOjrT+ohcsNBWIfQaEjVbQQ5SWVHZdndHoqmlk TmQw89Z5c0WwER0tKPTJCgaYfua2vRs6NZGp2hOXs5u4X8//C49PiijlANyLsYpONHAn S/3hPCuIFXiCtipoAxSfSadrIN/CXWj+jAgCyrPLt3jkFbqtOEOvbXYoFSNT283NS8q0 i/1w6jULhoQMXkVxkGAyRx3qoPioH2TL8LDqaVoXXeG5RT97PY4PkoKIlJYmwnh9AHh0 V3Ag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si2088285pgq.40.2018.03.10.00.45.06; Sat, 10 Mar 2018 00:45:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751944AbeCJInj (ORCPT + 99 others); Sat, 10 Mar 2018 03:43:39 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:40604 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751256AbeCJInh (ORCPT ); Sat, 10 Mar 2018 03:43:37 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C5E77D143A; Sat, 10 Mar 2018 08:43:36 +0000 (UTC) Received: from epycfail (ovpn-112-65.ams2.redhat.com [10.36.112.65]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF6E3202322A; Sat, 10 Mar 2018 08:43:31 +0000 (UTC) Date: Sat, 10 Mar 2018 09:43:27 +0100 From: Stefano Brivio To: Andreas Christoforou Cc: keescook@chromium.org, kernel-hardening@lists.openwall.com, Steffen Klassert , Herbert Xu , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage Message-ID: <20180310094327.685d181d@epycfail> In-Reply-To: <1520667645-21975-1-git-send-email-andreaschristofo@gmail.com> References: <1520667645-21975-1-git-send-email-andreaschristofo@gmail.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Sat, 10 Mar 2018 08:43:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Sat, 10 Mar 2018 08:43:36 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'sbrivio@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 (*cmp)(void *p), int maxclass) > { > int i; > int class[XFRM_MAX_DEPTH]; > - int count[maxclass]; > + int count[XFRM_MAX_DEPTH]; > > memset(count, 0, sizeof(count)); Can you perhaps initialize 'count' instead of calling memset(), now? -- Stefano