Received: by 10.213.65.68 with SMTP id h4csp966800imn; Wed, 14 Mar 2018 05:50:54 -0700 (PDT) X-Google-Smtp-Source: AG47ELsZ83lz+TKWQssULhFG7YxKK33ffEFMLTOX/ZhUFkMTPrEoWYHtQuG+7jrTiPr7JAn5TLCK X-Received: by 10.99.115.3 with SMTP id o3mr3607521pgc.428.1521031854705; Wed, 14 Mar 2018 05:50:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521031854; cv=none; d=google.com; s=arc-20160816; b=Z5AaHAg3Jwi4hqamBYd1oGE+yoFUvpNRQ+SP5PYzE+cbt1w2PzPkDN+i78yQCQ/twj SfF/PIuc8mToeNWdQQ7Dgff/1AcYQLE6hFIwZ4NwOkX3R3O7Id71Z8boEO79GNGlVJHr Q6kADYhUp1LPwSJD9G1DTIhdMtBjDgdT/Vtgq9zdVzIAeP0VGGCcESa8aFXWoODMf2GY 1yyV5rrF0bfu3jZgNVEXejjs0dQKUt3NV5mmk3kKUur81pbUziKxgbRdJaSVQqReZe3B x2S3wK8yZwVwo/Fj/wmi4pssU4jX0wZzjnXo/GOaftNqo2JkL+TrvMQjK+Z2bNBVqrfi 3h8A== 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=1lc7xweNiYIMiwzVHfRJT8uiDXyeuQK54B+aS1wbUfs=; b=gekVgV29p/yohGllGJ7c+lIkzdMa+NflghJmJG7uB98sD0QchOkRTnymxW0GT/8zXv i/1qq52FjWEZUdLmmb/s6NIPtCXnElUM7AwBNPpbe6jiQQD7e3lOVSaASsc8aNDIuAQ7 IpldQoNp6GWd5sQXSOkuAmzP/0O94TXtTNV/2UpHfe+9yrkXmYMpxOxrPHx23yIHlUUA azYwnN5htKIeGTtmkTQ4l4Mkna6fF2Fx6XrO+bDviQYM1v8uzsLCnzPxXL3sK7foHhLl rqOngny2gk8dimBssbbQaMh+mybDLMNzsOHrXv4X1AV5crZsqb4f7drRFJMT0Thc83FD lwTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Qfsa3x6g; 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 v126si1231381pgb.340.2018.03.14.05.50.28; Wed, 14 Mar 2018 05:50:54 -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=Qfsa3x6g; 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 S1751719AbeCNMsd (ORCPT + 99 others); Wed, 14 Mar 2018 08:48:33 -0400 Received: from mail-ua0-f179.google.com ([209.85.217.179]:35423 "EHLO mail-ua0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908AbeCNMsb (ORCPT ); Wed, 14 Mar 2018 08:48:31 -0400 Received: by mail-ua0-f179.google.com with SMTP id c40so1959644uae.2; Wed, 14 Mar 2018 05:48:31 -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=1lc7xweNiYIMiwzVHfRJT8uiDXyeuQK54B+aS1wbUfs=; b=Qfsa3x6gSMLP784Q2gKUAz3qoWY45K2TEW7x/SKJWDBnb25POoXqe94//Ua4S+jstG avg6U9PdmXuvYwnowUXoq9yUT9LI26u7QRx4eo6zMbl/MIUwHk1TiSb3mayrfONDGCfv ecGGXGeAW3KRD56tHMX3ctfsKYT92jRTaNvK9nnMKrEyJHdBMg2gXTLtzScJNEQEqLuK aaIPaZk2tEaMcUO7OxkeZTe0n5eVH7KTr74neKV/Lb/BjJ1JgO+mJvWSkD+qDfiOOQ5Q yCZxAG+/3QzpvjDYHsPQtYv5JHFN5eJm441l0Mpv5LoWG5MaHrJrl2ouVHpS1cVOtvw5 GGBw== 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=1lc7xweNiYIMiwzVHfRJT8uiDXyeuQK54B+aS1wbUfs=; b=blAEI3GKJYPXeZ458tpDpgJHdlUMECVb2K2T6gr71cqf+z0XiPga9FoJwj7NUKjB1c fXL//ddqC4itYEP2Z3KKu9uF3ZlzJ13E2zumanPWhcLvW/Z3+4/risK86ib3Rsvkdoi1 IEZjIfQsZ5cpG33DTi/OdmMJ2CnBJnMHER31j7hSVlmGVlRw1BiM5rleGqSowzaKs2u8 La3NfsJIHWv9rTWS8mVYnank8t3f30F4+6lI7AsufXjSYvjoB8Oo0MQ6n3eOgvDZ7TRK 4PzLigaXJDuteZlkqRrmHvZYI8lR+i/38qHV7yt6rEbW0k4uBIlKRUSAeaKf0pCPncsl QuRw== X-Gm-Message-State: AElRT7GBk7RvnToZo8TBSra0IT5N4LrYllXwpJmYp3PkVoIiiKmfDRvO kO7zxqefsYSVaVNeOiHWx6hJ+Z6CatQEeX2nY88= X-Received: by 10.176.30.133 with SMTP id o5mr3132679uak.184.1521031710677; Wed, 14 Mar 2018 05:48:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.170.7 with HTTP; Wed, 14 Mar 2018 05:48:10 -0700 (PDT) In-Reply-To: <9843d23677af411aa75a5fb24df3c97b@AcuMS.aculab.com> References: <1520970647-19587-1-git-send-email-s.mesoraca16@gmail.com> <87fu5321du.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> <9843d23677af411aa75a5fb24df3c97b@AcuMS.aculab.com> From: Salvatore Mesoraca Date: Wed, 14 Mar 2018 13:48:10 +0100 Message-ID: Subject: Re: [PATCH] net: dsa: drop some VLAs in switch.c To: David Laight Cc: Vivien Didelot , "linux-kernel@vger.kernel.org" , Kernel Hardening , "netdev@vger.kernel.org" , "David S. Miller" , Andrew Lunn , Florian Fainelli , 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-14 12:24 GMT+01:00 David Laight : > Isn't using DECLARE_BITMAP() completely OTT when the maximum size is less > than the number of bits in a word? It allocates ceiling(size/8) "unsigned long"s, so yes.