From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87F9CC433E1 for ; Sat, 22 Aug 2020 11:58:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D9B820720 for ; Sat, 22 Aug 2020 11:58:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="0tjJCwGY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D9B820720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/alPkAnbJnDh86dbIML4ftOG9AzPAt2jjhk7XpbJ9cI=; b=0tjJCwGYyMIM59i0+eC6ijFW/ ck1pYFA/TEuTT+JBvK0VNnbLfq2T2XgZl3htvwww9v2JpgYK4P2TV9fra4dEq69yDVQQfN7WBn7w5 xdqat0cVF57CzXXzyleS9kMQ52W+y8aMQAFf4MtrPHYPvCcpHhYwjbeTBF14LosD0qiFLqiP4ULJf G6nNpV8pr0Ms3vyB/io3MJhhEjT2/90wOqJXOPm1s2scDz9gpKGEZlVOwzfA60X56Z4fCGZWk8Kg5 W9lc9XzZNv1HNx9KbpVbYbKIpfj/jO89Hv4spGnFdaYdFadNbd2prYNfKVqYNZhJw7L+yO02+AWVb BYrDg/NFg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k9S8f-0007vI-CK; Sat, 22 Aug 2020 11:56:49 +0000 Received: from mail-wm1-f65.google.com ([209.85.128.65]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k9S8a-0007uh-1t for linux-arm-kernel@lists.infradead.org; Sat, 22 Aug 2020 11:56:47 +0000 Received: by mail-wm1-f65.google.com with SMTP id a65so556536wme.5 for ; Sat, 22 Aug 2020 04:56:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hvbjMBf8wiATslO6Ak2k4c/lPw2aiLp5EPMz+Nzt5l0=; b=pwUYWn0H0P5FbvcpK/wLU0MecHMzHO8BhR2N8UK0CWlzejg3vVRbN7ljWiz7tvIq4K nbI/4HMH+CUneUQNcXW9++c7BMBNCeiTRsPlDNBFcTssCnFWzttZgCdWiQimtNFd7o3Z 7jlM0Fs28b64itJsD7vaWsfJXLDJyTnGaRjRVKFbuGhKd6MhwmHXmymsuEvIDXoHWx7W NZxW6PiXUeb6Kwk5CDpa8vAWT4z3AHFk0i51SmArWXhx7g6vl0tfHJKmTDznepedAty/ q+a9FsOEJMsr35fksDsa6fYaM8W+yjNR47O0+4KeWICjXw8zlcfFJwFbU/sePONZFW2J Gv6Q== X-Gm-Message-State: AOAM531FwNh9RZistNa4AffOZ54QP+DRbf+osRBIGzBe+6uzuPFIHApw xHn129mqM1nb3pxyZNkw5XWHboLSAKE= X-Google-Smtp-Source: ABdhPJwDh3nTnOl0xu5tFSjniSyxEVyd29s+HNxPR6jSSloTXuvrIa4AxAjUxTWQbtNs0cHSZarczQ== X-Received: by 2002:a1c:ed15:: with SMTP id l21mr7483728wmh.56.1598097398629; Sat, 22 Aug 2020 04:56:38 -0700 (PDT) Received: from kozik-lap ([194.230.155.216]) by smtp.googlemail.com with ESMTPSA id 145sm13188159wma.20.2020.08.22.04.56.37 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Aug 2020 04:56:38 -0700 (PDT) Date: Sat, 22 Aug 2020 13:56:36 +0200 From: Krzysztof Kozlowski To: Markus Mayer Subject: Re: [PATCH v2] memory: brcmstb_dpfe: fix array index out of bounds Message-ID: <20200822115636.GA19975@kozik-lap> References: <20200821165221.32267-1-mmayer@broadcom.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200821165221.32267-1-mmayer@broadcom.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200822_075644_118502_119AF7BC X-CRM114-Status: GOOD ( 16.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Colin Ian King , Florian Fainelli , BCM Kernel Feedback , Linux Kernel , Linux ARM Kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Aug 21, 2020 at 09:52:21AM -0700, Markus Mayer wrote: > We would overrun the error_text array if we hit a TIMEOUT condition, > because we were using the error code "ETIMEDOUT" (which is 110) as an > array index. > > We fix the problem by correcting the array index and by providing a > function to retrieve error messages rather than accessing the array > directly. The function includes a bounds check that prevents the array > from being overrun. > > This patch was prepared in response to > https://lkml.org/lkml/2020/8/18/505. > > Signed-off-by: Markus Mayer Your Signed-off-by does not match From field. Please run scripts/checkpatch on every patch you send. I fixed it up, assuming markus.mayer@broadcom.com is the valid email address. > Acked-by: Florian Fainelli > --- > > Changes since v1: > - Added link of the coverity report to the commit message. > - Added Florian's ack. > - Removed second "const" from get_error_text() return type Florian was so kind to provide you with necessary tags - Fixes and Reported-by. Always include them on resubmit of patches. Thanks, applied. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel