Received: by 10.213.65.68 with SMTP id h4csp561888imn; Tue, 13 Mar 2018 13:08:03 -0700 (PDT) X-Google-Smtp-Source: AG47ELtYRCyVd8WtnxjyJPo82TEJST7neZIDpxsL8WK64V5uJIxsf84/avYcSc15euICmT/RKf/8 X-Received: by 10.99.109.142 with SMTP id i136mr344169pgc.306.1520971683880; Tue, 13 Mar 2018 13:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520971683; cv=none; d=google.com; s=arc-20160816; b=Qr8v5ab5OZUToi3bory44vk8tFuedyB6Hgv9FAbGgZJM5M2ykIM/lDm5cfZj3tdFPN BDv7KgwKjBFCiGlBhWUrNwvmsxpbKh75U/vzGDFYKWkHRVRxffi3Jwl5324PNqgqcbyH txRdgPBGrwXPe/Rmhs/+5FMX/U5Rk00HXPE8xebdF73Ryk9DkOxdRpGE8SGfx38ZgPZ3 Nz+AHgClQYqZClYO1gyvsOw7kWKxiGvefyAvRIa/eDJ5zcxEQcbzOMi/FRKpR7lTgk+b TIotNfHvdGfz1HYydlm6AEo5Luga8fu+AJER5HIITx8URmGtPdJv+S0z8W3YCKqvtNWv 2pkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=itWdWnS6s+MGaF9vnIXJL88dHgddWegxSQ37NdhRwqo=; b=NSjrKoqjBcFFj2buZ77/GWdhoggP+EB8Rp5je+ZGZ8GLugGALbjKrBpvUvg4XQ0obv F2TG4stTnooRpciDXYsJrAeBnxO6TpGpLuoIGoZHNPhZASlzCOT1ds1YwLrTu47POvNH V4blPTUaSL/i+4JQpS3HfZqUtyo/oYvtfWn1R5nP8mS5Ani9ET2IXYvHHXTwpIh3LhzO JT94xE/b0ntzRMWXY2NlAQza3ZxJjOBRtTB+4DJi0LlxpgxBD19kTXbD1f2M2OrF1qCp Nwdpt5/ygXBmL5NUaY5+l5pGyIIei5rC6Cl8NQDse2Htb1+k2A33s6AF1+JIiFDkyLNf 10/A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t13si663959pfa.294.2018.03.13.13.07.48; Tue, 13 Mar 2018 13:08:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932605AbeCMUGz (ORCPT + 99 others); Tue, 13 Mar 2018 16:06:55 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:46726 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932522AbeCMUGx (ORCPT ); Tue, 13 Mar 2018 16:06:53 -0400 X-Greylist: delayed 478 seconds by postgrey-1.27 at vger.kernel.org; Tue, 13 Mar 2018 16:06:53 EDT Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 57B089C2049; Tue, 13 Mar 2018 15:58:54 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id jRnvidBbR0y2; Tue, 13 Mar 2018 15:58:53 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id C90EB9C2EF1; Tue, 13 Mar 2018 15:58:53 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fr0OhieaHHkB; Tue, 13 Mar 2018 15:58:53 -0400 (EDT) Received: from localhost (unknown [192.168.49.104]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id A305F9C2049; Tue, 13 Mar 2018 15:58:53 -0400 (EDT) From: Vivien Didelot To: Salvatore Mesoraca , linux-kernel@vger.kernel.org Cc: kernel-hardening@lists.openwall.com, netdev@vger.kernel.org, "David S. Miller" , Andrew Lunn , Florian Fainelli , Kees Cook , Salvatore Mesoraca Subject: Re: [PATCH] net: dsa: drop some VLAs in switch.c In-Reply-To: <1520970647-19587-1-git-send-email-s.mesoraca16@gmail.com> References: <1520970647-19587-1-git-send-email-s.mesoraca16@gmail.com> Date: Tue, 13 Mar 2018 15:58:53 -0400 Message-ID: <87fu5321du.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, Vivien