Received: by 10.223.185.116 with SMTP id b49csp91435wrg; Thu, 8 Mar 2018 13:27:09 -0800 (PST) X-Google-Smtp-Source: AG47ELsTAJQG8MuhDl+68/p9NsavDDof+ZET/PEaQgA1xPywGNPTsOxwmUYXzgZpCIF1/+tXvxhG X-Received: by 10.99.116.70 with SMTP id e6mr22059859pgn.256.1520544429413; Thu, 08 Mar 2018 13:27:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520544429; cv=none; d=google.com; s=arc-20160816; b=HJQZ3AxgmjULDqpbFJIki+DwDGeF81xO0dZbAyPVDDBHzaHd/+CJhaRzu2oVxQYZ5O pzcPbpUA1Su+2bipv2kz2YRzBuZvG1lTIoEtJV88TXJ9TBwYMdQJVtozAoidZPxtODM6 k/ybD8ReoLqiWDWT5O9xdglREAych4ZrnUMowjgEXCMau0Kh3cSGMyQ+UwG+hdEbr1Ik 2jOPHDVhGnXSzzZBhz+qoNgGcG1kg3ewShL2mpzvX4VTiXbqmySEsMk9C59l2e8ttamN PW69S46pQrRIN+l4vu7xCHK8AmcL3abvLCE7UHH6uVvQsHbAab6vdqoxmx0FXaSXEmcS TiWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=TngQvFG1dYuk6C+a+WeqDiz4+xpJj5kzvrSCEtdXsZs=; b=Auen4JvjDAttYJzXEejlPbvVLtEjWbv7wwJyS3PvpCL/etyYdy+FLrxR8jMl7ob4Yk O5KL5tpYUuqCxfpv9m+bSUIESXJjd0yVkyX87qye6ijRLlJd945NF6guGX6fQhu7QPCr zLChmi3oDkgij6ZK/Rjj8oLM21cEh5pKEmcLxKgUG8SThxA+ym6n6VaM41dZCeQl0ELR 38TFZiasbny0WR1AhycDZhoULIJTPwLOg7L1COj6dtyQFsNtVqT3gqw0RoHRxUejyZa0 M2mxA3lvUIvu6s+RuVByApc6y8HQOdVsvC8ucFoGKaReQxkzNlvzHNVV1S9nP/J2XL2D 71gw== 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 c3-v6si15336159plo.45.2018.03.08.13.26.54; Thu, 08 Mar 2018 13:27:09 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750922AbeCHV0B (ORCPT + 99 others); Thu, 8 Mar 2018 16:26:01 -0500 Received: from 1.mo177.mail-out.ovh.net ([178.33.107.143]:59599 "EHLO 1.mo177.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbeCHV0A (ORCPT ); Thu, 8 Mar 2018 16:26:00 -0500 X-Greylist: delayed 1201 seconds by postgrey-1.27 at vger.kernel.org; Thu, 08 Mar 2018 16:25:59 EST Received: from player729.ha.ovh.net (unknown [10.109.120.37]) by mo177.mail-out.ovh.net (Postfix) with ESMTP id 60FCCA08A6 for ; Thu, 8 Mar 2018 21:50:28 +0100 (CET) Received: from heffalump.sk2.org (gw.sk2.org [88.186.243.14]) (Authenticated sender: steve@sk2.org) by player729.ha.ovh.net (Postfix) with ESMTPSA id A48265E0093; Thu, 8 Mar 2018 21:50:21 +0100 (CET) Date: Thu, 8 Mar 2018 21:50:19 +0100 From: Stephen Kitt To: Kees Cook Cc: hare , linux-scsi@vger.kernel.org, Kernel Hardening , LKML Subject: Re: [PATCH] aic7xxx/aic79xx: remove VLAs Message-ID: <20180308215019.399ebdb4@heffalump.sk2.org> In-Reply-To: References: <20180308132225.13229-1-steve@sk2.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/EbA69GcKFcB.rXi1iSj5RD0"; protocol="application/pgp-signature" X-Ovh-Tracer-Id: 11678959735493512462 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtfedrkeeggdduvdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/EbA69GcKFcB.rXi1iSj5RD0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 8 Mar 2018 11:52:25 -0800, Kees Cook wrote: > On Thu, Mar 8, 2018 at 5:22 AM, Stephen Kitt wrote: > > -static const int num_critical_sections =3D sizeof(critical_sections) > > - / sizeof(*critical_sections); > > +#define NUM_CRITICAL_SECTIONS 14 =20 >=20 > The compiler doesn't treat "const" as a literal, hence the need to > change this. However, you can still use the sizeof (actually, this is > exactly ARRAY_SIZE()). Perhaps: >=20 > #define NUM_CRITICAL_SECTIONS ARRAY_SIZE(critical_sections) >=20 > ? >=20 > Otherwise, looks great! Thanks, v2 incoming... Regards, Stephen --Sig_/EbA69GcKFcB.rXi1iSj5RD0 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEnPVX/hPLkMoq7x0ggNMC9Yhtg5wFAlqhogsACgkQgNMC9Yht g5y+vxAAhYiZaRdCTRVxuCtpCt3PtJk1fq4D+RwtPbQjYdM1ZNm5H7DN1tL7Qac/ vP8pnMh3jjU2s2+3lKth3SsM/3izj4KsHFk2XXZjncSIHZddvOhGOpYzGVSNRs97 CKl1JxeTzt+7IaT8u7bxT8sSoIuhMqpXAT+y0YjlG4ljFWpZ23wZ6AxD2EIhDrLi wddbrvzGHMohAFYg+m4gM7E6SPx/N4dwFaW3ZD1bALvB284OIa0lkWrPQJLNI0m3 JahA6OgzrQkHm8qqwGQPyKWY1JC0nTm/euF387AnklyE9v7pjB0uRk6Muj7Yle55 yN4bKnXfFbQH1ANmbBMfvkIUTZESXaViPweHr3RbmbnMtEpvVkxt04qAOp7mhvBL qoICxTDE4C1mTHrehCnCjmA095owv+ZJc7TBZGPyvKlBscQh8KBNiJ/b3mXlrTPV RlLhOt9+oG/Sug/6J+30gYLV5CRJCAQK0H//zmeCKfKIq5Gtefm2CfX1Z+FiXTzM nREDdG1Pqg0Q+Flh7Yyz7DRY2MYe91cprj1ZsWbl+jmy89ds1iIXR3Q+s2011N8T /8QR4vIflUsVgaQoIkKyRqp4bAKxj83oN/vXvAauwTEfNfb0bAoeqAzesfBmc6M9 2xHL145DPD1fth4l4PFNsaYdgeYkw1ZnqAEy1TUTaQSbFKDoB3I= =xGd9 -----END PGP SIGNATURE----- --Sig_/EbA69GcKFcB.rXi1iSj5RD0--