Received: by 10.213.65.68 with SMTP id h4csp474225imn; Tue, 13 Mar 2018 10:10:25 -0700 (PDT) X-Google-Smtp-Source: AG47ELsQf0MqJJgSUA8Y1jmBvfUE3bSlSrCWat8yeVpXzTzk6pSVM5nH0z0H8vSxgDS4J+eKr8gm X-Received: by 10.98.102.82 with SMTP id a79mr1316696pfc.138.1520961025747; Tue, 13 Mar 2018 10:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520961025; cv=none; d=google.com; s=arc-20160816; b=XQsQieo4Fu7DBl4BefApUXX8Dnjx+8LPkyWN65XHxfTWpuMcApuSlKAWCHhgVar3S8 45XZSx+GxWPXC1dB68g3/C0D6DmCZVKzlYr6Ow11l6iT/u34NHN2aYQ283FJHMkuuFuu djg2XDkxOhUi9Z5yS+q4wk87vRNY97RP2GQfGWrEwKr+Q23ALF2Q+aAAP4fRsYC5Nv2m qbFVraiDJD2S2IVnTIoQbWOFTCyrmdw4ZYgCGiqnq+EOUNwnDuIcRN5qVnEti3CcHXxc A17jU3kDkFaa9hnNH/k1XTJRyB7an96aCIfMRD4bHFqyfTZU2u3H/IiXPPAuDmVQGQOn Cn+Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=/gyW2zkaTv7rtJQOSyTSOPIWXUDA0Hf+1ZOu4X6GDRQ=; b=e16p28+TSquz78qzo5fWa/xYMBQ7lucbRj+ya9HsJFBwplRv1PRdp/Fg2/JXmgE4uG D30qM6OI0KC3YkVcuC8a0dufwAldo7mJMpHyj8ZlyQKpW0nDkDz4OswnA8lz1K+QbXZX /7spAffVeLfRpN4wyY/4SgVsWCZtxifo2pbeyYgqT4F9I06Fi2vvI+8bcnLkgo9CW3hp 6z1cNS4G0uxN8slxxNYd0UrR7lrn5p2nY+tqI212MZ9CIv151TzZxhnL1I1jYJQpwXTn cVy4M+63HhfavCHCX+VjqlOWMA58A9iGMoxg+g4Dbcxvh+7imaWWLHKC90l18tlN7SbC 4+/w== 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 c7si285753pfi.323.2018.03.13.10.10.10; Tue, 13 Mar 2018 10:10:25 -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 S932495AbeCMRHK (ORCPT + 99 others); Tue, 13 Mar 2018 13:07:10 -0400 Received: from gateway21.websitewelcome.com ([192.185.46.113]:37636 "EHLO gateway21.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932709AbeCMRHI (ORCPT ); Tue, 13 Mar 2018 13:07:08 -0400 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 402AC400E3571 for ; Tue, 13 Mar 2018 12:07:07 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id vnOCeppDPy2aLvnOCeJBYQ; Tue, 13 Mar 2018 12:07:04 -0500 Received: from [189.175.117.58] (port=53478 helo=[192.168.1.66]) by gator4166.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1evnOB-003UGm-91; Tue, 13 Mar 2018 12:07:03 -0500 Subject: Re: [PATCH] iio: potentiometer: ds1803: remove VLA usage To: Himanshu Jha Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180313152343.GA31789@embeddedgus> <20180313162454.GA8769@himanshu-Vostro-3559> <20180313165906.GA11317@himanshu-Vostro-3559> From: "Gustavo A. R. Silva" Message-ID: Date: Tue, 13 Mar 2018 12:07:00 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180313165906.GA11317@himanshu-Vostro-3559> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.175.117.58 X-Source-L: No X-Exim-ID: 1evnOB-003UGm-91 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.1.66]) [189.175.117.58]:53478 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 14 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/13/2018 11:59 AM, Himanshu Jha wrote: > On Tue, Mar 13, 2018 at 11:31:19AM -0500, Gustavo A. R. Silva wrote: >> >> >> On 03/13/2018 11:24 AM, Himanshu Jha wrote: >>> Hi Gustavo, >>> >>> On Tue, Mar 13, 2018 at 10:23:43AM -0500, Gustavo A. R. Silva wrote: >>>> In preparation to enabling -Wvla, remove VLA. In this particular >>>> case use macro ARRAY_SIZE so the length of array _result_ can be >>>> computed at preprocessing time. >>>> >>>> The use of stack Variable Length Arrays needs to be avoided, as they >>>> can be a vector for stack exhaustion, which can be both a runtime bug >>>> or a security flaw. Also, in general, as code evolves it is easy to >>>> lose track of how big a VLA can get. Thus, we can end up having runtime >>>> failures that are hard to debug. >>>> >>>> Also, fixed as part of the directive to remove all VLAs from >>>> the kernel: https://lkml.org/lkml/2018/3/7/621 >>>> >>>> Signed-off-by: Gustavo A. R. Silva >>>> --- >>> >>> It is already applied as I had sent the patch few days ago. >>> https://lkml.org/lkml/2018/3/10/164 >>> >>> I specifically CC'ed you and Kees to avoid the patch collisions. >>> >> >> I see. Can you please update this spreadsheet: >> >> https://docs.google.com/spreadsheets/d/1OcfyKK8pJ24esYhSEsW4Q2boZE7UTGbYsSEEtFXf7U0/edit > > Updated! > > Also, > > drivers/iio/humidity/hts221_i2c.c:43:2: warning: ISO C90 > forbids variable length array ‘send’ [-Wvla] > > This was already removed in recent commit when regmap API was used. > > "6217792 iio: humidity: hts221: add regmap API support" > > For this I added a short note in the *Notes* column. > Awesome. Thank you -- Gustavo