Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3229516rwb; Tue, 8 Nov 2022 02:01:36 -0800 (PST) X-Google-Smtp-Source: AMsMyM5YfMu3Doeuia2AjRP189wfkKfI0whMuFtXOmbN3Gtq1PJlVQ/51uwU/I4ZHwPXVlg+/457 X-Received: by 2002:a17:90a:2cc7:b0:212:f074:cf4d with SMTP id n65-20020a17090a2cc700b00212f074cf4dmr57207473pjd.70.1667901695805; Tue, 08 Nov 2022 02:01:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667901695; cv=none; d=google.com; s=arc-20160816; b=WzNpGer1I2kA77lgJBM/+kccsTRx9FJvJer+Y1Fyu6by2CF5/bYdjkwKUYF/dHTkA5 Q8+9x8Sjvva5UoHiCsGdS1yiWVDmCj+hQe2xMW0WDPnU2K3LMv02ADLTARNeJNAXFmV4 usEHrj0PrBZhtCDRBpo16cvmSbAjglqS5lPM7NioNH/jRWuDY6KzOGCeK0ZTTJMhrJVN 9Mrl9EqnzZHVcdhW2cSdQ8lO4A4NWrw+S9gTKhs+gYFyXKgyBgPQzBUKRlLj3/4ihed/ EAwq300b4Nl7CzZZzuySvQWllq+DyeznsxnwsidJNaHj44zT8NiCLA7HE8ttwkp/pLoo 981Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=kSwog5ERxG3EokF124vpEbubj3vdn0vtr+WUZpZ5SIc=; b=s21USuEF9YocBsq05yiGL8P1iOoPApbQqK4Qki2hQLeGjyiJVKEBK5i53Ovia+q6ha bWjaqGLqVE2Cg5Z1vEZGtdHprq3aDAiiHnAw/k1x9Kvf6JBOjzk+kuPRdggu1/pXwZlH BGvRQXpkNCE/r4/xg9JGnTGOg5WgPmEByfPz9RhbZbqviSnFLmkseCgVd1W8YdFZafTR V248mDeyerryc9BfRSmzWZ1Sbp1wEqveWktv+VrxkkztHkFcrpRq53nOIbJKWgL5u59q f3HYsWOb5LVjO3K+4f3FJwQc5xoar7pirR7o+moCpJASxMDsZARyFtm67t/ScIU5EKHn Ratw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gdeDy+kV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k19-20020aa788d3000000b0056ae8f6df38si14513911pff.180.2022.11.08.02.01.19; Tue, 08 Nov 2022 02:01:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gdeDy+kV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233567AbiKHJj4 (ORCPT + 90 others); Tue, 8 Nov 2022 04:39:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233804AbiKHJjx (ORCPT ); Tue, 8 Nov 2022 04:39:53 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E2A527176 for ; Tue, 8 Nov 2022 01:39:51 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id be13so20429388lfb.4 for ; Tue, 08 Nov 2022 01:39:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=kSwog5ERxG3EokF124vpEbubj3vdn0vtr+WUZpZ5SIc=; b=gdeDy+kVAls2tF3+8sTJ9fVAWpvclXEl/RcjTan6GjLB1bEPXlpzRWWD0uXdzu1vWt A9zjjA8AiNshAQJha7dQq6pslJ8AKFoE61X7ry6GdgkBi2l4ef4jJJzdChn12qckcqBV S4w7wKz4e0ZYehkm8WUcCsJW+M94nMoOJ17Ae872c1lt7U9O+H1W25wcR6hYUffJYNVg YSnT8wyAo6SF7rmfLLi/6kMhx6zIBVZW7Wo1At5CiBc/vF+C1ceE0ejDpJo1rhNoNMGO n/nQCb8A1WmlLy8/+dN7yL8k85KRYFzmKVWRtZbfj3/PLlqvIGQ9NAgMMEh4oxjBa0qs 31Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kSwog5ERxG3EokF124vpEbubj3vdn0vtr+WUZpZ5SIc=; b=fe6k7edEXpWyvreA9u5KNw3JBIIw7VSisk9uyyk5t5QvovSXi2niwu8lRRshPTe44P ZvKey4WjdCP4BgSL+iX06Nm292RwnyyD1GTxwzrWuNpz1iivUoaymT0Fi+ZgSTXru+MT +DyaMOy/0thPpjZCYoCAyOImef2A71yC2MUplbpRy5obahbhjxPnAPeHPdg6xf7PCgwD nSe/AsY/xNk7T40GP7ARXcHfdqxSnIetQwYqxKr5zRoo94ZiOEfa6U5//8RzDaWzUvIN FRSe6C76FmDbmgu4xoMrRVluUrXVqkmjtQhYZsex9siZ0vXAlru4N5RlvjonfmvLKI0C mPmg== X-Gm-Message-State: ACrzQf3UyOAbF+YJNuBXF5GOMzxj/sHJQ2kMYVYKifOlCe+BPVEVrVFr 18wmdp8FNapCgRKpPQv782/3yg== X-Received: by 2002:a19:dc48:0:b0:4a8:d24b:d78 with SMTP id f8-20020a19dc48000000b004a8d24b0d78mr20399524lfj.351.1667900389861; Tue, 08 Nov 2022 01:39:49 -0800 (PST) Received: from [192.168.0.20] (088156142199.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.199]) by smtp.gmail.com with ESMTPSA id t3-20020a19ad03000000b004a459799bc3sm1700025lfc.283.2022.11.08.01.39.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Nov 2022 01:39:49 -0800 (PST) Message-ID: <32f42513-0c55-042e-2530-c58d980a9ce0@linaro.org> Date: Tue, 8 Nov 2022 10:39:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Coverity: gpmc_is_valid_waitpin(): Control flow issues Content-Language: en-US To: "Niedermayr, BENEDIKT" , "rogerq@kernel.org" , "keescook@chromium.org" Cc: "gustavo@embeddedor.com" , "tony@atomide.com" , "linux-next@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" , "linux-hardening@vger.kernel.org" References: <202211041233.4D45359E7@keescook> <7cdf3d14-3f1b-7cd4-e8b9-e94b5359bf82@kernel.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/11/2022 09:02, Niedermayr, BENEDIKT wrote: > On Mon, 2022-11-07 at 10:56 +0200, Roger Quadros wrote: >> >> On 07/11/2022 10:53, Roger Quadros wrote: >>> Hi Benedikt, >>> >>> On 04/11/2022 21:33, coverity-bot wrote: >>>> Hello! >>>> >>>> This is an experimental semi-automated report about issues detected by >>>> Coverity from a scan of next-20221104 as part of the linux-next scan project: >>>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscan.coverity.com%2Fprojects%2Flinux-next-weekly-scan&data=05%7C01%7Cbenedikt.niedermayr%40siemens.com%7C1a25cc8704524f24224108dac09dfab7%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638034081994087461%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=W1KlBKg9nwEDfFAbqW6Jw7v1d46HQLj8RX8wlZ9RHyc%3D&reserved=0 >>>> >>>> You're getting this email because you were associated with the identified >>>> lines of code (noted below) that were touched by commits: >>>> >>>> Wed Nov 2 10:02:39 2022 -0400 >>>> 89aed3cd5cb9 ("memory: omap-gpmc: wait pin additions") >>>> >>>> Coverity reported the following: >>>> >>>> *** CID 1527139: Control flow issues (NO_EFFECT) >>>> drivers/memory/omap-gpmc.c:1048 in gpmc_is_valid_waitpin() >>>> 1042 spin_unlock(&gpmc_mem_lock); >>>> 1043 } >>>> 1044 EXPORT_SYMBOL(gpmc_cs_free); >>>> 1045 >>>> 1046 static bool gpmc_is_valid_waitpin(u32 waitpin) >>> >>> We will need to change this waitpin argument to int. >>> In addition we will also need to change >>> struct gpmc_waitpin->pin and struct gpmc_setting->wait_pin >>> to int as in the code we are relying on GPMC_WAITPIN_INVALID logic which is -1. >> >> Another alternative with less churn is to leave them as u32 >> but make GPMC_WAITPIN_INVALID set to a large positive number. > Ok, I will fix that. > Do I need to send a new fix-patch on top the current patch series? > Or should I just send only the bugfix-patch for the coverity-bot? > A bugfix patch on current next is ok. Best regards, Krzysztof