Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1064539pxa; Sat, 22 Aug 2020 09:42:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFfxu684V7+j6Alxb1NCQc1AeNoZU2NjHp82PHjpyX9PCSAjzNuKG26CoEwKlqDyfkDLP8 X-Received: by 2002:aa7:d293:: with SMTP id w19mr7674314edq.119.1598114548336; Sat, 22 Aug 2020 09:42:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598114548; cv=none; d=google.com; s=arc-20160816; b=QxaP4IZXY7l3dU7+x9bseFEGfDHkTNZrKE2U3oLK75DZwV+wRzUwuTHl7HEwLrCDlh sZUoqkBijNInxG/WG3Ax4yIqLMwVhXT4OHxT6YIkhIVl1vg/FVj4FtOXZ+n0n++qe9iM MrPo/Nnp8CHtkIGhJL49WpLjWmRGTnoKIFva3GdTePoRfcAm3ujJHsXS+rZTDvC6ATWK iVjHt/fpKFkOwZbOJRHYfWXZxXHy7kyp1MiRIfwjUE04gFkTwriZsfA16yI4DpUswop3 fT95nQgJEDw/bGBZz4VTv4XlpFzlxoWXkgdg/jA3BjMk4tga7Tc7QQsCQ/oA+8vgSDHv 6f3A== 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 :in-reply-to:references:mime-version:dkim-signature; bh=AhjqY97AoWkQgYESUD46V2nsOC+4EZ57hmZaFOzwIbY=; b=P1+A4+Z1jdVjBrR/zFjb5IogE7G+WuEt2F6LP5ZkQPXm2D+v/rdibY2lRfrZ8ZL/2Z 3gLgoDylYxB/yyR1zD3vtK7kKCJQyL+wjr5G/fllt3sVgonSlKzrGTjjQJOA4QCN9QVU FoDMNVuSLWNb+hM7HwWgAm+fPrf6veuK0RhJhVizQOfMkzEHDpsQ58RswXQPOcjG/MLT 4Fa/t8pqzOQocxxorSZ4ZJw47519Bax15K2NaJKy6oaKYo5HTXFbL2Tj9AvUR7iTQ6EE Vw1Nj6n+ePjxXE0AjPh67LhYeESc3I98skwKa94YKyPtQOWJq1zqrh/YMH4ngKxa9dE2 6GTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=IodUKUnL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l21si3342264eje.61.2020.08.22.09.42.02; Sat, 22 Aug 2020 09:42:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=IodUKUnL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728534AbgHVQlN (ORCPT + 99 others); Sat, 22 Aug 2020 12:41:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728434AbgHVQlN (ORCPT ); Sat, 22 Aug 2020 12:41:13 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A120C061573 for ; Sat, 22 Aug 2020 09:41:12 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id a26so6280516ejc.2 for ; Sat, 22 Aug 2020 09:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AhjqY97AoWkQgYESUD46V2nsOC+4EZ57hmZaFOzwIbY=; b=IodUKUnLIwBv0HIMyYHKCjao2nTjh9hM85YuDG4UUjKT4EQmfixFfTFosilNFKiRvC +ABAWFTz4nJ6M8/7k437Gzr3T5f/XAQDzEhGL3YtGYxMNevNYIibsa+jdu7YLtzOpBjV U/Ronn411gKLTk5LfF+4xKAc+5Vm7fSJJJGhs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AhjqY97AoWkQgYESUD46V2nsOC+4EZ57hmZaFOzwIbY=; b=EhfawgmtBNH6OD9oyKAVD7Lnny79QcxthtB/EZUvnE04C+YsAI8ShQxLzYPyCNVblG A965mLmG05mA6ldh/72IV1ErOzI+RfUKHueIoOpOYIzfIPGrWibykcGaX2mkN6ZWwmu+ iataZm9Z1p3JQcXasfhbj5kp27zlIp+unlrsZIe7qOs7GiXZytT2kTrsHU+Wm1Ra5K4k KnVOOmkKYAK+LZLK1KB5rdszaUmL6dL+PFJY0fdrEC0oUzfBf6jjjL/VSemexVE8/iZt U+BaS19mPoaBaqcKUZItUYiUalrK4D0llJGUs5u6yaqmW1VqnOe8FDLw/OiWdXnlSual sGHQ== X-Gm-Message-State: AOAM532zMIkBwILlPdGNf6zfl2kuZvEYbtIApbV2TIBXbv82OdEg1F9Y i67Z9TKMDovSbtkXrUpGh4uRUpP6tc42jf1miNsouw== X-Received: by 2002:a17:906:ca4f:: with SMTP id jx15mr8233418ejb.449.1598114470840; Sat, 22 Aug 2020 09:41:10 -0700 (PDT) MIME-Version: 1.0 References: <20200821165221.32267-1-mmayer@broadcom.com> <20200822115636.GA19975@kozik-lap> In-Reply-To: <20200822115636.GA19975@kozik-lap> From: Markus Mayer Date: Sat, 22 Aug 2020 09:40:59 -0700 Message-ID: Subject: Re: [PATCH v2] memory: brcmstb_dpfe: fix array index out of bounds To: Krzysztof Kozlowski Cc: Florian Fainelli , Colin Ian King , BCM Kernel Feedback , Linux ARM Kernel , Linux Kernel 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 On Sat, 22 Aug 2020 at 04:56, Krzysztof Kozlowski wrote: > > 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. No. I have always been using mmayer@broadcom.com since it is shorter. That's also what's in the MAINTAINERS file. Please change it back. I accidentally used the long form for one of my e-mail replies which is where the confusion must have originated. > > 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. I missed those. Thanks for catching it. Regards, -Markus > Thanks, applied. > > Best regards, > Krzysztof >