Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2330875rdb; Thu, 21 Sep 2023 15:47:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGaZ4m6ScoWd8e4TptNxFSi+AkkewkjFyttN6qjuL44FfMTLkBOlzhHpW6cYRIWMaIT9hpM X-Received: by 2002:a17:90b:896:b0:26d:5cd0:979f with SMTP id bj22-20020a17090b089600b0026d5cd0979fmr6878513pjb.43.1695336476951; Thu, 21 Sep 2023 15:47:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695336476; cv=none; d=google.com; s=arc-20160816; b=NNmjgInin6Wv6ovdo9AUdfrLg+xIPmAwJ9VDsCp13Lu9M2q812nmTT7nJ2hHNdjYXv FJs8O/hcOawDksqs8jWiwyMY7c52gV6jvo5DJ8TuVffWKzcXowfZZ6ruFcozHwQRfFW7 mO585f5vvMO8forfoSeSAVfy4W1C7MtIwa92lKLkUH1C7XAxL/CQG7VFSVnBdIT5aU/u KfV7EHMNFpSzeTt/7YUju611rLDonWrqIs43XfS7R78j7P+dSox2XCnL2cX1gZo8eMOy ajsJWN2L6CCwGlNXK27UA3WWCabEsz5dvNlswyzHfmzYH90XidHmcnF1x/RePQmOOORW 7xwQ== 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=h5cABMrQhshDaG6TwwFpOJKeN2scA9eV13qN+CKmNlM=; fh=YApP0vAPFGT7SOJuXPF6BQ3Gx5dK3ArzinZlO3dRdfQ=; b=OZejpgeTOj+O6QVGmEIQEdcjU1PJgV1sluFtpRncrGqCWdzNM67K2fWrYyEzVjXNw+ V7CxMy+oi/yEOI8Mfz61Nlw2RGmZM3MeOmYPL3h4G7uZ1HVstCX5Bzp3mgHruZgYSxSi EKFcbC6OI7rW1AfpdegkD5VOSqHrjPv2aWYdKa8d2sz0XonS8m+Q2eImytVfRaLd8nRy KYEP4lRJj2WhlD0wjXbEfXr+r9bdH5gGgwQYqYysMKpcrN+lvjSWp3cP2OE+CSB9G2jL rBaNYKoMcTwhaatakCCwe+L8gKEYdrC9it/Hd3V3+ex6Ox10NNVM+b3Q5A5WEpEAibFH TlHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UD/4Kelk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id pg1-20020a17090b1e0100b0026845738569si2812175pjb.169.2023.09.21.15.47.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 15:47:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UD/4Kelk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 65E4582A88BC; Thu, 21 Sep 2023 11:39:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229611AbjIUSiz (ORCPT + 99 others); Thu, 21 Sep 2023 14:38:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbjIUSiO (ORCPT ); Thu, 21 Sep 2023 14:38:14 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05689D66C1 for ; Thu, 21 Sep 2023 11:27:16 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-530ea522f5eso1445020a12.3 for ; Thu, 21 Sep 2023 11:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695320834; x=1695925634; darn=vger.kernel.org; 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=h5cABMrQhshDaG6TwwFpOJKeN2scA9eV13qN+CKmNlM=; b=UD/4KelkQFI16ePao3Mivbf5gsFOpwOQDLR62/V+GfvWNMbGkFaRjVxIh4WsFMuoFo OjlKNTQyIji5MxHdL6u4kf+4OeVQDrAPaC0flqcvlTIMKTlKgocl0EuvyHj5HnY0/DFV uCA3D5wBaJGZBHywW9EkXbN6F7fCprPj4rBP+6v40mgUrb8U5ppTKm/nMEJF1cvQE3W5 xUnhrX0IJpcthMS9d7R60NE9CVcnhD2rk1HCyIo7mG+ujF89FeugYXyRGtN6rv2hZxbf xQvcWj09MsTLjtOqctyEonkdJtOtNQRri4CmRZPmE6onCu1IlVFJCzYv5c9zevD16SDU 0D6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695320834; x=1695925634; 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=h5cABMrQhshDaG6TwwFpOJKeN2scA9eV13qN+CKmNlM=; b=w+wqCyS8UTZMGBojBKoBYK4Vfoos2ZNh1RB2gz8aP/n0TtxuaqWj79fVrmHLvcAwbZ ZGOHW/WsVeWr7ZCOi0sqPiqlxrbSHy6PyOxcZCqpW9G7nWyidmJYrL3ntEGZPGxFDEmZ eQPqjZ3f++RNVWeVmjkJUTsycJ3axznTLVuhAj23oz4Yojugt7kI4gPsr0AUqh8GbIDq LfgrWNDQKOW3BzTvTnPBVF6R3ZjLLAfqLAOndyyYNa04EdL6P2esDzc9SAujmqAhc/Wj YMfoTAiHSmzv+Fp7Io/l8x8xluDEonyHDPX5IaqDA0RsmAhADbOBqzEDnQeFUi8LaZEd JFTQ== X-Gm-Message-State: AOJu0YyejBGahNRDjzCWNtJuJVkpbviyUgYJEAUeN2L8hjsLcnM2CucH Vdll4S7PXKpj9X4oYzY0o9opq6P3N8iE5pajvfwBAA== X-Received: by 2002:a17:906:844b:b0:99c:ad52:b00 with SMTP id e11-20020a170906844b00b0099cad520b00mr3861431ejy.6.1695279998107; Thu, 21 Sep 2023 00:06:38 -0700 (PDT) Received: from [172.20.15.189] (static-212-193-78-212.thenetworkfactory.nl. [212.78.193.212]) by smtp.gmail.com with ESMTPSA id dx26-20020a170906a85a00b0099bcd1fa5b0sm573534ejb.192.2023.09.21.00.06.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Sep 2023 00:06:37 -0700 (PDT) Message-ID: <0349897d-8802-b4c9-c867-20d139baf952@linaro.org> Date: Thu, 21 Sep 2023 09:06:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v3 1/3] dt-bindings: reserved-memory: rmtfs: Allow guard pages Content-Language: en-US To: Bjorn Andersson , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230920-rmtfs-mem-guard-pages-v3-0-305b37219b78@quicinc.com> <20230920-rmtfs-mem-guard-pages-v3-1-305b37219b78@quicinc.com> From: Konrad Dybcio In-Reply-To: <20230920-rmtfs-mem-guard-pages-v3-1-305b37219b78@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 21 Sep 2023 11:39:11 -0700 (PDT) X-Spam-Level: * On 9/21/23 04:37, Bjorn Andersson wrote: > On some Qualcomm platforms the firwmare, or hardware, does not > gracefully handle memory protection of the rmtfs memory region when > placed adjacent to other protected region. Some DeviceTree authors have > worked around this issue by explicitly reserving the space around the > region, but this prevents such author to use rely on the OS to place the > region, through the use of "size" (instead of a fixed location). > > Introduce a flag to indicate that guard pages need be carved at the > beginning and end of the memory region. The user shall account for the > two 4k blocks in the defined size. > > Signed-off-by: Bjorn Andersson > --- > .../devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml > index bab982f00485..2d7be508c5a0 100644 > --- a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml > +++ b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml > @@ -26,6 +26,17 @@ properties: > description: > > identifier of the client to use this region for buffers > > + qcom,use-guard-pages: > + type: boolean > + description: > > + Indicates that the firmware, or hardware, does not gracefully handle > + memory protection of this region when placed adjacent to other protected > + memory regions, and that padding around the used portion of the memory > + region is necessary. > + > + When this is set, the first and last 4kB should be left unused, and the > + effective size of the region will thereby shrink with 8kB. kiB Konrad