Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024-11-12, Version 18.20.5 'Hydrogen' (LTS) #55768

Merged
merged 76 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
c2e6a8f
benchmark: fix napi/ref addon
targos Jun 2, 2024
0092358
http: handle multi-value content-disposition header
ArsalanDotMe Dec 11, 2023
9f521f4
test: update tests for OpenSSL 3.0.14
richardlau Jun 10, 2024
627d399
test: fix unreliable assumption in js-native-api/test_cannot_run_js
joyeecheung Mar 1, 2024
6615fe5
src: fix dynamically linked OpenSSL version
richardlau Jun 14, 2024
fc43c68
test: update TLS tests for OpenSSL 3.2
richardlau Jun 9, 2024
cc3cdf7
test: check against run-time OpenSSL version
richardlau Jun 14, 2024
1320fb9
test: update TLS trace tests for OpenSSL >= 3.2
richardlau Jun 2, 2024
e9e3306
test: use assert.{s,deepS}trictEqual()
sonsurim Aug 4, 2024
a1f0c87
test: fix test-tls-client-auth test for OpenSSL32
mhdawson Aug 28, 2024
5316314
test: update TLS test for OpenSSL 3.2
richardlau Aug 30, 2024
d5b73e5
test: increase key size for ca2-cert.pem
mhdawson Aug 29, 2024
68156cb
test: fix test-tls-client-mindhsize for OpenSSL32
mhdawson Sep 3, 2024
c7de027
test: fix test test-tls-dhe for OpenSSL32
mhdawson Sep 14, 2024
e999738
test: adjust tls test for OpenSSL32
mhdawson Sep 14, 2024
b097d85
test: adjust test-tls-junk-server for OpenSSL32
mhdawson Sep 15, 2024
d244204
crypto: reject Ed25519/Ed448 in Sign/Verify prototypes
panva Apr 8, 2024
6e7274f
crypto: reject dh,x25519,x448 in {Sign,Verify}Final
JLHwung Sep 6, 2024
75ff0cd
test: update test to support OpenSSL32
mhdawson Sep 18, 2024
37a2f7e
test: adjust key sizes to support OpenSSL32
mhdawson Sep 18, 2024
341496a
test: add asserts to validate test assumptions
mhdawson Sep 18, 2024
1a4d497
test: adjust tls-set-ciphers for OpenSSL32
mhdawson Sep 21, 2024
9824827
test: update tls test to support OpenSSL32
mhdawson Sep 22, 2024
c8520ff
test: fix OpenSSL version checks
richardlau Jun 26, 2024
ac3a390
test: fix test-tls-junk-closes-server
mhdawson Sep 25, 2024
d814fe9
src: account for OpenSSL unexpected version
codebytere Jul 31, 2024
a4f6f09
doc: add names next to release key bash commands
avivkeller May 9, 2024
1c4decc
doc: add release key for aduh95
aduh95 Oct 10, 2024
fa72b2c
tools: skip ruff on tools/gyp
targos Oct 25, 2023
0fb652e
tools: update gyp-next to v0.16.1
targos Oct 25, 2023
6ba4ebd
build: fix build with Python 3.12
lpinca Nov 8, 2023
c679348
errors: use `determineSpecificType` in more error messages
aduh95 Sep 11, 2023
84b0ead
esm: fix hook name in error message
bmacnaughton Dec 5, 2023
81c3260
deps: update corepack to 0.28.1
nodejs-github-bot May 14, 2024
6ba8bc0
deps: update c-ares to 1.29.0
nodejs-github-bot Jun 2, 2024
d6114cb
test: fix test when compiled without engine support
richardlau Jun 2, 2024
5c46782
crypto: make deriveBits length parameter optional and nullable
panva Jun 28, 2024
395ee44
deps: update corepack to 0.28.2
nodejs-github-bot Jun 4, 2024
dbdfdd0
deps: update corepack to 0.29.2
nodejs-github-bot Jul 16, 2024
935a506
deps: update corepack to 0.29.3
nodejs-github-bot Jul 30, 2024
4d2ac5d
doc: move release key for Myles Borins
richardlau Aug 5, 2024
c60c663
deps: upgrade openssl sources to quictls/openssl-3.0.14+quic1
nodejs-github-bot Aug 12, 2024
67e9883
deps: update archs files for openssl-3.0.14+quic1
nodejs-github-bot Aug 12, 2024
4a18581
deps: update corepack to 0.29.4
nodejs-github-bot Sep 17, 2024
c50f013
crypto: ensure invalid SubtleCrypto JWK data import results in DataError
panva Sep 23, 2024
46c7824
deps: upgrade openssl sources to quictls/openssl-3.0.15+quic1
nodejs-github-bot Sep 30, 2024
fce3ab6
deps: update archs files for openssl-3.0.15+quic1
nodejs-github-bot Sep 30, 2024
ac37e55
esm: mark import attributes and JSON module as stable
nicolo-ribaudo Oct 12, 2024
f56cfe7
deps: update acorn to 8.12.1
nodejs-github-bot Jun 16, 2024
50a9456
deps: update acorn-walk to 8.3.3
nodejs-github-bot Jun 18, 2024
55b3c8a
deps: update acorn-walk to 8.3.4
nodejs-github-bot Sep 24, 2024
d577321
deps: update acorn to 8.13.0
nodejs-github-bot Oct 29, 2024
aaa857f
deps: update ada to 2.8.0
nodejs-github-bot Jun 4, 2024
033f1e2
deps: update zlib to 1.3.0.1-motley-4f653ff
nodejs-github-bot May 21, 2024
569a739
deps: update zlib to 1.3.0.1-motley-209717d
nodejs-github-bot Jun 13, 2024
637a306
deps: update zlib to 1.3.0.1-motley-887bb57
nodejs-github-bot Jun 16, 2024
e151ebe
deps: update zlib to 1.3.0.1-motley-e432200
nodejs-github-bot Jun 23, 2024
f6b2f68
deps: update zlib to 1.3.0.1-motley-8b7eff8
nodejs-github-bot Jun 30, 2024
4b81555
deps: update zlib to 1.3.0.1-motley-68e57e6
nodejs-github-bot Jul 7, 2024
64f98a9
deps: update zlib to 1.3.0.1-motley-c2469fd
nodejs-github-bot Jul 14, 2024
11242bc
deps: update zlib to 1.3.0.1-motley-71660e1
nodejs-github-bot Aug 4, 2024
96ec48d
deps: update brotli to 1.1.0
nodejs-github-bot Dec 27, 2023
a1ae050
deps: update simdutf to 5.2.6
nodejs-github-bot Apr 28, 2024
c952fd8
deps: update simdutf to 5.2.8
nodejs-github-bot May 12, 2024
5fb8e1b
deps: update simdutf to 5.3.0
nodejs-github-bot Jul 16, 2024
dd882ac
deps: update simdutf to 5.3.1
nodejs-github-bot Aug 6, 2024
52d2c03
deps: update simdutf to 5.3.4
nodejs-github-bot Aug 13, 2024
3597be4
deps: update simdutf to 5.5.0
nodejs-github-bot Aug 18, 2024
0385249
deps: update simdutf to 5.6.0
nodejs-github-bot Oct 15, 2024
fd9933e
deps: upgrade npm to 10.8.0
npm-cli-bot May 16, 2024
8531c95
deps: upgrade npm to 10.8.1
npm-cli-bot May 30, 2024
93670de
deps: upgrade npm to 10.8.2
npm-cli-bot Jul 12, 2024
4c2e07a
build: pin doc workflow to Node.js 20
richardlau Nov 6, 2024
e4739e9
doc: only apply content-visibility on all.html
panva Jun 19, 2024
3059262
esm: fix broken assertion in `legacyMainResolve`
aduh95 Nov 3, 2024
f73db8f
2024-11-12, Version 18.20.5 'Hydrogen' (LTS)
aduh95 Nov 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: update zlib to 1.3.0.1-motley-c2469fd
PR-URL: #53464
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
nodejs-github-bot authored and aduh95 committed Nov 3, 2024
commit 64f98a98690406899cdc96ed6ee9e8efa9f1a87f
26 changes: 26 additions & 0 deletions deps/zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ check_include_file(stddef.h HAVE_STDDEF_H)
option(ENABLE_SIMD_OPTIMIZATIONS "Enable all SIMD optimizations" OFF)
option(ENABLE_SIMD_AVX512 "Enable SIMD AXV512 optimizations" OFF)
option(USE_ZLIB_RABIN_KARP_HASH "Enable bitstream compatibility with canonical zlib" OFF)
option(ENABLE_INTEL_QAT_COMPRESSION "Enable Intel Quick Assist Technology use for compression" OFF)
option(BUILD_UNITTESTS "Enable standalone unit tests build" OFF)
option(BUILD_MINIZIP_BIN "Enable building minzip_bin tool" OFF)
option(BUILD_ZPIPE "Enable building zpipe tool" OFF)
Expand Down Expand Up @@ -228,6 +229,22 @@ if (ENABLE_SIMD_OPTIMIZATIONS)
endif()
endif()

if (ENABLE_INTEL_QAT_COMPRESSION)
list(APPEND ZLIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/qat/deflate_qat.cpp)
list(APPEND ZLIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/qat/qatzpp/io_buffers.cpp)
list(APPEND ZLIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/qat/qatzpp/memory.cpp)
list(APPEND ZLIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/qat/qatzpp/qat_buffer_list.cpp)
list(APPEND ZLIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/qat/qatzpp/qat.cpp)
list(APPEND ZLIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/qat/qatzpp/qat_instance.cpp)
list(APPEND ZLIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/qat/qatzpp/session.cpp)
list(APPEND ZLIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/qat/qatzpp/qat_task.cpp)

# TODO(gustavoa): Find a way to include the qatzpp headers without having the
# presubmit check throw errors.
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/contrib/qat/qatzpp)
add_compile_definitions(QAT_COMPRESSION_ENABLED)
endif()

# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
Expand All @@ -254,6 +271,15 @@ add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HD
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
set_target_properties(zlib PROPERTIES SOVERSION 1)

if (ENABLE_INTEL_QAT_COMPRESSION)
target_include_directories(zlib PUBLIC ${QATZPP_INCLUDE_DIRS})
target_link_libraries(zlib ${QATZPP_LIBRARY})
target_link_libraries(zlib qat)
target_include_directories(zlibstatic PUBLIC ${QATZPP_INCLUDE_DIRS})
target_link_libraries(zlibstatic ${QATZPP_LIBRARY})
target_link_libraries(zlibstatic qat)
endif()

if(NOT CYGWIN)
# This property causes shared libraries on Linux to have the full version
# encoded into their final filename. We disable this on Cygwin because
Expand Down
312 changes: 312 additions & 0 deletions deps/zlib/contrib/qat/deflate_qat.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,312 @@
/*
* Copyright (C) 2024 Intel Corporation. All rights reserved.
* Authors:
* Gustavo A Espinoza <gustavo.adolfo.espinoza.quintero@intel.com>
* <gustavoaespinozaq@hotmail.com>
*
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include "deflate_qat.h"
#include "deflate.h"

#include "session.hpp"
#include "qat_instance.hpp"
#include "qat_buffer_list.hpp"
#include "qat.hpp"

#include <memory>

/*
* TODO(gustavoa): Make the input size adjustable from the memlevel
* attribute on deflateInit.
*/
static constexpr size_t kInputSize = 1024 * 1024;

/* QAT Instances obtained available from the library. */
static std::vector<std::shared_ptr<qat::Instance>> qat_instances;

/*
* TODO(gustavoa): Verify if the ordering of the struct fields won't create
* unnecessary holes in the structure that requires extraneous padding.
*/
struct qat_deflate {
std::unique_ptr<qat::DeflateSession> qat_session;

/* QAT requires contiguous physical pages. Cannot be allocated using
* malloc/new.
*/
uint8_t *input_buffer;
uint8_t *output_buffer;

/* Pointer to the next byte in the output buffer. */
uint8_t *pending_out;

unsigned input_buffer_size;
unsigned output_buffer_size;

unsigned pending_in_count;
unsigned pending_out_count;
};

static std::unique_ptr<qat::DeflateSession> qat_create_session(int level, int wrap)
{
CpaDcChecksum checksum = CPA_DC_NONE;

switch(wrap) {
case 1:
checksum = CPA_DC_ADLER32;
break;
case 2:
checksum = CPA_DC_CRC32;
break;
}

return std::make_unique<qat::DeflateSession>(
qat_instances[0],
(CpaDcCompLvl)level,
checksum,
0
);
}


int qat_deflate_init()
{
return (qat::Initialize()) ? Z_ERRNO : Z_OK;
}

struct qat_deflate* qat_deflate_state_init(int level, int wrap)
{
if (qat_instances.empty()) {
qat_instances = qat::Instance::Create();
}
if (qat_instances.empty()) {
return nullptr;
}

struct qat_deflate *qat_deflate = new struct qat_deflate;
if (!qat_deflate) {
return nullptr;
}

/* TODO(gustavoa): Find a way to utilize all the available instances for the same
* process.
*/
qat_instances[0]->Start();

qat_deflate->qat_session = qat_create_session(level, wrap);

qat_deflate->input_buffer_size = kInputSize;
qat_deflate->input_buffer = qat::AllocBlockArray<uint8_t>(kInputSize, 0);
qat_deflate->output_buffer_size =
qat_deflate->qat_session->GetDeflateBound(qat_deflate->input_buffer_size);
qat_deflate->pending_out = qat_deflate->output_buffer =
qat::AllocBlockArray<uint8_t>(qat_deflate->output_buffer_size, 0);

qat_deflate->pending_in_count = qat_deflate->pending_out_count = 0;

if (!qat_deflate->input_buffer || !qat_deflate->output_buffer) {
return nullptr;
}

return qat_deflate;
}

static unsigned qat_read_buf(z_streamp strm, struct qat_deflate* qat, unsigned size)
{
unsigned len = strm->avail_in;

if (len > size) {
len = size;
}
if (len == 0) return 0;

strm->avail_in -= len;
strm->total_in += len;

zmemcpy(
qat->input_buffer + qat->pending_in_count,
strm->next_in,
len
);

strm->next_in += len;
qat->pending_in_count += len;

return len;
}

void qat_flush_pending(deflate_state* s)
{
unsigned len;
z_streamp strm = s->strm;
struct qat_deflate* qat = s->qat_s;

len = qat->pending_out_count;
if (len > strm->avail_out) len = strm->avail_out;
if (len == 0) return;

zmemcpy(strm->next_out, qat->pending_out, len);

qat->pending_out += len;
qat->pending_out_count -= len;
strm->next_out += len;
strm->avail_out -= len;
strm->total_out += len;
if (qat->pending_out_count == 0) {
qat->pending_out = qat->output_buffer;
}
}

static int qat_compress_pending(deflate_state*s, int flush)
{
struct qat_deflate* qat = s->qat_s;
uint32_t metadata_size;

/* TODO(gustavoa): find a way to make qatzpp setup this number internally. */
cpaDcBufferListGetMetaSize(qat->qat_session->getInstance()->GetHandle(), 1, &metadata_size);

auto job = qat->qat_session->Deflate(
std::make_unique<qat::IOBuffers>(
std::make_unique<qat::BufferListUser>(
qat->input_buffer,
qat->pending_in_count,
metadata_size
),
std::make_unique<qat::BufferListUser>(
qat->output_buffer,
qat->output_buffer_size,
metadata_size
)
), (flush == Z_FINISH && s->strm->avail_in == 0)
);

job->WaitCompletion();

/*
* TODO(gustavoa): make QAT perform the checksum combine.
*/
if (s->wrap == 2) {
s->strm->adler = crc32_combine(
s->strm->adler,
job->GetResults()->checksum,
job->GetResults()->consumed
);
} else if (s->wrap == 1) {
s->strm->adler = adler32(
s->strm->adler,
qat->input_buffer,
job->GetResults()->consumed
);
}

qat->pending_out_count = job->GetResults()->produced;
qat->pending_in_count -= job->GetResults()->consumed;

if(qat->pending_in_count != 0) {
/* Copy any remaining bytes to the beginning of the buffer. */
zmemcpy(
qat->input_buffer,
qat->input_buffer + job->GetResults()->consumed,
qat->pending_in_count
);
}

return 0;
}

qat_block_state qat_deflate_step(deflate_state* s, int flush)
{
z_streamp strm = s->strm;
struct qat_deflate* qat_state = s->qat_s;

for (;;) {
if (qat_state->pending_in_count < qat_state->input_buffer_size) {
qat_read_buf(
strm,
qat_state,
qat_state->input_buffer_size - qat_state->pending_in_count
);
if (qat_state->pending_in_count < qat_state->input_buffer_size && flush == Z_NO_FLUSH) {
return qat_block_need_more;
} else {
qat_compress_pending(s, flush);
}
if (strm->avail_in == 0) {
break;
}
} else {
qat_compress_pending(s, flush);
}

qat_flush_pending(s);
if (strm->avail_out == 0) {
return (flush == Z_FINISH) ? qat_block_finish_started : qat_block_need_more;
}
}

if (flush == Z_FINISH) {
qat_flush_pending(s);
if (strm->avail_out == 0) {
return qat_block_finish_started;
} else {
return qat_block_finish_done;
}
}

qat_flush_pending(s);
if (strm->avail_out == 0) {
return qat_block_done;
}

return qat_block_need_more;
}

int qat_deflate_state_free(deflate_state* s)
{
struct qat_deflate* qat_state = s->qat_s;
if (qat_state->input_buffer) {
qat::Free(qat_state->input_buffer);
}
if (qat_state->output_buffer) {
qat::Free(qat_state->output_buffer);
}

qat_state->qat_session.reset();
delete qat_state;
s->qat_s = nullptr;

return Z_OK;
}

struct qat_deflate *qat_deflate_copy(deflate_state *ss)
{
struct qat_deflate *sqat = ss->qat_s;
struct qat_deflate *dqat = nullptr;

if (!sqat) {
return nullptr;
}

dqat = new struct qat_deflate;

dqat->qat_session = qat_create_session(ss->level, ss->wrap);

dqat->input_buffer_size = sqat->input_buffer_size;
dqat->input_buffer = qat::AllocBlockArray<uint8_t>(dqat->input_buffer_size, 0);

dqat->output_buffer_size = sqat->output_buffer_size;
dqat->output_buffer = qat::AllocBlockArray<uint8_t>(dqat->output_buffer_size, 0);

dqat->pending_in_count = sqat->pending_in_count;
dqat->pending_out_count = sqat->pending_out_count;

dqat->pending_out =
dqat->output_buffer + (sqat->pending_out - sqat->output_buffer);

zmemcpy(dqat->input_buffer, sqat->input_buffer, dqat->input_buffer_size);
zmemcpy(dqat->output_buffer, sqat->output_buffer, dqat->output_buffer_size);

return dqat;
}

Loading