Message ID | 20230109052043.55473-7-hchauhan@ventanamicro.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Dx1tP6b2; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=XNzxg12f; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nr2PD1zT0z23g7 for <incoming@patchwork.ozlabs.org>; Mon, 9 Jan 2023 16:21:52 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7IHpkilvzylqJbSRqLTLsMMo5XvUshxtkcsgVOkuFok=; b=Dx1tP6b2trKJ7g ApLhEY0kTFmrU1w3aaaEqLaxLoMyHFkZ1ocME9xKDadHohjqoX4iQN6BW3ajzrSArgYXTCEj28Zh6 98sqCu6L3uSjNJNNKurE3slh4T2itNtEeaWHbrvHpCzbxpBzYKYC4PhsCYk4qEgr6xUMtrG6KwHgJ lBi6wgg9o4Q6fLS5gSoP7g1h9rUxFLTTse52cf+kGzqVGc2qZvA6a8P24W2YlfxyO6DXOGsK9aTx8 BHmXD2j1gKH72i2ARhCyBKf4pgduZT2WkDLEW/7XL/M1cx78IVGPhVXwZVO6V6Gpjbn5lLXdfPSgB kGFjV4z0RtTRmwi08CZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEkbJ-00HQpW-UM; Mon, 09 Jan 2023 05:21:38 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEkbF-00HQlL-Ps for opensbi@lists.infradead.org; Mon, 09 Jan 2023 05:21:36 +0000 Received: by mail-pj1-x102d.google.com with SMTP id h7-20020a17090aa88700b00225f3e4c992so11651091pjq.1 for <opensbi@lists.infradead.org>; Sun, 08 Jan 2023 21:21:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NwDEnNKnvC1478OKU6jvuMjDth9RWNZRuSLxYhy291E=; b=XNzxg12f3dttX7v2QgtSQELSk2iB394cbZjt9JkZMnDvwQDEMftGcoLJ29KV3rTRj6 u0NENuYo6TwOFk9Yz6pN+n+8IGCM0ckzsSobAYmr4ysOgai7x6L9gGYruTexfHgi3swR f918fx0wn9vuGXHhW/ZYmwub4uUjrSEbv8xpvP53vrU0h7zodAGntBCukfKhzqJ5qasZ +7TFETab+PeYBVb1cOIth039d7YMH9DoThIbPXSMCX7RsheQLryvdiSHZLdtZ9U0ybhX bKPZosQCOBgwfGVA1YzJ0lSPe/o9H8K9I1UIlrq5dezFmRSK7ttH5K2Bs6W8iCdfjvCU V02w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NwDEnNKnvC1478OKU6jvuMjDth9RWNZRuSLxYhy291E=; b=da/lqrY/5IYShzP3RU8YrprTmhOasWXSyy72pln+S03mQDGhiqIsiC+01Pegra7HU/ 4jM+tEhYOLBD+Rsv5oLycqkfKDSG8AulskaLw9EHRjRRmTrZO9XzBmkuhUGj0IGgw97r y0n/mTG+bilPOykrnX4+GcTpjVTej+MorRkIlv5AVQNvlZp8AtjliZprpJeKnBCuOn3J g2bUxnQJEmUtvnTNC35rY0ko2BKfmklejcy7NrpF2iaylP7yx59wiUf8tK1s9mBf97F4 z4lYotNO9Bx6ZhPqz+J2GhY+RJsLnnyEtRG08v7kteVk2UL+RVQlMXUSPC0FPXeFJrJw mE4A== X-Gm-Message-State: AFqh2kqC0N2CrYZx/V/3qawkQx3haESqkWNqZ0V1Zf7VisRkSKQgrzaN zkPNdHkv6CdDELkIqiT8jyFTptRJRMvqliq0XL0= X-Google-Smtp-Source: AMrXdXuE8om5sanZCJ5Fbl7cu5jAtgv6SKS5u1X2BIOoNyi5FcPsFXsmG7HeDhfwj0wrLM6PFd3Nig== X-Received: by 2002:a05:6a20:93a1:b0:a5:cc8f:cd14 with SMTP id x33-20020a056a2093a100b000a5cc8fcd14mr82015894pzh.35.1673241691953; Sun, 08 Jan 2023 21:21:31 -0800 (PST) Received: from localhost.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id e6-20020a17090301c600b00192dda430ddsm4992027plh.123.2023.01.08.21.21.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Jan 2023 21:21:31 -0800 (PST) From: Himanshu Chauhan <hchauhan@ventanamicro.com> To: opensbi@lists.infradead.org Cc: Himanshu Chauhan <hchauhan@ventanamicro.com>, Anup Patel <anup@brainfault.org> Subject: [PATCH v2 6/9] lib: utils: Use SU-{R/W/X} flags for region permissions during parsing Date: Mon, 9 Jan 2023 05:20:40 +0000 Message-Id: <20230109052043.55473-7-hchauhan@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230109052043.55473-1-hchauhan@ventanamicro.com> References: <20230109052043.55473-1-hchauhan@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230108_212133_864340_C48C077D X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Use the newer SU-{R/W/X} flags for checking and assigning region permissions. Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org> --- lib/utils/fdt/fdt_domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:102d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <opensbi.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/opensbi>, <mailto:opensbi-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/opensbi/> List-Post: <mailto:opensbi@lists.infradead.org> List-Help: <mailto:opensbi-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/opensbi>, <mailto:opensbi-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "opensbi" <opensbi-bounces@lists.infradead.org> Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
Split region permissions into M-mode and SU-mode
|
expand
|
diff --git a/lib/utils/fdt/fdt_domain.c b/lib/utils/fdt/fdt_domain.c index 35462a2..45612ef 100644 --- a/lib/utils/fdt/fdt_domain.c +++ b/lib/utils/fdt/fdt_domain.c @@ -338,9 +338,9 @@ static int __fdt_parse_domain(void *fdt, int domain_offset, void *opaque) * 2) mmio regions protecting M-mode only mmio devices */ sbi_domain_for_each_memregion(&root, reg) { - if ((reg->flags & SBI_DOMAIN_MEMREGION_READABLE) || - (reg->flags & SBI_DOMAIN_MEMREGION_WRITEABLE) || - (reg->flags & SBI_DOMAIN_MEMREGION_EXECUTABLE)) + if ((reg->flags & SBI_DOMAIN_MEMREGION_SU_READABLE) || + (reg->flags & SBI_DOMAIN_MEMREGION_SU_WRITABLE) || + (reg->flags & SBI_DOMAIN_MEMREGION_SU_EXECUTABLE)) continue; if (FDT_DOMAIN_REGION_MAX_COUNT <= val32) return SBI_EINVAL;