<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2024-11-04T21:34:22+00:00</updated>
<entry>
<title>CryptoPkg: Increase ScratchMemory buffer for openssl 3.0.15</title>
<updated>2024-11-04T21:34:22+00:00</updated>
<author>
<name>Jorge Ramirez-Ortiz</name>
<email>jorge@foundries.io</email>
</author>
<published>2024-10-31T14:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ccbe6f5030bb0ac6a098592c3ecfbf35838e5191'/>
<id>urn:sha1:ccbe6f5030bb0ac6a098592c3ecfbf35838e5191</id>
<content type='text'>
Openssl 3.0.15 has a larger memory footprint.

Updating from EDK 2022.2 (openssl 1.1.j) to 2024.2 (openssl 3.0.15)
causes our EFI provisioning application[1] to fail due to an out of
memory condition.

On inspection, at the time of that fault, 2022.2 had an additional 900
pages. This is why this patch proposes the increase of the ScratchMemory
buffer by that same ammount.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git

Signed-off-by: Jorge Ramirez-Ortiz &lt;jorge@foundries.io&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7c342378317039e632d9a1a5d4cf7c21aec8cb7a'/>
<id>urn:sha1:7c342378317039e632d9a1a5d4cf7c21aec8cb7a</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the CryptoPkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T16:10:22+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:03:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2009f6b4c5cbd7dda95a2594288405224173d239'/>
<id>urn:sha1:2009f6b4c5cbd7dda95a2594288405224173d239</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg/BaseCryptLib: Fix potential integer overflow issue.</title>
<updated>2018-10-31T03:07:53+00:00</updated>
<author>
<name>Long Qin</name>
<email>qin.long@intel.com</email>
</author>
<published>2018-10-24T13:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=269f3b51803685eb3f4f4cd4415dc833d375efba'/>
<id>urn:sha1:269f3b51803685eb3f4f4cd4415dc833d375efba</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1275

The LookupFreeMemRegion() in RuntimeMemAllocate.c is used to look-up
free memory region for runtime resource allocation, which was designed
to support runtime authenticated variable service.
The ReqPages in this function is the required pages to be allocated,
which depends on the malloc() call in internal OpenSSL routines. The
direct offset subtractions on ReqPages may bring possible integer
overflow issue.

This patch is to add the extra parameter checks to remove this possible
overflow risk.

Cc: Ye Ting &lt;ting.ye@intel.com&gt;
Cc: Laszlo Ersek &lt;lersek@redhat.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Long Qin &lt;qin.long@intel.com&gt;
Reviewed-by: Ye Ting &lt;ting.ye@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Clean-up CRT Library Wrapper.</title>
<updated>2017-03-29T08:13:58+00:00</updated>
<author>
<name>Qin Long</name>
<email>qin.long@intel.com</email>
</author>
<published>2017-03-23T12:19:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=fc9fa685d689cad52046bc301fd1bdf7e9fd8843'/>
<id>urn:sha1:fc9fa685d689cad52046bc301fd1bdf7e9fd8843</id>
<content type='text'>
Cleaning-up CRT Library Wrapper for the third-party cryptography
library building. The changes includes
1. Rename OpenSslSupport.h to CrtLibSupport.h for future alternative
   crypto provider support.
2. Remove all un-referenced CRT APIs and headers.

(NOTE: More cleans-up could be possible after OpenSSL integrate the
      extra PR request: https://github.com/openssl/openssl/pull/2961)

Cc: Ting Ye &lt;ting.ye@intel.com&gt;
Cc: Laszlo Ersek &lt;lersek@redhat.com&gt;
Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Gary Lin &lt;glin@suse.com&gt;
Cc: Ronald Cron &lt;ronald.cron@arm.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long &lt;qin.long@intel.com&gt;
Reviewed-by: Ting Ye &lt;ting.ye@intel.com&gt;
Tested-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Tested-by: Gary Lin &lt;glin@suse.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Refine type cast for pointer subtraction</title>
<updated>2017-03-06T06:14:29+00:00</updated>
<author>
<name>Hao Wu</name>
<email>hao.a.wu@intel.com</email>
</author>
<published>2017-01-22T02:12:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6e4489d8129d233ef0fe85eeb6eebfecafe9ea6e'/>
<id>urn:sha1:6e4489d8129d233ef0fe85eeb6eebfecafe9ea6e</id>
<content type='text'>
For pointer subtraction, the result is of type "ptrdiff_t". According to
the C11 standard (Committee Draft - April 12, 2011):

"When two pointers are subtracted, both shall point to elements of the
same array object, or one past the last element of the array object; the
result is the difference of the subscripts of the two array elements. The
size of the result is implementation-defined, and its type (a signed
integer type) is ptrdiff_t defined in the &lt;stddef.h&gt; header. If the result
is not representable in an object of that type, the behavior is
undefined."

In our codes, there are cases that the pointer subtraction is not
performed by pointers to elements of the same array object. This might
lead to potential issues, since the behavior is undefined according to C11
standard.

Also, since the size of type "ptrdiff_t" is implementation-defined. Some
static code checkers may warn that the pointer subtraction might underflow
first and then being cast to a bigger size. For example:

UINT8  *Ptr1, *Ptr2;
UINTN  PtrDiff;
...
PtrDiff = (UINTN) (Ptr1 - Ptr2);

The commit will refine the pointer subtraction expressions by casting each
pointer to UINTN first and then perform the subtraction:

PtrDiff = (UINTN) Ptr1 - (UINTN) Ptr2;

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
Acked-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Qin Long &lt;qin.long@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Fix typos in comments</title>
<updated>2016-07-11T02:29:46+00:00</updated>
<author>
<name>Giri P Mudusuru</name>
<email>giri.p.mudusuru@intel.com</email>
</author>
<published>2016-07-08T06:20:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ab6cee31e7dd468f8656d7ca101bf783a0fe9b82'/>
<id>urn:sha1:ab6cee31e7dd468f8656d7ca101bf783a0fe9b82</id>
<content type='text'>
- availabe to available

Cc: Qin Long &lt;qin.long@intel.com&gt;
Cc: Ting Ye &lt;ting.ye@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru &lt;giri.p.mudusuru@intel.com&gt;
Reviewed-by: Qin Long &lt;qin.long@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: RuntimeCryptLib: support realloc(NULL, size)</title>
<updated>2016-02-25T10:04:31+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2016-02-24T20:00:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e89d672110aaf1c5a85404375ca6767b099d3b50'/>
<id>urn:sha1:e89d672110aaf1c5a85404375ca6767b099d3b50</id>
<content type='text'>
The ISO C standard says about realloc(),

  If ptr is a null pointer, the realloc function behaves like the malloc
  function for the specified size.

The realloc() implementation doesn't conform to this currently, so add a
check and call malloc() if appropriate.

Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Qin Long &lt;qin.long@intel.com&gt;
Cc: Ting Ye &lt;ting.ye@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Qin Long &lt;qin.long@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: RuntimeCryptLib: support free(NULL)</title>
<updated>2016-02-25T10:04:28+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2016-02-24T20:00:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1246dde58e8a84644ad46679b8767f8643818e31'/>
<id>urn:sha1:1246dde58e8a84644ad46679b8767f8643818e31</id>
<content type='text'>
The ISO C standard says about free(),

  If ptr is a null pointer, no action occurs.

This is not true of the RuntimeFreeMem() internal function. Therefore we
must not forward the argument of free() to RuntimeFreeMem() without
checking.

Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Qin Long &lt;qin.long@intel.com&gt;
Cc: Ting Ye &lt;ting.ye@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Qin Long &lt;qin.long@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg/BaseCryptLib: make mVirtualAddressChangeEvent STATIC</title>
<updated>2015-12-07T09:20:20+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ard.biesheuvel@linaro.org</email>
</author>
<published>2015-12-07T09:20:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e01f529efccd8c85bbb4f2d7d66470c3a281e57d'/>
<id>urn:sha1:e01f529efccd8c85bbb4f2d7d66470c3a281e57d</id>
<content type='text'>
Make mVirtualAddressChangeEvent STATIC to prevent it from conflicting
with other variables of the same name that may be defined in other
libraries (e.g., MdeModulePkg/Universal/Variable/RuntimeDxe)
This also removes the risk of mVirtualAddressChangeEvent being merged with
other uninitialized variables with external linkage by toolchains that perform
COMMON allocation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Reviewed-by: Qin Long &lt;qin.long@intel.com&gt;

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19146 6f19259b-4bc3-4df7-8a09-765794883524
</content>
</entry>
</feed>
