Received: by 10.192.165.148 with SMTP id m20csp1040315imm; Sat, 5 May 2018 03:37:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq4MkacxQsBOunX8JB+vaDOLR1yy79rU4KpXnvHzOyO730OjjtOfdqTK6Q1pYBRbvTxxoRi X-Received: by 10.167.130.13 with SMTP id k13mr175819pfi.26.1525516655541; Sat, 05 May 2018 03:37:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525516655; cv=none; d=google.com; s=arc-20160816; b=C/qxZJ93W4Q9KSTHwZ+j0dePiMPRrfnt+YftNdhfdKkDKjoTF0+qBViwmqL/lqcIvs sT4xMxCRGqNH2TCBLPvIyglyZ4JO08NOLjXYlbI6YHu95RRMrG2a67eqvpMLIHMl+RqW 4cJiejYNbAo/htA5dxjlR5X8+5fbW/d6mHLsVBHVpQpjOpO80DdGcPS10rCPE63//gi1 eoR3k3kS+APsgA3eJ6lKflN/2m87030qtJWipNyZKD9JmPRKuErIQVy/ThMJlyePwcf6 9d9d1FlrLJZlhRmGHci/dCjI1WouDZj7S6dx+2mh7VP89CIPyOrEmndcZkpCbMO6OC2l oz+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=SBgTLAvyQQS8SBaXDQ9fauidERxTWI552chpfhcYDk4=; b=hu0O/8BVgl9hJTxv1qf5plQXjQFD4VnTPrAttKej9rSfGGpmLu2kKN7x/zosZXW8Ka PfME9nCSpxU61kCm4qR9o53YYpNKXl648DiWRbfaoVIjTVDwUl0/0rPc5Yd3xRQ1CDZl itHeBWUoKvLezvr+W+xgXKxewhJcN/96th7XxnCaIhUUx0RXn0myqCo7tpLRNzigdlIU a8GtHN2IML5yK0j8BiQ6zcppbEpHvZkHy5ayIvC3m1YLqcUB/6JYekB7Z1j81RR3w46V A3Z45GTGzy5FGP7Q+zCMafA0B8S3RbFpkiYMr/6UXHkZ9q7U0rKLwFTBRbEnN72+qC/j BALg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IzrpX4kS; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c41-v6si18063663plj.503.2018.05.05.03.37.21; Sat, 05 May 2018 03:37:35 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IzrpX4kS; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751811AbeEEKg7 (ORCPT + 99 others); Sat, 5 May 2018 06:36:59 -0400 Received: from mail-vk0-f66.google.com ([209.85.213.66]:36267 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206AbeEEKg5 (ORCPT ); Sat, 5 May 2018 06:36:57 -0400 Received: by mail-vk0-f66.google.com with SMTP id i185-v6so9680690vkg.3; Sat, 05 May 2018 03:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SBgTLAvyQQS8SBaXDQ9fauidERxTWI552chpfhcYDk4=; b=IzrpX4kSoXPVZwJTb6Bd5HpR1nReubhRpuuHhdicCL97hOXG49q4nHQMxaWWpl7AVd jcaRt3E0blYxX8csOx4LZTsRRy3kxR2NnUJpO/MIQW7SejBM0C4PopClF8MUt3TFFmXn Y1caOjYQ6a7wMZ8g4EG+T900xPYbqWtDbRWb/1uuvUoC/3RKoMahffl5hZnRucjJtqlr PuWKy4DxApr0nrQrGObQFzwficK27e2i/PwZSH+DDauxPnjjKplmg3mx6V9f1p+1ouHI EJGQXmn4B4XZqvqRtFZASHAd81Vp+fxO+ZtQK6oX/HuZY1N4hiZhzk96i4uS8Co9AAvn BeeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SBgTLAvyQQS8SBaXDQ9fauidERxTWI552chpfhcYDk4=; b=Bmm/Gr+egH/u0B4vSajK2WUQIydZK26aXRQ3FWAcHEK9dsO3KASm8ecMDgVyyECtYx en+3qZX0bGvZu8voSCYbrZtguG0Knb60loPQVmSOO1cs9UlRWLahI8jErzy0Gqz7yX5M zYsznCi6cG51EOlySMQ9mUnndyzW+X5b3Wi9qwU3vCz3mWA/+626dzKgnElqYkVgSQnG L4U+iGwQN008jwnScgL+okvrC2b/zVJ8E0DO8hiLRYftFHUDYddC1JEtJReelesLHp7g h4yPeG1NeL9euspPm5TLHEfX9hNgbvxqX8fJuirTYpQhBsdHMWBnmPYk4tqoOfg7BevO f7PQ== X-Gm-Message-State: ALQs6tBw9Qaja8uAGWp/TqwaijryvRaxOr1Fv9Qv0OR8gYDKQjn4WVeH XqHA5v74xm2sq0BnUxyOCWnntP7VXi54bNePFKo= X-Received: by 2002:a1f:3747:: with SMTP id e68-v6mr24732223vka.51.1525516617010; Sat, 05 May 2018 03:36:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.3.129 with HTTP; Sat, 5 May 2018 03:36:36 -0700 (PDT) In-Reply-To: References: <1520970647-19587-1-git-send-email-s.mesoraca16@gmail.com> <87fu5321du.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> From: Salvatore Mesoraca Date: Sat, 5 May 2018 12:36:36 +0200 Message-ID: Subject: Re: [PATCH] net: dsa: drop some VLAs in switch.c To: Florian Fainelli Cc: Vivien Didelot , linux-kernel@vger.kernel.org, Kernel Hardening , netdev@vger.kernel.org, "David S. Miller" , Andrew Lunn , Kees Cook Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-03-13 21:06 GMT+01:00 Florian Fainelli : > On 03/13/2018 12:58 PM, Vivien Didelot wrote: >> Hi Salvatore, >> >> Salvatore Mesoraca writes: >> >>> dsa_switch's num_ports is currently fixed to DSA_MAX_PORTS. So we avoid >>> 2 VLAs[1] by using DSA_MAX_PORTS instead of ds->num_ports. >>> >>> [1] https://lkml.org/lkml/2018/3/7/621 >>> >>> Signed-off-by: Salvatore Mesoraca >> >> NAK. >> >> We are in the process to remove hardcoded limits such as DSA_MAX_PORTS >> and DSA_MAX_SWITCHES, so we have to stick with ds->num_ports. > > Then this means that we need to allocate a bitmap from the heap, which > sounds a bit superfluous and could theoretically fail... not sure which > way is better, but bumping the size to DSA_MAX_PORTS definitively does > help people working on enabling -Wvla. Hi Florian, Should I consider this patch still NAKed or not? Should I resend the patch with some modifications? Thank you, Salvatore