From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::143; helo=mail-it1-x143.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x143.google.com (mail-it1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) (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 2CC2F211B76B9 for ; Mon, 21 Jan 2019 08:57:32 -0800 (PST) Received: by mail-it1-x143.google.com with SMTP id b5so16121682iti.2 for ; Mon, 21 Jan 2019 08:57:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gscYxaH0XpYe/3tRUqusPI9D/gjHuUS7Ski79yuJUIs=; b=GUDZU/ueu2ByipRqKM7+CFYVUeQkdCuO1bA8yOStgtzn/DupMAGQxpnDnMoplrnwZW GtbmPNN67w+mJtac1B7T1tdKeHuf/2zCmIm78ikLRjOVlHL/QeWtSfmUaDivl9ardMQI C5853Bl5crMULrvZRZwm5Lt07EvR1KVTui87g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gscYxaH0XpYe/3tRUqusPI9D/gjHuUS7Ski79yuJUIs=; b=otQktMTm27dfkkWTbGAqniFqy4crj+qSPYhrOXqEskiuRp+snoBwUKOFsrsQ/dz+He HUdUmaffv+NH1pmZuIg8/rL61RE/aAHREBTrdLigdYgDl+I/4nRme9JPrYQW2Ga2a71y aD6MsUSvkv7DXM/WQORH16fWMnfSDrIC//k/DRwbVbaQNADYuEu9HTDvTzjBLnc24W7K H0lvqZjLzcKzDLQAgPevHWX5eXDfx1czu/F1lG72vz9vBfxwjEXHSX8E25s2u62u7goh bgJENh/KtwSU+sqE5vyJzmTztn0r1QCaKO52szaNRX0CK/ooHuujNKRXd7l61UQ6Jb9/ X4Aw== X-Gm-Message-State: AJcUukeClPfr6fi2Y4lMXZnDyV1zfgFYzrQmWn9u5QUXfpn/VOk3Wv9F rBUjGbB8KvM4QXXhumK35/hLTAmVya31wog7H8CyHg== X-Google-Smtp-Source: AHgI3IY5oznji/YagTuetCuwQyw9cW6z0BIfqzqnm2OJ5ekluo7McMvRXWp8MtpTfAIDmtThuhRxfdeAXEmEJk7vzaM= X-Received: by 2002:a24:edc4:: with SMTP id r187mr148959ith.158.1548089851409; Mon, 21 Jan 2019 08:57:31 -0800 (PST) MIME-Version: 1.0 References: <20190104144336.8941-1-ard.biesheuvel@linaro.org> <20190104144336.8941-7-ard.biesheuvel@linaro.org> <20190117110456.z22z2udhnbza3liy@bivouac.eciton.net> <20190117120817.c2kpkldlzn7zjrkg@bivouac.eciton.net> In-Reply-To: From: Ard Biesheuvel Date: Mon, 21 Jan 2019 17:57:20 +0100 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" , Masahisa Kojima Subject: Re: [PATCH edk2-platforms 6/7] Platform/DeveloperBox: add .DSC/.FDF description of MM components 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: , X-List-Received-Date: Mon, 21 Jan 2019 16:57:32 -0000 Content-Type: text/plain; charset="UTF-8" On Thu, 17 Jan 2019 at 13:18, Ard Biesheuvel wrote: > > On Thu, 17 Jan 2019 at 13:08, Leif Lindholm wrote: > > > > On Thu, Jan 17, 2019 at 12:10:01PM +0100, Ard Biesheuvel wrote: > > > > > ################################################################################ > > > > > # > > > > > @@ -294,8 +295,10 @@ [PcdsFixedAtBuild.common] > > > > > !endif > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision|$(BUILD_NUMBER) > > > > > > > > > > - gArmTokenSpaceGuid.PcdMmBufferBase|0xFFC00000 > > > > > - gArmTokenSpaceGuid.PcdMmBufferSize|0x00200000 > > > > > + gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE > > > > > > > > So, I can see why you add this hard-wired for the purpose of testing. > > > > But please, add a *very* conspicuous, and strongly worded, comment > > > > statement preceding it. > > > > > > Well, I was talking to Peter about this the other day: according to > > > the spec, this setting should only matter before exit boot services, > > > and since this platform only supports serial and GOP consoles, one > > > could argue that only a physically present user could interact with it > > > before that time. > > > > But that also makes the Pcd pointless. > > > > > The obvious way of implementing this non-trivially on this platform is > > > to use a DIP switch, but that requires you to open the case to > > > enroll/delete the platform key. Perhaps that does not matter, and it > > > would in fact produce a less dangerous reference implementation. > > > > I would be totally OK with that. > > I would also be totally OK with a DynamicPcd settable through the UI > > (which is what most machines I come across have). > > > > That won't work for this implementation: the state of dynamic PCDs > does not propagate into the MM world (nor should it), and so no MM > driver implementing the dynamic PCD protocol exists. > > > But I would also be cool with a sufficiently evil "here be dragons" > > statement, pointing out that we don't care that much > > *on*this*specific*system* because the NOR isn't actually hw protected > > anyway, and this implementation is all about exercising the software > > stack.. > > > > I'll go with that for the time being. I'll add the following: diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc index f191edcb78dd..1ac8c8f95722 100644 --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc @@ -301,6 +301,13 @@ !endif gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision|$(BUILD_NUMBER) + # + # NOTE: this platform is not fully secure (the NOR flash is mapped non-secure) + # and so the MM based secure boot implementation it provides should be treated + # as a reference only. For this reason, it does not make a lot of sense to + # implement an elaborate PlatformSecureLib implementation that can assert + # physical presence, and instead, we'll stick with the default PCD based one. + # gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000