Re: [edk2-devel] [edk2-rfc] [RFC] code-first process for UEFI-forum specifications
Samer El-Haj-Mahmoud
Thanks Leif.
toggle quoted messageShow quoted text
As far as I know, the main feedback I heard is "when will this start?"... So, the sooner the better .. Thanks for taking the lead and driving!
-----Original Message-----
From: Leif Lindholm <leif@...> Sent: Wednesday, March 11, 2020 12:03 PM To: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...> Cc: devel@edk2.groups.io; Felixp@...; rfc@edk2.groups.io Subject: Re: [edk2-devel] [edk2-rfc] [RFC] code-first process for UEFI-forum specifications Hi Samer, I had, perhaps excessively, been waiting for more feedback. I promised Mike yesterday that I will rework based on feedback and send out next week at the latest. If people have no further comments then, we can adopt the process and start using it. Regards, Leif On Wed, Mar 11, 2020 at 15:52:07 +0000, Samer El-Haj-Mahmoud wrote: Has there been any progress on this "code-first process" proposal? Any timeline on when we should expect it to be launched?IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
|
|
Re: [edk2-devel] [edk2-rfc] [RFC] code-first process for UEFI-forum specifications
Samer El-Haj-Mahmoud
Has there been any progress on this "code-first process" proposal? Any timeline on when we should expect it to be launched?
toggle quoted messageShow quoted text
Thanks, --Samer
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Felix Polyudov via Groups.Io Sent: Friday, February 14, 2020 10:30 AM To: rfc@edk2.groups.io; 'leif@...' <leif@...>; devel@edk2.groups.io Subject: Re: [edk2-devel] [edk2-rfc] [RFC] code-first process for UEFI-forum specifications Leif, The process does not in fact change the UEFI bylaws - the change isI think it would be good to add more details regarding the interaction between edk2 and UEFI forum. Here is what I suggest: Each specification update Bugzilla ticket must have a sponsor. A sponsor is a person or a company that will be presenting change request to the UEFI forum. A sponsor has to be identified early in the process. Preferably along with Buzilla ticket creation. It is sponsor's responsibility to officially submit ECR to the UEFI forum by creating a mantis ticket with a Bugzilla link. There are two reasons to create mantis ticket early in the process: - Creation of the ticket exposes the effort to the UEFI forum thus enabling early feedback from the members(via Bugzilla), which may reduce number of iterations in the implement --> get feedback --> re-implement cycle. - edk2 effort will be taken into consideration while scheduling future specification releases Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
|
|
Re: [edk2-devel] [edk2-rfc] [RFC] code-first process for UEFI-forum specifications
Doran, Mark <mark.doran@...>
The one thing we don't have in hand for this is a template into which we can put prospective ECR submission material that is collected as part of the code-first process.
toggle quoted messageShow quoted text
We could just use the ECR template that is used for regular proposals with the UEFI Work Groups. However, the thought was to add some verbiage that template which effectively says: anything put in the proposed ECR template comes with permission to give ownership and rights in that content to the UEFI Forum so that it can publish the material as part of the specs under the same rights as all the other spec material there. Since TianoCore doesn't have a legal team per se, we're having Intel legal work something like that with a view to contributing that to the community for review and hopefully adoption in short order. That said, I don't think we need to wait on the template to begin using a code-first approach for things we would ultimately like to end up in the formal specs once code is "done". We really only need that template at the point that the ECR content is also done, meaning reflective of sufficiently completed code work. If we do start assembling content that looks like ECR fodder in parallel with code development, I'd suggest that we keep track of who is putting words into that fodder so that when it gets moved into the template prior to formal submission as an ECR we can get assurance from those people that they are OK with the T's & C's in the template. Fundamentally we just need to make sure that everyone contributing to the development of one of these code first things is OK with spec description stuff being incorporated into a UEFI document under UEFI T's & C's as the end product. UEFI T's & C's are designed to make sure that anyone can read the spec just for the asking and that there are no undesired IP complications (as there have been in some other standards) for people that choose to implement to the specs. -- Cheers, Mark.
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Samer El-Haj-Mahmoud Sent: Wednesday, March 11, 2020 9:32 AM To: Leif Lindholm <leif@...> Cc: devel@edk2.groups.io; Felixp@...; rfc@edk2.groups.io Subject: Re: [edk2-devel] [edk2-rfc] [RFC] code-first process for UEFI-forum specifications Thanks Leif. As far as I know, the main feedback I heard is "when will this start?"... So, the sooner the better .. Thanks for taking the lead and driving! -----Original Message----- From: Leif Lindholm <leif@...> Sent: Wednesday, March 11, 2020 12:03 PM To: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...> Cc: devel@edk2.groups.io; Felixp@...; rfc@edk2.groups.io Subject: Re: [edk2-devel] [edk2-rfc] [RFC] code-first process for UEFI-forum specifications Hi Samer, I had, perhaps excessively, been waiting for more feedback. I promised Mike yesterday that I will rework based on feedback and send out next week at the latest. If people have no further comments then, we can adopt the process and start using it. Regards, Leif On Wed, Mar 11, 2020 at 15:52:07 +0000, Samer El-Haj-Mahmoud wrote: Has there been any progress on this "code-first process" proposal? Any timeline on when we should expect it to be launched?IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
|
|
Re: [edk2-devel] [edk2-rfc] [RFC] code-first process for UEFI-forum specifications
Leif Lindholm
Hi Samer,
toggle quoted messageShow quoted text
I had, perhaps excessively, been waiting for more feedback. I promised Mike yesterday that I will rework based on feedback and send out next week at the latest. If people have no further comments then, we can adopt the process and start using it. Regards, Leif
On Wed, Mar 11, 2020 at 15:52:07 +0000, Samer El-Haj-Mahmoud wrote:
Has there been any progress on this "code-first process" proposal? Any timeline on when we should expect it to be launched?
|
|
Re: [RFC MdeModulePkg/Variable v1 0/2] Fix two issue in variable
Ming Huang
Any comment?
toggle quoted messageShow quoted text
On 2/15/2020 4:54 PM, Ming Huang wrote:
There are two infrequent issues in variable.
|
|
Re: [RFC] code-first process for UEFI-forum specifications
Felix Polyudov
Leif,
The process does not in fact change the UEFI bylaws - the change is that theI think it would be good to add more details regarding the interaction between edk2 and UEFI forum. Here is what I suggest: Each specification update Bugzilla ticket must have a sponsor. A sponsor is a person or a company that will be presenting change request to the UEFI forum. A sponsor has to be identified early in the process. Preferably along with Buzilla ticket creation. It is sponsor's responsibility to officially submit ECR to the UEFI forum by creating a mantis ticket with a Bugzilla link. There are two reasons to create mantis ticket early in the process: - Creation of the ticket exposes the effort to the UEFI forum thus enabling early feedback from the members(via Bugzilla), which may reduce number of iterations in the implement --> get feedback --> re-implement cycle. - edk2 effort will be taken into consideration while scheduling future specification releases Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
|
|
Re: Q: Side effects of incrementing gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size?
Aaron Young
Thanks Laszlo! Very helpful.
toggle quoted messageShow quoted text
-Aaron
On 02/11/2020 01:15 AM, Laszlo Ersek wrote:
-fw_cfg name=opt/ovmf/X-PciMmio64Mb,string=65536
|
|
Re: Q: Side effects of incrementing gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size?
Laszlo Ersek
Hi Aaron,
On 02/10/20 21:15, aaron.young@... wrote: Please refer to the following thread: * [edk2-discuss] [OVMF] resource assignment fails for passthrough PCI GPU https://edk2.groups.io/g/discuss/message/59 The gist is that (a) you can increase the 64-bit MMIO aperture without rebuilding OVMF, like this (on the QEMU command line): -fw_cfg name=opt/ovmf/X-PciMmio64Mb,string=65536 (This sets a 64GiB aperture) (b) Implementing such a change in the DSC file(s) statically is not recommended, as it could prevent guests from booting on hosts that support EPT (= nested paging on Intel CPUs) but only support 36 physical address bits. (c) Sizing the aperture in OVMF dynamically to whatever the host CPU's phys address width supports would also not be ideal, due to guest RAM consumption and possible VM migration problems. QEMU doesn't even report the host CPU's phys address width accurately to the guest, at the moment, AIUI. Thanks Laszlo
|
|
Q: Side effects of incrementing gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size?
Aaron Young
Hello, After adding some GPU cards to our system (each containing a 16GB BAR), we ran out of MEM64 BAR space as indicated by the following OVMF DEBUG output:
-------- PciHostBridge: SubmitResources for PciRoot(0x0) I/O: Granularity/SpecificFlag = 0 / 01 Length/Alignment = 0x1000 / 0xFFF Mem: Granularity/SpecificFlag = 32 / 00 Length/Alignment = 0x3100000 / 0xFFFFFF Mem: Granularity/SpecificFlag = 64 / 00 Length/Alignment = 0x804000000 / 0x3FFFFFFFF PciBus: HostBridge->SubmitResources() - Success PciHostBridge: NotifyPhase (AllocateResources) RootBridge: PciRoot(0x0) * Mem64: Base/Length/Alignment =** **FFFFFFFFFFFFFFFF/804000000/3FFFFFFFF - Out Of** **Resource!* Mem: Base/Length/Alignment = C0000000/3100000/FFFFFF - Success I/O: Base/Length/Alignment = C000/1000/FFF - Success Call PciHostBridgeResourceConflict(). PciHostBridge: Resource conflict happens! RootBridge[0]: I/O: Length/Alignment = 0x1000 / 0xFFF Mem: Length/Alignment = 0x3100000 / 0xFFFFFF Granularity/SpecificFlag = 32 / 00 Mem: Length/Alignment = 0x0 / 0x0 Granularity/SpecificFlag = 32 / 06 (Prefetchable) Mem: Length/Alignment = 0x804000000 / 0x3FFFFFFFF Granularity/SpecificFlag = 64 / 00 Mem: Length/Alignment = 0x0 / 0x0 Granularity/SpecificFlag = 64 / 06 (Prefetchable) Bus: Length/Alignment = 0x1 / 0x0 PciBus: HostBridge->NotifyPhase(AllocateResources) - Out of Resources ----------- Incrementing gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size from the default value (0x800000000) to 0x2000000000 fixed the issue and should allow enough space to add several (7 or so) GPUs to the system. However, we are concerned about side-effects of such a change. So, my question is: Could incrementing PcdPciMmio64Size cause any negative side effects? Thanks in advance for any help/comments/suggestions... -Aaron Young
|
|
Enhancement to CryptoPkg/BaseHashApiLib
Sukerkar, Amol N
Hi Mike, Jian and Jiewen,
Based on our discussion, I have compiled the enhancements/changes to be made to BaseHashApiLib instance in CryptoPkg in the Bugzilla, https://bugzilla.tianocore.org/show_bug.cgi?id=2511. Please go over the changes and provide comments/feedback. Once I have confirmation that I have captured all the identified changes, I will begin implementation. Thanks, Amol
|
|
Re: [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative
Wang, Sunny (HPS SW)
Hi Bret,
toggle quoted messageShow quoted text
Your proposal looks good to me, and most of my questions/concerns were already answered/solved by the GOOD discussion between you and Jiewen. For now, I just have one remaining question. Can we also make DumpVariablePolicy as a platform choice? DumpVariablePolicy would also expose the information about how to pass the check to the attacker. If my understanding is correct, the attacker can even use the information to unlock the variable locked by LOCK_ON_VAR_STATE type policy. Therefore, If the DumpVariablePolicy is just to allow platform tests to audit the entire policy list, can we add a PCD or a build flag check to disable it in release build? Of course, I also agree with Jiewen's point about making DisableVarPolicy as a platform choice. By the way, I had the other question that I already got the answer from the code and your document. Since it hasn't been discussed, I think it would be good to share the answer with others. The question is how VariablePolicy deals with the multiple RegisterVariablePolicy calls with the same variable name and GUID. The answer is that the first registered policy will be the winner. The later calls (from attackers) with the same name and GUID will just get EFI_ALREADY_STARTED and fail to register the compromised policy. Therefore, RegisterVariablePolicy looks good to me as well. Regards, Sunny Wang
-----Original Message-----
From: rfc@edk2.groups.io [mailto:rfc@edk2.groups.io] On Behalf Of Bret Barkelew via Groups.Io Sent: Wednesday, January 29, 2020 9:36 AM To: rfc@edk2.groups.io Subject: [edk2-rfc] [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative All, VariablePolicy is our proposal for an expanded "VarLock-like" interface to constrain and govern platform variables. I brought this up back in May to get initial comments on the interface and implications of the interface and the approach. We implemented it in Mu over the summer and it is not our defacto variable solution. It plugs in easily to the existing variable infrastructure, but does want to control some of the things that are currently managed by VarLock. There are also some tweaks that would be needed if this were desired to be 100% optional code, but that's no different than the current VarLock implementation which has implementation code directly tied to some of the common variable code. I've structured this RFC in two pieces: * The Core piece represents the minimum changes needed to implement Variable Policy and integrate it into Variable Services. It contains core driver code, central libraries and headers, and DXE driver for the protocol interface. * The Extras piece contains recommended code for a full-feature implementation including a replacement for the VarLock protocol that enables existing code to continue functioning as-is. It also contains unit and integration tests. And as a bonus, it has a Rust implementation of the core business logic for Variable Policy. The code can be found in the following two branches: https://github.com/corthon/edk2/tree/personal/brbarkel/var_policy_rfc_core https://github.com/corthon/edk2/tree/personal/brbarkel/var_policy_rfc_extra A convenient way to see all the changes in one place is to look at a comparison: https://github.com/corthon/edk2/compare/master...corthon:personal/brbarkel/var_policy_rfc_core https://github.com/corthon/edk2/compare/personal/brbarkel/var_policy_rfc_core...corthon:personal/brbarkel/var_policy_rfc_extra There's additional documentation in the PPT and DOC files in the core branch: https://github.com/corthon/edk2/blob/personal/brbarkel/var_policy_rfc_core/RFC%20VariablePolicy%20Proposal%20Presentation.pptx https://github.com/corthon/edk2/blob/personal/brbarkel/var_policy_rfc_core/RFC%20VariablePolicy%20Whitepaper.docx (You'd need to download those to view.) My ultimate intention for this is to submit it as a series of patches for acceptance into EDK2 as a replacement for VarLock. For now, I'm just looking for initial feedback on any broad changes that might be needed to get this into shape for more detailed code review on the devel list. Thanks! - Bret
|
|
Re: [edk2-devel] [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative
Yao, Jiewen
Add devel@edk2.groups.io.
toggle quoted messageShow quoted text
-----Original Message-----
|
|
Re: [edk2-devel] [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative
Yao, Jiewen
Thanks, Bret.
toggle quoted messageShow quoted text
Comments below.
-----Original Message-----[Jiewen] Right. That is my understanding- deprecate both. I saw you only mention to deprecate VarLock, but not VarCheck. That is why I get confused. I don’t recommend we have 3 engines. Too burden to maintain the code. One possible option is to implement VarLockProtocol and VarCheckProtocol on top of VarPolicyProtocol. (like a thunk) As such, there is no impact on the existing private platform code, with the benefit that one central engine controls everything. Later, we can check platform one by one. After the last one is migrated, we can remove VarLock and VarCheck thunk. [Jiewen] OK, if my understanding is correct, the DisablePolicy() should only be called in some special environment, but NOT a normal feature involved in the normal boot.2. The Function - DumpVariablePolicy() - makes me confused in the beginning.In my thought, "Dump" means to show some debug message. But here, you Then I am feeling we should separate the DisablePolicy from this protocol, because this interface is very dangerous. I don’t want any driver call it by mistake. Can we split the VARIABLE_POLICY to VARIABLE_POLICY (normal boot usage) + VARIABLE_POLICY_CONTROL (very special usage) Like below: typedef struct { UINT64 Revision; REGISTER_VARIABLE_POLICY RegisterVariablePolicy; DUMP_VARIABLE_POLICY DumpVariablePolicy; LOCK_VARIABLE_POLICY LockVariablePolicy; } _VARIABLE_POLICY_PROTOCOL; typedef struct { UINT64 Revision; DISABLE_VARIABLE_POLICY DisableVariablePolicy; IS_VARIABLE_POLICY_ENABLED IsVariablePolicyEnabled; } _VARIABLE_POLICY_CONTROL_PROTOCOL; VARIABLE_POLICY_PROTOCOL is always installed. In normal boot, the VARIABLE_POLICY_CONTROL_PROTOCOL is NOT installed. As such, the policy is always enforced. The VARIABLE_POLICY_CONTROL_PROTOCOL is only installed in some special mode, controlled by PCD - maybe. A platform may choose to: 1) Use static PCD to always disable VARIABLE_POLICY_CONTROL_PROTOCOL installation. 2) Use dynamic PCD to control VARIABLE_POLICY_CONTROL_PROTOCOL installation only in special mode. Thank you Yao Jiewen
|
|
Re: [edk2-devel] [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative
brbarkel@...
Sorry, Jiewen. I missed this email when it came in...
1. We have 2 variable related protocol - EDKII_VARIABLE_LOCK_PROTOCOL and EDKII_VAR_CHECK_PROTOCOL. Do you want to deprecate both? Or only deprecate EDKII_VARIABLE_LOCK_PROTOCOL?I think we would recommend deprecating both. Is there much consumption of the VarCheck protocol? A platform could always opt to include both (or all 3!), but they wouldn't be able to immediately tell which engine rejected the SetVariable. 2. The Function - DumpVariablePolicy() - makes me confused in the beginning. In my thought, "Dump" means to show some debug message. But here, you want to return the policy. Can we change the name to GetVariablePolicy()?I see your point about possible confusion. I think we would try to clarify this in the function documentation. Due to the code-first approach we've taken on this, we already have partners who have implemented the policy with DumpVariablePolicy as the name and it doesn't seem like a huge problem. 3. The function - DisableVariablePolicy(). Does it disable current policy engine? Does it disable any future policy engine? Does it block RegisterVariablePolicy() call?Disable turns off the enforcement. You should still be able to register new policies for auditing purposes (they will still be returned by DumpVariablePolicy), but no SetVariables will be rejected. 4. The function - LockVariablePolicy() - Can it lock the DisableVariablePolicy() call?Correct. Once the interface is locked, it cannot be disabled. Locking should be performed at EndOfDxe or ReadyToBoot or wherever the platform TCB is. 5. The use case "In MFG Mode Variable Policy Engine is disabled, thus these VPD variables can be created. These variables are locked with lock policy type LockNow, so that these variables can't be tampered with in Customer Mode."Correct. The MfgMode is just a suggestion and is entirely up to the platform. Our MfgMode (which has not been open-sourced yet, but we're working on it) will call DisableVariablePolicy because our threat model indicates that compromising MfgMode is a total compromise (there are many other attack vectors once MfgMode is compromised). As such, we protect it extensively. But there is nothing in the core or extra code that would automatically disable the policy engine for any platform that didn't want that. It is up to the platform, however, to make sure they lock the policy engine (similar to locking SMM).
|
|
Re: [EXTERNAL] Re: [edk2-devel] [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative
Bret Barkelew <bret.barkelew@...>
Kevin,
Agreed and we were sensitive to that in our codebase as well. Surface and other consumers had drivers expecting VarLock and we didn’t want to have to rewrite them all (at least not immediately). If you take a look at the MuVarPolicyFoundationDxe driver in the extras branch… It contains a number of features that we considered fundamental for building complex constructions, but we’re (strictly speaking) a core part of the Variable Policy infrastructure. One of those features is installing a VarLock interface that leverages Variable Policy. https://github.com/corthon/edk2/tree/personal/brbarkel/var_policy_rfc_extra/MsCorePkg/MuVarPolicyFoundationDxe Is that something you think you could work with (renamed, of course 😉). - Bret From: Kevin D Davis<mailto:kevin.davis@...> Sent: Tuesday, February 4, 2020 3:31 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Bret Barkelew<mailto:Bret.Barkelew@...> Cc: rfc@edk2.groups.io<mailto:rfc@edk2.groups.io> Subject: [EXTERNAL] Re: [edk2-devel] [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative Bret, We like the new functionality. Our concern is our customers / we will need to modify all of the code that are consumers of EDKII_VARIABLE_LOCK_PROTOCOL to use the new protocols. If you could review that issue we would be 100% happy. Of course, that’s not always appropriate and we understand. Kevin D Davis Insyde Software On Feb 4, 2020, at 2:07 AM, Bret Barkelew via Groups.Io <bret.barkelew@...> wrote: Expanding the audience beyond the RFC list…. If no one has additional input, I’ll try to start formatting these as patches later this week. Thanks! - Bret From: Bret Barkelew<mailto:Bret.Barkelew@...> Sent: Tuesday, January 28, 2020 5:36 PM To: rfc@edk2.groups.io<mailto:rfc@edk2.groups.io> Subject: [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative All, VariablePolicy is our proposal for an expanded “VarLock-like” interface to constrain and govern platform variables. I brought this up back in May to get initial comments on the interface and implications of the interface and the approach. We implemented it in Mu over the summer and it is not our defacto variable solution. It plugs in easily to the existing variable infrastructure, but does want to control some of the things that are currently managed by VarLock. There are also some tweaks that would be needed if this were desired to be 100% optional code, but that’s no different than the current VarLock implementation which has implementation code directly tied to some of the common variable code. I’ve structured this RFC in two pieces: * The Core piece represents the minimum changes needed to implement Variable Policy and integrate it into Variable Services. It contains core driver code, central libraries and headers, and DXE driver for the protocol interface. * The Extras piece contains recommended code for a full-feature implementation including a replacement for the VarLock protocol that enables existing code to continue functioning as-is. It also contains unit and integration tests. And as a bonus, it has a Rust implementation of the core business logic for Variable Policy. The code can be found in the following two branches: https://github.com/corthon/edk2/tree/personal/brbarkel/var_policy_rfc_core<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcorthon%2Fedk2%2Ftree%2Fpersonal%2Fbrbarkel%2Fvar_policy_rfc_core&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdaa80648c1244dbfd32108d7a9ca13f4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637164558782121558&sdata=0tKS5gx17R0dsBpEXjCEK6AIh1B5R6yVyQi55BTReHo%3D&reserved=0> https://github.com/corthon/edk2/tree/personal/brbarkel/var_policy_rfc_extra<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcorthon%2Fedk2%2Ftree%2Fpersonal%2Fbrbarkel%2Fvar_policy_rfc_extra&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdaa80648c1244dbfd32108d7a9ca13f4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637164558782121558&sdata=1hlFTGKyzxbaA1BM48zRZEMt%2FyJU3%2Ft96YY0REUY5gs%3D&reserved=0> A convenient way to see all the changes in one place is to look at a comparison: https://github.com/corthon/edk2/compare/master...corthon:personal/brbarkel/var_policy_rfc_core<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcorthon%2Fedk2%2Fcompare%2Fmaster...corthon%3Apersonal%2Fbrbarkel%2Fvar_policy_rfc_core&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdaa80648c1244dbfd32108d7a9ca13f4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637164558782131553&sdata=0hIT%2FOYBtfpXg6XH97IMcNusYJxa6k8E5qAhCWZ6djA%3D&reserved=0> https://github.com/corthon/edk2/compare/personal/brbarkel/var_policy_rfc_core...corthon:personal/brbarkel/var_policy_rfc_extra<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcorthon%2Fedk2%2Fcompare%2Fpersonal%2Fbrbarkel%2Fvar_policy_rfc_core...corthon%3Apersonal%2Fbrbarkel%2Fvar_policy_rfc_extra&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdaa80648c1244dbfd32108d7a9ca13f4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637164558782141545&sdata=wqv2WuSxZBuIB2LaMCh5P4YblQQEKGRXEdg%2FjlhCBlY%3D&reserved=0> There’s additional documentation in the PPT and DOC files in the core branch: https://github.com/corthon/edk2/blob/personal/brbarkel/var_policy_rfc_core/RFC%20VariablePolicy%20Proposal%20Presentation.pptx<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcorthon%2Fedk2%2Fblob%2Fpersonal%2Fbrbarkel%2Fvar_policy_rfc_core%2FRFC%2520VariablePolicy%2520Proposal%2520Presentation.pptx&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdaa80648c1244dbfd32108d7a9ca13f4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637164558782141545&sdata=37mYO3wTQS%2BUsdQW88mi%2B5aglkqDogR5msPZwIGZdLg%3D&reserved=0> https://github.com/corthon/edk2/blob/personal/brbarkel/var_policy_rfc_core/RFC%20VariablePolicy%20Whitepaper.docx<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcorthon%2Fedk2%2Fblob%2Fpersonal%2Fbrbarkel%2Fvar_policy_rfc_core%2FRFC%2520VariablePolicy%2520Whitepaper.docx&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdaa80648c1244dbfd32108d7a9ca13f4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637164558782151542&sdata=SNug18tr6iC1VMg72mEiIPykL5LQr2aI8yGq%2B7K9tTE%3D&reserved=0> (You’d need to download those to view.) My ultimate intention for this is to submit it as a series of patches for acceptance into EDK2 as a replacement for VarLock. For now, I’m just looking for initial feedback on any broad changes that might be needed to get this into shape for more detailed code review on the devel list. Thanks! - Bret
|
|
Re: [edk2-devel] [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative
Yao, Jiewen
HI Bret
Thanks for the work. The design doc is very good. Some feedback/questions below: 1. We have 2 variable related protocol - EDKII_VARIABLE_LOCK_PROTOCOL and EDKII_VAR_CHECK_PROTOCOL. Do you want to deprecate both? Or only deprecate EDKII_VARIABLE_LOCK_PROTOCOL? 2. The Function - DumpVariablePolicy() - makes me confused in the beginning. In my thought, "Dump" means to show some debug message. But here, you want to return the policy. Can we change the name to GetVariablePolicy()? 3. The function - DisableVariablePolicy(). Does it disable current policy engine? Does it disable any future policy engine? Does it block RegisterVariablePolicy() call? 4. The function - LockVariablePolicy() - Can it lock the DisableVariablePolicy() call? 5. The use case "In MFG Mode Variable Policy Engine is disabled, thus these VPD variables can be created. These variables are locked with lock policy type LockNow, so that these variables can't be tampered with in Customer Mode." This seems a perfect potential attack point. If the attacker wants to modify a read-only variable. He or she may trigger the MFG mode, then no variable is locked. Then the attacker can update the RO variable then reset the system to normal mode. Is that threat considered? Thank you Yao Jiewen From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bret Barkelew via Groups.Io Sent: Tuesday, February 4, 2020 4:08 PM To: devel@edk2.groups.io; rfc@edk2.groups.io Subject: Re: [edk2-devel] [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative Expanding the audience beyond the RFC list.... If no one has additional input, I'll try to start formatting these as patches later this week. Thanks! - Bret From: Bret Barkelew<mailto:Bret.Barkelew@...> Sent: Tuesday, January 28, 2020 5:36 PM To: rfc@edk2.groups.io<mailto:rfc@edk2.groups.io> Subject: [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative All, VariablePolicy is our proposal for an expanded "VarLock-like" interface to constrain and govern platform variables. I brought this up back in May to get initial comments on the interface and implications of the interface and the approach. We implemented it in Mu over the summer and it is not our defacto variable solution. It plugs in easily to the existing variable infrastructure, but does want to control some of the things that are currently managed by VarLock. There are also some tweaks that would be needed if this were desired to be 100% optional code, but that's no different than the current VarLock implementation which has implementation code directly tied to some of the common variable code. I've structured this RFC in two pieces: * The Core piece represents the minimum changes needed to implement Variable Policy and integrate it into Variable Services. It contains core driver code, central libraries and headers, and DXE driver for the protocol interface. * The Extras piece contains recommended code for a full-feature implementation including a replacement for the VarLock protocol that enables existing code to continue functioning as-is. It also contains unit and integration tests. And as a bonus, it has a Rust implementation of the core business logic for Variable Policy. The code can be found in the following two branches: https://github.com/corthon/edk2/tree/personal/brbarkel/var_policy_rfc_core https://github.com/corthon/edk2/tree/personal/brbarkel/var_policy_rfc_extra A convenient way to see all the changes in one place is to look at a comparison: https://github.com/corthon/edk2/compare/master...corthon:personal/brbarkel/var_policy_rfc_core https://github.com/corthon/edk2/compare/personal/brbarkel/var_policy_rfc_core...corthon:personal/brbarkel/var_policy_rfc_extra There's additional documentation in the PPT and DOC files in the core branch: https://github.com/corthon/edk2/blob/personal/brbarkel/var_policy_rfc_core/RFC%20VariablePolicy%20Proposal%20Presentation.pptx https://github.com/corthon/edk2/blob/personal/brbarkel/var_policy_rfc_core/RFC%20VariablePolicy%20Whitepaper.docx (You'd need to download those to view.) My ultimate intention for this is to submit it as a series of patches for acceptance into EDK2 as a replacement for VarLock. For now, I'm just looking for initial feedback on any broad changes that might be needed to get this into shape for more detailed code review on the devel list. Thanks! - Bret
|
|
Re: [edk2-devel] [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative
Kevin@Insyde <kevin.davis@...>
Bret,
toggle quoted messageShow quoted text
We like the new functionality. Our concern is our customers / we will need to modify all of the code that are consumers of EDKII_VARIABLE_LOCK_PROTOCOL to use the new protocols. If you could review that issue we would be 100% happy. Of course, that’s not always appropriate and we understand. Kevin D Davis Insyde Software
On Feb 4, 2020, at 2:07 AM, Bret Barkelew via Groups.Io <bret.barkelew@...> wrote:
|
|
Re: [edk2-devel] [edk2-rfc] [RFC] code-first process for UEFI-forum specifications
Michael D Kinney
Leif,
toggle quoted messageShow quoted text
A few comments included below. Thanks, Mike
-----Original Message-----I recommend we use MarkDown. GitHub flavored MarkDown may be a good choice so an ECR can be viewed from the web view of GitHub. This also support text based patch reviews of the ECR content. I recommend using branches in the existing edk2-staging(This one may break down where we have aspecification change affecting multiplespecifications, but at that point we can track itwith multiple BZ entries)the reference repository for changes that only impact EDK II firmware components/tools. It would be good to clarify when the BZ### prefix is requiredBugzilla in the appropriate and not required and to describe a few more use cases. Here are a few. I am sure this list will be expanded when real examples are implemented. 1) New/modified interfaces require prefix. a) New structures. Only top level struct require a prefix. Fields and sub structures do not. 2) New public header file names need prefix (e.g. Bz0001MyNewProtocol.h) 3) New GUID global variables need a prefix (e.g. gBz0001MyNewProtocolGuid) 4) Adding a field, enum, or #define to existing interface require a prefix 5) Internal interfaces and implementation elements do not need a prefix. I prefer Alternative 1 to follow EDK II C Coding Standard.The tagging must follow the coding style used by eachaffected codebase.Examples:| Alternative 2)'m') go after the BZ prefix.
|
|
Re: [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative
Bret Barkelew <bret.barkelew@...>
Expanding the audience beyond the RFC list….
If no one has additional input, I’ll try to start formatting these as patches later this week. Thanks! - Bret From: Bret Barkelew<mailto:Bret.Barkelew@...> Sent: Tuesday, January 28, 2020 5:36 PM To: rfc@edk2.groups.io<mailto:rfc@edk2.groups.io> Subject: [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative All, VariablePolicy is our proposal for an expanded “VarLock-like” interface to constrain and govern platform variables. I brought this up back in May to get initial comments on the interface and implications of the interface and the approach. We implemented it in Mu over the summer and it is not our defacto variable solution. It plugs in easily to the existing variable infrastructure, but does want to control some of the things that are currently managed by VarLock. There are also some tweaks that would be needed if this were desired to be 100% optional code, but that’s no different than the current VarLock implementation which has implementation code directly tied to some of the common variable code. I’ve structured this RFC in two pieces: * The Core piece represents the minimum changes needed to implement Variable Policy and integrate it into Variable Services. It contains core driver code, central libraries and headers, and DXE driver for the protocol interface. * The Extras piece contains recommended code for a full-feature implementation including a replacement for the VarLock protocol that enables existing code to continue functioning as-is. It also contains unit and integration tests. And as a bonus, it has a Rust implementation of the core business logic for Variable Policy. The code can be found in the following two branches: https://github.com/corthon/edk2/tree/personal/brbarkel/var_policy_rfc_core https://github.com/corthon/edk2/tree/personal/brbarkel/var_policy_rfc_extra A convenient way to see all the changes in one place is to look at a comparison: https://github.com/corthon/edk2/compare/master...corthon:personal/brbarkel/var_policy_rfc_core https://github.com/corthon/edk2/compare/personal/brbarkel/var_policy_rfc_core...corthon:personal/brbarkel/var_policy_rfc_extra There’s additional documentation in the PPT and DOC files in the core branch: https://github.com/corthon/edk2/blob/personal/brbarkel/var_policy_rfc_core/RFC%20VariablePolicy%20Proposal%20Presentation.pptx https://github.com/corthon/edk2/blob/personal/brbarkel/var_policy_rfc_core/RFC%20VariablePolicy%20Whitepaper.docx (You’d need to download those to view.) My ultimate intention for this is to submit it as a series of patches for acceptance into EDK2 as a replacement for VarLock. For now, I’m just looking for initial feedback on any broad changes that might be needed to get this into shape for more detailed code review on the devel list. Thanks! - Bret
|
|
[RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative
Bret Barkelew <bret.barkelew@...>
All,
VariablePolicy is our proposal for an expanded “VarLock-like” interface to constrain and govern platform variables. I brought this up back in May to get initial comments on the interface and implications of the interface and the approach. We implemented it in Mu over the summer and it is not our defacto variable solution. It plugs in easily to the existing variable infrastructure, but does want to control some of the things that are currently managed by VarLock. There are also some tweaks that would be needed if this were desired to be 100% optional code, but that’s no different than the current VarLock implementation which has implementation code directly tied to some of the common variable code. I’ve structured this RFC in two pieces: * The Core piece represents the minimum changes needed to implement Variable Policy and integrate it into Variable Services. It contains core driver code, central libraries and headers, and DXE driver for the protocol interface. * The Extras piece contains recommended code for a full-feature implementation including a replacement for the VarLock protocol that enables existing code to continue functioning as-is. It also contains unit and integration tests. And as a bonus, it has a Rust implementation of the core business logic for Variable Policy. The code can be found in the following two branches: https://github.com/corthon/edk2/tree/personal/brbarkel/var_policy_rfc_core https://github.com/corthon/edk2/tree/personal/brbarkel/var_policy_rfc_extra A convenient way to see all the changes in one place is to look at a comparison: https://github.com/corthon/edk2/compare/master...corthon:personal/brbarkel/var_policy_rfc_core https://github.com/corthon/edk2/compare/personal/brbarkel/var_policy_rfc_core...corthon:personal/brbarkel/var_policy_rfc_extra There’s additional documentation in the PPT and DOC files in the core branch: https://github.com/corthon/edk2/blob/personal/brbarkel/var_policy_rfc_core/RFC%20VariablePolicy%20Proposal%20Presentation.pptx https://github.com/corthon/edk2/blob/personal/brbarkel/var_policy_rfc_core/RFC%20VariablePolicy%20Whitepaper.docx (You’d need to download those to view.) My ultimate intention for this is to submit it as a series of patches for acceptance into EDK2 as a replacement for VarLock. For now, I’m just looking for initial feedback on any broad changes that might be needed to get this into shape for more detailed code review on the devel list. Thanks! - Bret
|
|