Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ee2eba6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "iommu: iommu-debug: limit memory address exposure"

parents eef3c3b2 28c2aaeb
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1488,6 +1488,10 @@ static ssize_t iommu_debug_pte_read(struct file *file, char __user *ubuf,
	ssize_t retval;
	size_t buflen;

	if (kptr_restrict != 0) {
		pr_err("kptr_restrict needs to be disabled.\n");
		return -EPERM;
	}
	if (!dev->archdata.mapping) {
		pr_err("No mapping. Did you already attach?\n");
		return -EINVAL;
@@ -1607,6 +1611,10 @@ static ssize_t iommu_debug_dma_atos_read(struct file *file, char __user *ubuf,
	ssize_t retval;
	size_t buflen;

	if (kptr_restrict != 0) {
		pr_err("kptr_restrict needs to be disabled.\n");
		return -EPERM;
	}
	if (!dev->archdata.mapping) {
		pr_err("No mapping. Did you already attach?\n");
		return -EINVAL;