<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/CryptoPkg/Library/BaseCryptLib/Hash/CryptParallelHash.h, 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>2026-02-23T21:01:28+00:00</updated>
<entry>
<title>CryptoPkg: Replace include guards with #pragma once</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T17:33:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0f42cae11c06187ef72f34cfabdca200346ef660'/>
<id>urn:sha1:0f42cae11c06187ef72f34cfabdca200346ef660</id>
<content type='text'>
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.

`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.

Does not include updates to OpenSSL generated header files checked
into the repo. Those in `CryptoPkg\Library\OpensslLib\OpensslGen\`.

Compared to macro-based include guards, `#pragma once`:

- Eliminates the risk of macro name collisions or copy/paste errors
  where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
  (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
  file entirely, rather than re-reading it to find the matching
  `#endif` ("multiple-include optimization").
  - Note that some compilers may already optimize traditional include
    guards, by recognzining the idiomatic pattern.

This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.

However, this is considered acceptable given:

1. edk2 already defines a subset of supported compilers in
   BaseTools/Conf/tools_def.template, all of which have supported
   `#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
   include guard naming and potential macro collisions.

Approximate compiler support dates:

- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
  (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Resolve CodeQL Errors</title>
<updated>2025-04-21T02:14:50+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2025-04-18T20:51:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2e85d12685b950dc8ff54130f9d623a120f852d6'/>
<id>urn:sha1:2e85d12685b950dc8ff54130f9d623a120f852d6</id>
<content type='text'>
This patch updates several CodeQL errors for potential null pointer
access and unguarded header conclusion across production and test
code that have been flagged in the build/security tab in GitHub.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg/BaseCryptLib: add next parameter to SHA3_squeeze</title>
<updated>2024-12-06T08:01:25+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2024-09-09T21:26:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9895fe25ac9579cfd85327c7b6d8ee271539c0e5'/>
<id>urn:sha1:9895fe25ac9579cfd85327c7b6d8ee271539c0e5</id>
<content type='text'>
Needed for openssl 3.3.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>CryptPkg: Enable CryptoPkg BaseCryptLib ParallelHash for PEI and DXE</title>
<updated>2022-12-02T14:12:51+00:00</updated>
<author>
<name>Zhihao Li</name>
<email>zhihao.li@intel.com</email>
</author>
<published>2022-11-30T14:21:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5d5be45bd11117c1e479863125e7d772e54772c9'/>
<id>urn:sha1:5d5be45bd11117c1e479863125e7d772e54772c9</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4097

The BaseCryptLib in the CryptoPkg currently supports ParallelHash
algorithm for SMM. The MP Services PPI and MP Services Protocol
could be used to enable ParallelHash in PEI and DXE
versions of the BaseCryptLib.

Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Signed-off-by: Zhihao Li &lt;zhihao.li@intel.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg? Redefinition bug in CrtLibSupport.h.</title>
<updated>2022-03-26T10:40:04+00:00</updated>
<author>
<name>Li, Zhihao</name>
<email>zhihao.li@intel.com</email>
</author>
<published>2022-03-25T07:40:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=355515a06a609327794070a91efe26a45a2e3325'/>
<id>urn:sha1:355515a06a609327794070a91efe26a45a2e3325</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3885

Parallel hash patch redefines uint_64 type in CrtLibSupport.h
which has been defined in openssl/include/openssl/e_os2.h.
CryptMd5.c including e_os2.h cause redefinition bug.

Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Xiaoyu Lu &lt;xiaoyu1.lu@intel.com&gt;
Cc: Guomin Jiang &lt;guomin.jiang@intel.com&gt;
Cc: Siyuan Fu &lt;siyuan.fu@intel.com&gt;

Signed-off-by: Zhihao Li &lt;zhihao.li@intel.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Add new hash algorithm ParallelHash256HashAll in BaseCryptLib.</title>
<updated>2022-03-18T06:49:18+00:00</updated>
<author>
<name>Zhihao Li</name>
<email>zhihao.li@intel.com</email>
</author>
<published>2022-03-18T04:22:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c1e662101addbfd983026f06d119da2d470865a1'/>
<id>urn:sha1:c1e662101addbfd983026f06d119da2d470865a1</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3596

Parallel hash function ParallelHash256HashAll, as defined in NIST's
Special Publication 800-185, published December 2016. It utilizes
multi-process to calculate the digest.

Passed CI test.
Onprotocol version code passed test.

Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Xiaoyu Lu &lt;xiaoyu1.lu@intel.com&gt;
Cc: Guomin Jiang &lt;guomin.jiang@intel.com&gt;
Cc: Siyuan Fu &lt;siyuan.fu@intel.com&gt;

Signed-off-by: Zhihao Li &lt;zhihao.li@intel.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
</content>
</entry>
</feed>
