From patchwork Fri Nov 30 11:28:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152518 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3539471ljp; Fri, 30 Nov 2018 03:28:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/Ut4wmxgKxn5hq1AB84/uLDjdA7kbEOcJZQtdLcOaeDl7QHYD22l7DeRASS89pv4i5YO0U4 X-Received: by 2002:a17:902:968d:: with SMTP id n13mr5428114plp.109.1543577317568; Fri, 30 Nov 2018 03:28:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543577317; cv=none; d=google.com; s=arc-20160816; b=eKZM53S3vjJy/sk17i00bXgXEIB27T6YrHKlim1LT9Nf6T6h15DvWpxpMWVb86NWRU V6wwtM+4vAX94O2gvavjDxvLZQsS/uxV2mXQrE7ZP8IYBMzC+9GykHQdhsEGqz0vsYNg a+Q43hBuXMLenj7yWDFZlcN39RpN474X/ULUnbr1EblsF+FqUM0i32tyA2X7CUVnuj6m DMqBy+p5aKA4dk65FNEbYqCKlMBQysqJn0A4sQe/xkDFTFAAyPOWfMwBPu1utp9u5UoP ByNR4dk2jw//jb05GRIxHwRy0gbkfTZucabnEKjP4Bj/dnFLVwvt3rir2d1BE4yZ8eC7 DuBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=MlDcQJ7fYZ/jR3dwLDMuywo9h4Dl6b4Cph+WM5eNFko=; b=uEqj7iSR/+lI6iouLDJaH9yb1YzXwpwXDHwgu9N7kUcAqxzwdPLsljAx65rUMXsOma SYf7/qOykpnglJAxJfOsZIcTWJZ+1VC9T3ta+VFsXRlhA6jbvroaI6uXpiHGjJuFbeNV HkPPHybcEbZCtm60tLSV/HPT3wZPUZLlU5ogG7Er12I9fVHrIgf5IcZMJc8mUnNMg1Ci f3s3VwZ4L42O34Oqz8HfMMqqp5L10wnI7aDamJucS0pxgv7aVrF9IzGZkQhLL2lBgK9u QzFsU5hNNMHzLa19vBIPQ3oiwRNsAbLbWIMBaQZIcmI4qH4anMYt5OXjiVZ0wBEX4CGE vbSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gF297wnv; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id c191si5156480pfg.72.2018.11.30.03.28.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 03:28:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gF297wnv; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8E64A2119739C; Fri, 30 Nov 2018 03:28:36 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::441; helo=mail-wr1-x441.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 424892117D76B for ; Fri, 30 Nov 2018 03:28:34 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id t27so4943998wra.6 for ; Fri, 30 Nov 2018 03:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xo1a7vY2B0NUZQxdc7PXhDSjRt1cMqsf4FEz6xQT8w4=; b=gF297wnv9KiRaZ0EOtWiGAEqjYsekDIK27APKCrfGmTw0lAtB+lkxe4nOG+yRjqQQ0 7cBTeC47SebtWIbQtgm9loYMW8RRrWav0uZyS/ENe9N99r/gWykR6LgDZ2OimNPRMBkJ Oowb2hB209ODFSG90XJLrENqC0LgAFAbrElVM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xo1a7vY2B0NUZQxdc7PXhDSjRt1cMqsf4FEz6xQT8w4=; b=Thmwks39MkVhiOtS1j9izwmiF6cEl9h+Jta73LK39JhfRd7Unc+7MxqINYipIKarYY hfPrghrpyrErc2QrEDr/e1ZKqpWr/JwTsVY6Bvq/q4ysDziG2PZcmoacoh4tEp/PZCYv 80lrIXRlnfRkM6EyowVfGwZ8DdzgNv/oX8QPWEzUBJkivGv479Zy4IdCdhpwc38NH7PJ PUCKVBSJcpWzThBVama/+RkeyrEs91kE6ZE9DOQXVAN3LvEUgZtGa8GYvxYyV5UD2gbk jQbBC7PD8yVj5oeXEtwcAoKNWcukt4vzyqdynlY72yQ9e+6G+vtGc8qR2sO7FRPRrQuu 4POQ== X-Gm-Message-State: AA+aEWaWqm6nQ543pZtsuC0HgwI4T5xc8nySpmwVWlSntYI5lb17BlIs 9tf5TGQkYQZNIBhm4Vb/GhRn7qUV+BM= X-Received: by 2002:a5d:6a42:: with SMTP id t2mr4993145wrw.50.1543577313064; Fri, 30 Nov 2018 03:28:33 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:f070:d240:312e:9f99]) by smtp.gmail.com with ESMTPSA id h16sm4340570wrs.60.2018.11.30.03.28.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 03:28:32 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 30 Nov 2018 12:28:25 +0100 Message-Id: <20181130112829.12173-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [edk2] [PATCH v2 0/4] ArmVirtQemu: unmap page #0 to catch NULL pointer dereferences X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Laszlo Ersek Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Rationale in patch #4. Patch #3 is a prerequisite patch that ensures that we no longer need page #0 to be mapped for the NOR flash driver to be able to expose it as a read/write block device. Patches #1 and #2 are fixes for the ARM version of the ArmMmuLib driver for bugs that get triggered by these changes. Cc: Leif Lindholm Cc: Laszlo Ersek Cc: Eric Auger Cc: Andrew Jones Cc: Philippe Mathieu-Daude Ard Biesheuvel (4): ArmPkg/ArmMmuLib ARM: handle unmapped section in GetMemoryRegion() ArmPkg/ArmMmuLib ARM: handle unmapped sections when updating permissions ArmVirtPkg/NorFlashQemuLib: disregard our primary FV ArmVirtPkg/QemuVirtMemInfoLib: trim the MMIO region mapping .../NorFlashQemuLib/NorFlashQemuLib.inf | 5 ++++ .../QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf | 4 ++-- .../QemuVirtMemInfoPeiLib.inf | 2 ++ ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 3 +++ ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c | 8 +++++-- .../Library/NorFlashQemuLib/NorFlashQemuLib.c | 13 +++++++++-- .../QemuVirtMemInfoLib/QemuVirtMemInfoLib.c | 23 +++++++++++++------ 7 files changed, 45 insertions(+), 13 deletions(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel