Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3817309pxy; Tue, 4 May 2021 10:32:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrvhN8/A63eACCJHV6rg30QuZdadPEDJJ6bPNi2CQsuhrKTJvL24WRqg3AIacyM/dXrT95 X-Received: by 2002:a63:580b:: with SMTP id m11mr24533910pgb.448.1620149576401; Tue, 04 May 2021 10:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620149576; cv=none; d=google.com; s=arc-20160816; b=KvTt/gcn3zTtusQr0iEuXs91cASnyqCU+kpJaJCXYFPPkF9nbCmHZ+YXgb82Uo8tgo dKeAZ2Jc9q9Lad6sBFhSsXMe2zTRyc1nirzudYE4Ya0L+Bu4u6/r84S0haB8hg0H1w4T pybv35OUWYh3BFJTXMKCBMnMvhqvsZuuwZWu/suv3kCrjT9ZO4QwOdJAcIrz4e3VncMo 659PJ2gJSLpt4mbMOgxJ8IDCGafKuIIUJgRqTEv33GZ9PJDXtMnwpaCRBIybm00XIGZM IsbL6sZN2TO9AqjJ4BuEVwMWC2StAuIa58ZWhcvTrT+nXxFOeutWZzw2+PrU0gj6IyII qQxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=fglKef9FNFFNSB5z6laa2PVSQNP2ntNCUYUI6ccXT+8=; b=rP1lYs/aNDl5XKkLKljHfUGyZ3VRC2wWL75HWTQOXVqpfh/LicN1gxsmMVUdQW1vrH 5mdznWcUaQrmlLhTUtnAmS1RAEfIu0o1/qNIoKHHeZwMWv1RUGIAzCG/nYQlVi4AF1Mq cFshaq276LrrYfS8IypD5qWB+/3UV5wC87IDOB0iRh0oEVtWWRk7NLsqJB6lN4GcIEO7 RMGe4sit8HZ/m5BAmwHO/oD2Tl3Q9oPgXSL08rP6tJn3Du4d0SlGVr/z5hUzwflyb0kz DaCQ1XShYeDS8lFhcGx9J4irtl8bFsma+4sTGVMNUhF1Hdz0YqibU5EzzKMtPISz7CUl 76hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@quicinc.com header.s=qcdkim header.b=QQBErhKf; 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=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si5139060pgg.297.2021.05.04.10.32.43; Tue, 04 May 2021 10:32:56 -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=fail header.i=@quicinc.com header.s=qcdkim header.b=QQBErhKf; 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=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231624AbhEDRb4 (ORCPT + 99 others); Tue, 4 May 2021 13:31:56 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:62657 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230347AbhEDRb4 (ORCPT ); Tue, 4 May 2021 13:31:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1620149461; x=1651685461; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=kUkLaDmx5xiOhOJgVVgmvn9X6rgPLk+8NgVi3a2xkj0=; b=QQBErhKfo2HGSOBdp3IoVsEyhzzyXhSEeunBObdRfCuSlNkpjrXfQsp/ 65HwPTYiCSvQ/1fmjOTb2jIfhSVvndxabZUVFJasw9jDeJv+6tJfZJwzJ Pv8EfqnrweP/34rsvRXu7OAaM7QXqEdcFa8V/EoyRt41yxUBz1BOBJ+Wi M=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-01.qualcomm.com with ESMTP; 04 May 2021 10:31:01 -0700 X-QCInternal: smtphost Received: from nasanexm03e.na.qualcomm.com ([10.85.0.48]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/AES256-SHA; 04 May 2021 10:31:01 -0700 Received: from [10.226.59.216] (10.80.80.8) by nasanexm03e.na.qualcomm.com (10.85.0.48) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 May 2021 10:31:00 -0700 Subject: Re: [PATCH v1 6/6] bus: mhi: core: Add range checks for BHI and BHIe To: Bhaumik Bhatt , CC: , , , , , , References: <1618598825-18629-1-git-send-email-bbhatt@codeaurora.org> <1618598825-18629-7-git-send-email-bbhatt@codeaurora.org> From: Jeffrey Hugo Message-ID: Date: Tue, 4 May 2021 11:30:59 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <1618598825-18629-7-git-send-email-bbhatt@codeaurora.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanexm03f.na.qualcomm.com (10.85.0.47) To nasanexm03e.na.qualcomm.com (10.85.0.48) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/16/2021 12:47 PM, Bhaumik Bhatt wrote: > When obtaining the BHI or BHIe offsets during the power up > preparation phase, range checks are missing. These can help > controller drivers avoid accessing any address outside of the > MMIO region. Ensure that mhi_cntrl->reg_len is set before MHI > registration as it is a required field and range checks will > fail without it. > > Signed-off-by: Bhaumik Bhatt > --- Reviewed-by: Jeffrey Hugo