From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [Patch v9 0/2] Disable safe string constraint assertions
Date: Wed, 20 May 2020 20:13:01 +0000 [thread overview]
Message-ID: <MN2PR11MB446130887C3D8967E599CAFCD2B60@MN2PR11MB4461.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200520201022.28196-1-michael.d.kinney@intel.com>
PR for V9 with all checks passing:
https://github.com/tianocore/edk2/pull/636
Mike
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On
> Behalf Of Michael D Kinney
> Sent: Wednesday, May 20, 2020 1:10 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [Patch v9 0/2] Disable safe
> string constraint assertions
>
> REF:
> https://bugzilla.tianocore.org/show_bug.cgi?id=2054
>
> V9 Update unit test comment and use zero buffers to
> verify more behavior.
> V8 Add DEBUG_VERBOSE message and unit test.
> V7 addressed review comments (only documentation
> changes).
>
> Current implementation of SafeString does not let one
> parse untrusted
> data with its interfaces as they ASSERT on failing
> runtime checks and
> require one to effectively reimplement the function on
> the caller side.
>
> All the former proposals made it clear that the
> attempts to introduce
> a solution preserving this behavior require a lot of
> changes
> throughout the codebase including platform code (e.g.
> introducing
> constraint assertions and updating all DebugLib
> implementations)
> or require all sorts of hacks.
>
> Since the original code has roughly no benefit except
> in some very
> special cases and the effort required to preserve it is
> very high,
> I propose to remove it as agreed on with several other
> parties.
>
> Please note, that this patch does not change the
> behaviour of the
> functions in RELEASE builds. I.e. they will still check
> for NULL
> and return RETURN_INVALID_PARAMETER. In the future we
> may (or may
> not) want them to simply ASSERT in this case.
> Regardless this should
> be done in a separate BZ entry and a separate commit.
> For this reason
> I ask everyone not to touch this subject.
>
> Due to the amount of discussion this has already
> undergone after
> almost a year I kindly request everyone to reduce the
> communication
> to the minimum and abstain from proposing another
> approach.
>
> Requesting to merge this into edk2-stable202005.
>
> Cc: Andrew Fish afish@apple.com
> Cc: Ard Biesheuvel ard.biesheuvel@linaro.org
> Cc: Bret Barkelew bret.barkelew@microsoft.com
> Cc: Brian J. Johnson brian.johnson@hpe.com
> Cc: Chasel Chiu chasel.chiu@intel.com
> Cc: Jordan Justen jordan.l.justen@intel.com
> Cc: Laszlo Ersek lersek@redhat.com
> Cc: Leif Lindholm leif@nuviainc.com
> Cc: Liming Gao liming.gao@intel.com
> Cc: Marvin Häuser mhaeuser@outlook.de
> Cc: Michael D Kinney michael.d.kinney@intel.com
> Cc: Vincent Zimmer vincent.zimmer@intel.com
> Cc: Zhichao Gao zhichao.gao@intel.com
> Cc: Jiewen Yao jiewen.yao@intel.com
> Signed-off-by: Vitaly Cheptsov vit9696@protonmail.com
>
> Michael D Kinney (1):
> MdePkg/Test/BaseLib: Add SAFE_STRING_CONSTRAINT_CHECK
> unit test
>
> Vitaly Cheptsov (1):
> MdePkg: Fix SafeString performing assertions on
> runtime checks
>
> MdePkg/Include/Library/BaseLib.h | 111 --
> ---------------
> MdePkg/Library/BaseLib/SafeString.c | 115 +-
> ----------------
> .../UnitTest/Library/BaseLib/Base64UnitTest.c | 107
> ++++++++++++++++
> 3 files changed, 110 insertions(+), 223 deletions(-)
>
> --
> 2.21.0.windows.1
>
>
>
prev parent reply other threads:[~2020-05-20 20:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 20:10 [Patch v9 0/2] Disable safe string constraint assertions Michael D Kinney
2020-05-20 20:10 ` [Patch v9 1/2] MdePkg: Fix SafeString performing assertions on runtime checks Michael D Kinney
2020-05-20 20:10 ` [Patch v9 2/2] MdePkg/Test/BaseLib: Add SAFE_STRING_CONSTRAINT_CHECK unit test Michael D Kinney
2020-05-21 4:24 ` Vitaly Cheptsov
2020-05-21 4:25 ` Vitaly Cheptsov
2020-05-21 14:13 ` [edk2-devel] " Liming Gao
2020-05-20 20:13 ` Michael D Kinney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MN2PR11MB446130887C3D8967E599CAFCD2B60@MN2PR11MB4461.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox