3.26.0-1 - Valgrind 3.26.0 final
Resolves: #RHEL-120966 Rebase valgrind to 3.26.0 [rhel-10]
This commit is contained in:
parent
7a72b4bbde
commit
ef06a91e52
1
.gitignore
vendored
1
.gitignore
vendored
@ -55,3 +55,4 @@
|
||||
/valgrind-3.24.0.tar.bz2
|
||||
/valgrind-3.25.0.tar.bz2
|
||||
/valgrind-3.25.1.tar.bz2
|
||||
/valgrind-3.26.0.tar.bz2
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
From 2e92839f77ad5b1e2db95887185eca3b4e70a4d5 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Wielaard <mark@klomp.org>
|
||||
Date: Tue, 5 Aug 2025 22:05:30 +0200
|
||||
Subject: [PATCH 1/2] Prepare NEWS for branch 3.25.x fixes
|
||||
|
||||
---
|
||||
NEWS | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 741329a68170..5043e7008bf0 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -1,3 +1,15 @@
|
||||
+Branch 3.25.x
|
||||
+~~~~~~~~~~~~~
|
||||
+
|
||||
+* ==================== FIXED BUGS ====================
|
||||
+
|
||||
+The following bugs have been fixed or resolved on this branch.
|
||||
+
|
||||
+To see details of a given bug, visit
|
||||
+ https://bugs.kde.org/show_bug.cgi?id=XXXXXX
|
||||
+where XXXXXX is the bug number as listed above.
|
||||
+
|
||||
+
|
||||
Release 3.25.1 (20 May 2025)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -1,539 +0,0 @@
|
||||
From 2ad8efa8f31c7e8733e430dad4f93541797d6792 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Arnez <arnez@linux.ibm.com>
|
||||
Date: Wed, 25 Jun 2025 16:35:04 +0200
|
||||
Subject: [PATCH 2/2] Bug 503241 - s390x: Support z17 changes to the NNPA
|
||||
instruction
|
||||
|
||||
This adds support for the NNPA enhancements that are implemented with z17.
|
||||
|
||||
(cherry picked from commit 24b634e8ce04de70d4aa6c61a12149df223f9c68)
|
||||
---
|
||||
NEWS | 2 +
|
||||
coregrind/m_extension/extension-s390x.c | 346 ++++++++++++++----------
|
||||
2 files changed, 209 insertions(+), 139 deletions(-)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 5043e7008bf0..4e6e6c6d2387 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -5,6 +5,8 @@ Branch 3.25.x
|
||||
|
||||
The following bugs have been fixed or resolved on this branch.
|
||||
|
||||
+503241 s390x: Support z17 changes to the NNPA instruction
|
||||
+
|
||||
To see details of a given bug, visit
|
||||
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
|
||||
where XXXXXX is the bug number as listed above.
|
||||
diff --git a/coregrind/m_extension/extension-s390x.c b/coregrind/m_extension/extension-s390x.c
|
||||
index 85b99ad08687..98b825d9b5d2 100644
|
||||
--- a/coregrind/m_extension/extension-s390x.c
|
||||
+++ b/coregrind/m_extension/extension-s390x.c
|
||||
@@ -301,11 +301,17 @@ typedef enum {
|
||||
S390_NNPA_MAX = 0x15,
|
||||
S390_NNPA_LOG = 0x20,
|
||||
S390_NNPA_EXP = 0x21,
|
||||
+ S390_NNPA_SQRT = 0x22,
|
||||
+ S390_NNPA_INVSQRT = 0x23,
|
||||
S390_NNPA_RELU = 0x31,
|
||||
S390_NNPA_TANH = 0x32,
|
||||
S390_NNPA_SIGMOID = 0x33,
|
||||
S390_NNPA_SOFTMAX = 0x34,
|
||||
+ S390_NNPA_GELU = 0x35,
|
||||
S390_NNPA_BATCHNORM = 0x40,
|
||||
+ S390_NNPA_MOMENTS = 0x41,
|
||||
+ S390_NNPA_LAYERNORM = 0x42,
|
||||
+ S390_NNPA_NORM = 0x43,
|
||||
S390_NNPA_MAXPOOL2D = 0x50,
|
||||
S390_NNPA_AVGPOOL2D = 0x51,
|
||||
S390_NNPA_LSTMACT = 0x60,
|
||||
@@ -313,6 +319,9 @@ typedef enum {
|
||||
S390_NNPA_CONVOLUTION = 0x70,
|
||||
S390_NNPA_MATMUL_OP = 0x71,
|
||||
S390_NNPA_MATMUL_OP_BCAST23 = 0x72,
|
||||
+ S390_NNPA_MATMUL_OP_BCAST1 = 0x73,
|
||||
+ S390_NNPA_TRANSFORM = 0xf0,
|
||||
+ S390_NNPA_REDUCE = 0xf1,
|
||||
} s390_nnpa_function_t;
|
||||
|
||||
/* Suported NNPA functions */
|
||||
@@ -321,30 +330,51 @@ static const ULong NNPA_functions[] = {
|
||||
S390_SETBIT(S390_NNPA_SUB) | S390_SETBIT(S390_NNPA_MUL) |
|
||||
S390_SETBIT(S390_NNPA_DIV) | S390_SETBIT(S390_NNPA_MIN) |
|
||||
S390_SETBIT(S390_NNPA_MAX) | S390_SETBIT(S390_NNPA_LOG) |
|
||||
- S390_SETBIT(S390_NNPA_EXP) | S390_SETBIT(S390_NNPA_RELU) |
|
||||
+ S390_SETBIT(S390_NNPA_EXP) | S390_SETBIT(S390_NNPA_SQRT) |
|
||||
+ S390_SETBIT(S390_NNPA_INVSQRT) | S390_SETBIT(S390_NNPA_RELU) |
|
||||
S390_SETBIT(S390_NNPA_TANH) | S390_SETBIT(S390_NNPA_SIGMOID) |
|
||||
- S390_SETBIT(S390_NNPA_SOFTMAX)),
|
||||
- (S390_SETBIT(S390_NNPA_BATCHNORM) | S390_SETBIT(S390_NNPA_MAXPOOL2D) |
|
||||
- S390_SETBIT(S390_NNPA_AVGPOOL2D) | S390_SETBIT(S390_NNPA_LSTMACT) |
|
||||
- S390_SETBIT(S390_NNPA_GRUACT) | S390_SETBIT(S390_NNPA_CONVOLUTION) |
|
||||
- S390_SETBIT(S390_NNPA_MATMUL_OP) |
|
||||
- S390_SETBIT(S390_NNPA_MATMUL_OP_BCAST23)),
|
||||
+ S390_SETBIT(S390_NNPA_SOFTMAX) | S390_SETBIT(S390_NNPA_GELU)),
|
||||
+ (S390_SETBIT(S390_NNPA_BATCHNORM) | S390_SETBIT(S390_NNPA_MOMENTS) |
|
||||
+ S390_SETBIT(S390_NNPA_LAYERNORM) | S390_SETBIT(S390_NNPA_NORM) |
|
||||
+ S390_SETBIT(S390_NNPA_MAXPOOL2D) | S390_SETBIT(S390_NNPA_AVGPOOL2D) |
|
||||
+ S390_SETBIT(S390_NNPA_LSTMACT) | S390_SETBIT(S390_NNPA_GRUACT) |
|
||||
+ S390_SETBIT(S390_NNPA_CONVOLUTION) | S390_SETBIT(S390_NNPA_MATMUL_OP) |
|
||||
+ S390_SETBIT(S390_NNPA_MATMUL_OP_BCAST23) |
|
||||
+ S390_SETBIT(S390_NNPA_MATMUL_OP_BCAST1)),
|
||||
+ 0,
|
||||
+ (S390_SETBIT(S390_NNPA_TRANSFORM) | S390_SETBIT(S390_NNPA_REDUCE)),
|
||||
};
|
||||
|
||||
/* Supported parameter block formats */
|
||||
static const ULong NNPA_ipbf[] = {
|
||||
- (S390_SETBIT(0)),
|
||||
+ (S390_SETBIT(0) | S390_SETBIT(1)),
|
||||
};
|
||||
|
||||
/* Supported data types and data layout formats */
|
||||
+enum {
|
||||
+ S390_NNPA_TYPE_1 = 0, // data type 1 (16 bit)
|
||||
+ S390_NNPA_TYPE_BFP32 = 6,
|
||||
+ S390_NNPA_TYPE_INT8 = 8,
|
||||
+ S390_NNPA_TYPE_INT32 = 10,
|
||||
+};
|
||||
+
|
||||
+enum {
|
||||
+ S390_NNPA_4D_FEATURE_TENSOR = 0,
|
||||
+ S390_NNPA_4D_KERNEL_TENSOR = 1,
|
||||
+ S390_NNPA_4D_WEIGHTS_TENSOR = 2,
|
||||
+ S390_NNPA_4D_GENERIC_TENSOR = 31,
|
||||
+};
|
||||
+
|
||||
static const ULong NNPA_dtypes_layouts[] = {
|
||||
/* Data types */
|
||||
- (S390_SETBIT(0) | // data type 1 (16 bit)
|
||||
+ (S390_SETBIT(S390_NNPA_TYPE_1) | S390_SETBIT(S390_NNPA_TYPE_BFP32) |
|
||||
+ S390_SETBIT(S390_NNPA_TYPE_INT8) | S390_SETBIT(S390_NNPA_TYPE_INT32) |
|
||||
|
||||
/* Data layout formats */
|
||||
- S390_SETBIT(32 + 0) | // 4D-feature tensor
|
||||
- S390_SETBIT(32 + 1) // 4D-kernel tensor
|
||||
- ),
|
||||
+ S390_SETBIT(32 + S390_NNPA_4D_FEATURE_TENSOR) |
|
||||
+ S390_SETBIT(32 + S390_NNPA_4D_KERNEL_TENSOR) |
|
||||
+ S390_SETBIT(32 + S390_NNPA_4D_WEIGHTS_TENSOR) |
|
||||
+ S390_SETBIT(32 + S390_NNPA_4D_GENERIC_TENSOR)),
|
||||
};
|
||||
|
||||
static const ULong NNPA_conversions[] = {
|
||||
@@ -360,10 +390,15 @@ struct s390_NNPA_parms_qaf {
|
||||
UInt mdis;
|
||||
ULong mts;
|
||||
ULong conversions;
|
||||
- ULong reserved2[22];
|
||||
+ ULong reserved2;
|
||||
+ UInt mdnis[4];
|
||||
+ struct {
|
||||
+ ULong reserved[19];
|
||||
+ } reserved3;
|
||||
};
|
||||
|
||||
-struct s390_NNPA_tensor0 {
|
||||
+/* Tensor descriptor, common for all data-layout formats */
|
||||
+struct s390_NNPA_tensor {
|
||||
UChar layout;
|
||||
UChar dtype;
|
||||
UShort reserved1;
|
||||
@@ -372,21 +407,21 @@ struct s390_NNPA_tensor0 {
|
||||
ULong address;
|
||||
};
|
||||
|
||||
-struct s390_NNPA_parms0 {
|
||||
- ULong pbvn : 16;
|
||||
- ULong mvn : 8;
|
||||
- ULong ribm : 24;
|
||||
- ULong reserved0 : 15;
|
||||
- ULong cf : 1;
|
||||
- ULong reserved1[6];
|
||||
- ULong save_area_address;
|
||||
- struct s390_NNPA_tensor0 out[2];
|
||||
- struct s390_NNPA_tensor0 reserved2[2];
|
||||
- struct s390_NNPA_tensor0 in[3];
|
||||
- ULong reserved3[12];
|
||||
- UInt param[5];
|
||||
- UInt reserved4;
|
||||
- ULong reserved5[13];
|
||||
+/* Parameter block format 0 or 1 */
|
||||
+struct s390_NNPA_parms {
|
||||
+ ULong pbvn : 16;
|
||||
+ ULong mvn : 8;
|
||||
+ ULong ribm : 24;
|
||||
+ ULong reserved0 : 15;
|
||||
+ ULong cf : 1;
|
||||
+ ULong reserved1[6];
|
||||
+ ULong save_area_address;
|
||||
+ struct s390_NNPA_tensor out[2];
|
||||
+ struct s390_NNPA_tensor reserved2[2];
|
||||
+ struct s390_NNPA_tensor in[3];
|
||||
+ ULong reserved3[12];
|
||||
+ UInt param[16];
|
||||
+ ULong reserved4[8];
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -418,135 +453,145 @@ static const char* const s390_NNPA_errmsg_access[s390_NNPA_message_n] = {
|
||||
|
||||
struct s390_NNPA_mem_dimensions {
|
||||
UChar layout;
|
||||
- ULong dim[5]; // total dimensions
|
||||
- ULong used[4]; // used dimensions, without padding
|
||||
- ULong step[5];
|
||||
- ULong last_dim4_size;
|
||||
+ ULong dim[4];
|
||||
+ ULong total_size;
|
||||
+ ULong used_sticks; // occupied sticks per next-higher dimension
|
||||
+ ULong stick_fill;
|
||||
+ ULong last_stick_fill;
|
||||
};
|
||||
|
||||
-/* Determine the 5 dimensions used to represent the tensor data in memory */
|
||||
+/* Determine the dimensions used to represent the tensor data in memory */
|
||||
static enum ExtensionError
|
||||
-NNPA_tensor0_size(const struct s390_NNPA_tensor0* t,
|
||||
- UInt msg_idx,
|
||||
- struct s390_NNPA_mem_dimensions* out_md)
|
||||
+NNPA_tensor_size(const struct s390_NNPA_tensor* t,
|
||||
+ UInt msg_idx,
|
||||
+ struct s390_NNPA_mem_dimensions* out_md)
|
||||
{
|
||||
struct s390_NNPA_mem_dimensions md;
|
||||
ULong elem_size;
|
||||
+ ULong eps;
|
||||
|
||||
- md.layout = t->layout;
|
||||
- if (t->dtype == 0)
|
||||
+ switch (t->dtype) {
|
||||
+ case S390_NNPA_TYPE_INT8:
|
||||
+ elem_size = 1;
|
||||
+ break;
|
||||
+ case S390_NNPA_TYPE_1:
|
||||
elem_size = 2;
|
||||
- else
|
||||
+ break;
|
||||
+ case S390_NNPA_TYPE_BFP32:
|
||||
+ case S390_NNPA_TYPE_INT32:
|
||||
+ elem_size = 4;
|
||||
+ break;
|
||||
+ default:
|
||||
return INSN_ERR(s390_NNPA_errmsg_dtype[msg_idx]);
|
||||
+ }
|
||||
+ eps = 128 / elem_size;
|
||||
|
||||
+ md.layout = t->layout;
|
||||
switch (t->layout) {
|
||||
- case 0: // 4D-feature tensor
|
||||
- md.dim[0] = md.used[0] = t->dim4;
|
||||
- md.dim[1] = md.used[1] = (t->dim1 + 63) / 64;
|
||||
- md.dim[2] = md.used[2] = t->dim3;
|
||||
- md.dim[3] = (t->dim2 + 31) / 32 * 32;
|
||||
- md.used[3] = t->dim2;
|
||||
- md.dim[4] = 64;
|
||||
- md.last_dim4_size = elem_size * (t->dim1 % 64);
|
||||
+ case S390_NNPA_4D_FEATURE_TENSOR:
|
||||
+ md.dim[0] = t->dim4;
|
||||
+ md.dim[1] = (t->dim1 + eps - 1) / eps;
|
||||
+ md.used_sticks = t->dim2;
|
||||
+ goto common_tensor_dimensions;
|
||||
+ case S390_NNPA_4D_KERNEL_TENSOR:
|
||||
+ md.dim[0] = (t->dim1 + eps - 1) / eps;
|
||||
+ md.dim[1] = t->dim4;
|
||||
+ md.used_sticks = t->dim2;
|
||||
+ goto common_tensor_dimensions;
|
||||
+ case S390_NNPA_4D_WEIGHTS_TENSOR:
|
||||
+ elem_size *= 2;
|
||||
+ eps /= 2;
|
||||
+ md.dim[0] = t->dim4;
|
||||
+ md.dim[1] = (t->dim1 + eps - 1) / eps;
|
||||
+ md.used_sticks = (t->dim2 + 1) / 2;
|
||||
+ common_tensor_dimensions:
|
||||
+ md.dim[2] = t->dim3;
|
||||
+ md.dim[3] = (md.used_sticks + 31) / 32 * 32;
|
||||
+ md.stick_fill = elem_size * (t->dim1 >= eps ? eps : t->dim1);
|
||||
+ md.last_stick_fill = elem_size * ((t->dim1 - 1) % eps + 1);
|
||||
break;
|
||||
- case 1: // 4D-kernel tensor
|
||||
- md.dim[0] = md.used[0] = (t->dim1 + 63) / 64;
|
||||
- md.dim[1] = md.used[1] = t->dim4;
|
||||
- md.dim[2] = md.used[2] = t->dim3;
|
||||
- md.dim[3] = (t->dim2 + 31) / 32 * 32;
|
||||
- md.used[3] = t->dim2;
|
||||
- md.dim[4] = 64;
|
||||
- md.last_dim4_size = elem_size * (t->dim1 % 64);
|
||||
+ case S390_NNPA_4D_GENERIC_TENSOR:
|
||||
+ md.dim[0] = t->dim4;
|
||||
+ md.dim[1] = t->dim3;
|
||||
+ md.dim[2] = t->dim2;
|
||||
+ md.dim[3] = t->dim1;
|
||||
+ eps = 1;
|
||||
break;
|
||||
default:
|
||||
return INSN_ERR(s390_NNPA_errmsg_layout[msg_idx]);
|
||||
}
|
||||
- md.step[4] = elem_size * md.dim[4];
|
||||
- md.step[3] = md.step[4] * md.dim[3];
|
||||
- md.step[2] = md.step[3] * md.dim[2];
|
||||
- md.step[1] = md.step[2] * md.dim[1];
|
||||
- md.step[0] = md.step[1] * md.dim[0]; // total size
|
||||
- *out_md = md;
|
||||
+ md.total_size =
|
||||
+ elem_size * eps * md.dim[3] * md.dim[2] * md.dim[1] * md.dim[0];
|
||||
+ *out_md = md;
|
||||
return ExtErr_OK;
|
||||
}
|
||||
|
||||
-/* Determine the size of the non-pad elements in the last dimension */
|
||||
-static ULong NNPA_mem_dim4_size(const struct s390_NNPA_mem_dimensions* md,
|
||||
- ULong d0,
|
||||
- ULong d1)
|
||||
-{
|
||||
- switch (md->layout) {
|
||||
- case 0: // 4D-feature tensor
|
||||
- return d1 + 1 == md->dim[1] ? md->last_dim4_size : md->step[4];
|
||||
- case 1: // 4D-kernel tensor
|
||||
- return d0 + 1 == md->dim[0] ? md->last_dim4_size : md->step[4];
|
||||
- }
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static enum ExtensionError NNPA_pre_read_tensor0(
|
||||
- ThreadState* tst, UInt msg_idx, const struct s390_NNPA_tensor0* t)
|
||||
+/* Track a tensor's memory regions with PRE_MEM_READ or POST_MEM_WRITE */
|
||||
+static enum ExtensionError NNPA_track_tensor(ThreadState* tst,
|
||||
+ UInt msg_idx,
|
||||
+ const struct s390_NNPA_tensor* t,
|
||||
+ Bool do_write)
|
||||
{
|
||||
struct s390_NNPA_mem_dimensions md;
|
||||
enum ExtensionError ret;
|
||||
+ ULong addr = t->address;
|
||||
|
||||
- ret = NNPA_tensor0_size(t, msg_idx, &md);
|
||||
+ ret = NNPA_tensor_size(t, msg_idx, &md);
|
||||
if (ret != ExtErr_OK)
|
||||
return ret;
|
||||
|
||||
- for (ULong d0 = 0; d0 < md.used[0]; d0++) {
|
||||
- for (ULong d1 = 0; d1 < md.used[1]; d1++) {
|
||||
- for (ULong d2 = 0; d2 < md.used[2]; d2++) {
|
||||
- for (ULong d3 = 0; d3 < md.used[3]; d3++) {
|
||||
- ULong addr = t->address + d0 * md.step[1] + d1 * md.step[2] +
|
||||
- d2 * md.step[3] + d3 * md.step[4];
|
||||
- ULong len = NNPA_mem_dim4_size(&md, d0, d1);
|
||||
- PRE_MEM_READ(tst, s390_NNPA_errmsg_access[msg_idx], addr, len);
|
||||
+ switch (md.layout) {
|
||||
+ case S390_NNPA_4D_FEATURE_TENSOR:
|
||||
+ case S390_NNPA_4D_KERNEL_TENSOR:
|
||||
+ case S390_NNPA_4D_WEIGHTS_TENSOR:
|
||||
+ for (ULong d0 = 0; d0 < md.dim[0]; d0++) {
|
||||
+ for (ULong d1 = 0; d1 < md.dim[1]; d1++) {
|
||||
+ ULong len;
|
||||
+ switch (md.layout) {
|
||||
+ case S390_NNPA_4D_FEATURE_TENSOR:
|
||||
+ case S390_NNPA_4D_WEIGHTS_TENSOR:
|
||||
+ len = d1 + 1 == md.dim[1] ? md.last_stick_fill : md.stick_fill;
|
||||
+ break;
|
||||
+ case S390_NNPA_4D_KERNEL_TENSOR:
|
||||
+ len = d0 + 1 == md.dim[0] ? md.last_stick_fill : md.stick_fill;
|
||||
+ break;
|
||||
}
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- return ExtErr_OK;
|
||||
-}
|
||||
-
|
||||
-static UWord NNPA_pre_write_tensor0(ThreadState* tst,
|
||||
- UInt msg_idx,
|
||||
- const struct s390_NNPA_tensor0* t)
|
||||
-{
|
||||
- struct s390_NNPA_mem_dimensions md;
|
||||
- enum ExtensionError ret;
|
||||
-
|
||||
- ret = NNPA_tensor0_size(t, msg_idx, &md);
|
||||
- if (ret != ExtErr_OK)
|
||||
- return ret;
|
||||
-
|
||||
- PRE_MEM_WRITE(tst, "NNPA(out_tensor)", t->address, md.step[0]);
|
||||
- return ExtErr_OK;
|
||||
-}
|
||||
-
|
||||
-static void NNPA_post_write_tensor0(ThreadState* tst,
|
||||
- UInt msg_idx,
|
||||
- const struct s390_NNPA_tensor0* t)
|
||||
-{
|
||||
- struct s390_NNPA_mem_dimensions md;
|
||||
- enum ExtensionError ret;
|
||||
-
|
||||
- ret = NNPA_tensor0_size(t, msg_idx, &md);
|
||||
- if (ret != ExtErr_OK)
|
||||
- return;
|
||||
-
|
||||
- for (ULong d0 = 0; d0 < md.used[0]; d0++) {
|
||||
- for (ULong d1 = 0; d1 < md.used[1]; d1++) {
|
||||
- for (ULong d2 = 0; d2 < md.used[2]; d2++) {
|
||||
- for (ULong d3 = 0; d3 < md.used[3]; d3++) {
|
||||
- ULong addr = t->address + d0 * md.step[1] + d1 * md.step[2] +
|
||||
- d2 * md.step[3] + d3 * md.step[4];
|
||||
- ULong len = NNPA_mem_dim4_size(&md, d0, d1);
|
||||
- POST_MEM_WRITE(tst, addr, len);
|
||||
+ for (ULong d2 = 0; d2 < md.dim[2]; d2++) {
|
||||
+ for (ULong d3 = 0; d3 < md.used_sticks; d3++) {
|
||||
+ if (md.layout == S390_NNPA_4D_WEIGHTS_TENSOR &&
|
||||
+ d3 == md.used_sticks - 1 && t->dim2 % 2 != 0) {
|
||||
+ // even elements only
|
||||
+ for (ULong i = 0; i < len - 1; i += 2) {
|
||||
+ if (do_write) {
|
||||
+ POST_MEM_WRITE(tst, addr + i, 1);
|
||||
+ } else {
|
||||
+ PRE_MEM_READ(tst, s390_NNPA_errmsg_access[msg_idx],
|
||||
+ addr + i, 1);
|
||||
+ }
|
||||
+ }
|
||||
+ } else if (do_write) {
|
||||
+ POST_MEM_WRITE(tst, addr, len);
|
||||
+ } else {
|
||||
+ PRE_MEM_READ(tst, s390_NNPA_errmsg_access[msg_idx], addr,
|
||||
+ len);
|
||||
+ }
|
||||
+ addr += 128;
|
||||
+ }
|
||||
+ addr += 128 * (md.dim[3] - md.used_sticks);
|
||||
}
|
||||
}
|
||||
}
|
||||
+ break;
|
||||
+ case S390_NNPA_4D_GENERIC_TENSOR:
|
||||
+ if (do_write) {
|
||||
+ POST_MEM_WRITE(tst, t->address, md.total_size);
|
||||
+ } else {
|
||||
+ PRE_MEM_READ(tst, s390_NNPA_errmsg_access[msg_idx], t->address,
|
||||
+ md.total_size);
|
||||
+ }
|
||||
+ break;
|
||||
}
|
||||
+ return ExtErr_OK;
|
||||
}
|
||||
|
||||
static enum ExtensionError do_extension_NNPA(ThreadState* tst, ULong variant)
|
||||
@@ -571,16 +616,21 @@ static enum ExtensionError do_extension_NNPA(ThreadState* tst, ULong variant)
|
||||
NNPA_dtypes_layouts, sizeof(NNPA_dtypes_layouts));
|
||||
s390_filter_functions(&parms->conversions, sizeof(ULong),
|
||||
NNPA_conversions, sizeof(NNPA_conversions));
|
||||
+ // Clear reserved fields
|
||||
+ parms->reserved1 = 0;
|
||||
+ parms->reserved2 = 0;
|
||||
+ parms->reserved3 = (__typeof__(parms->reserved3)){0};
|
||||
} else {
|
||||
- struct s390_NNPA_parms0* parms = (void*)parms_addr;
|
||||
- const struct s390_NNPA_parms0 orig_parms = *parms;
|
||||
- ULong save_area_size = 0;
|
||||
- UInt in_tensors;
|
||||
- UInt out_tensors;
|
||||
+ struct s390_NNPA_parms* parms = (void*)parms_addr;
|
||||
+ const struct s390_NNPA_parms orig_parms = *parms;
|
||||
+ ULong save_area_size = 0;
|
||||
+ UInt in_tensors;
|
||||
+ UInt out_tensors;
|
||||
+ enum ExtensionError retval;
|
||||
|
||||
parms_len = 4096;
|
||||
PRE_MEM_READ(tst, "NNPA(parms)", parms_addr,
|
||||
- sizeof(struct s390_NNPA_parms0));
|
||||
+ sizeof(struct s390_NNPA_parms));
|
||||
if (parms->cf) {
|
||||
PRE_MEM_READ(tst, "NNPA(parms.csb)", parms_addr + 512,
|
||||
parms_len - 512);
|
||||
@@ -594,28 +644,39 @@ static enum ExtensionError do_extension_NNPA(ThreadState* tst, ULong variant)
|
||||
case S390_NNPA_DIV:
|
||||
case S390_NNPA_MIN:
|
||||
case S390_NNPA_MAX:
|
||||
+ case S390_NNPA_NORM:
|
||||
in_tensors = 2;
|
||||
out_tensors = 1;
|
||||
break;
|
||||
case S390_NNPA_LOG:
|
||||
case S390_NNPA_EXP:
|
||||
+ case S390_NNPA_SQRT:
|
||||
+ case S390_NNPA_INVSQRT:
|
||||
case S390_NNPA_RELU:
|
||||
case S390_NNPA_TANH:
|
||||
case S390_NNPA_SIGMOID:
|
||||
+ case S390_NNPA_GELU:
|
||||
in_tensors = 1;
|
||||
out_tensors = 1;
|
||||
break;
|
||||
case S390_NNPA_SOFTMAX:
|
||||
+ case S390_NNPA_REDUCE:
|
||||
in_tensors = 1;
|
||||
out_tensors = 1;
|
||||
save_area_size = 8192;
|
||||
break;
|
||||
case S390_NNPA_BATCHNORM:
|
||||
+ case S390_NNPA_LAYERNORM:
|
||||
in_tensors = 3;
|
||||
out_tensors = 1;
|
||||
break;
|
||||
+ case S390_NNPA_MOMENTS:
|
||||
+ in_tensors = 1;
|
||||
+ out_tensors = 2;
|
||||
+ break;
|
||||
case S390_NNPA_MAXPOOL2D:
|
||||
case S390_NNPA_AVGPOOL2D:
|
||||
+ case S390_NNPA_TRANSFORM:
|
||||
in_tensors = 1;
|
||||
out_tensors = 1;
|
||||
break;
|
||||
@@ -627,6 +688,7 @@ static enum ExtensionError do_extension_NNPA(ThreadState* tst, ULong variant)
|
||||
case S390_NNPA_CONVOLUTION:
|
||||
case S390_NNPA_MATMUL_OP:
|
||||
case S390_NNPA_MATMUL_OP_BCAST23:
|
||||
+ case S390_NNPA_MATMUL_OP_BCAST1:
|
||||
in_tensors = 3;
|
||||
out_tensors = 1;
|
||||
break;
|
||||
@@ -635,16 +697,20 @@ static enum ExtensionError do_extension_NNPA(ThreadState* tst, ULong variant)
|
||||
}
|
||||
|
||||
for (UInt i = 0; i < in_tensors; i++) {
|
||||
- enum ExtensionError retval =
|
||||
- NNPA_pre_read_tensor0(tst, s390_NNPA_message_in + i, &parms->in[i]);
|
||||
+ retval = NNPA_track_tensor(tst, s390_NNPA_message_in + i,
|
||||
+ &parms->in[i], False);
|
||||
if (retval != ExtErr_OK)
|
||||
return retval;
|
||||
}
|
||||
for (UInt i = 0; i < out_tensors; i++) {
|
||||
- enum ExtensionError retval = NNPA_pre_write_tensor0(
|
||||
- tst, s390_NNPA_message_out + i, &parms->out[i]);
|
||||
+ UInt msg_idx = s390_NNPA_message_out + i;
|
||||
+ struct s390_NNPA_mem_dimensions md;
|
||||
+
|
||||
+ retval = NNPA_tensor_size(&parms->out[i], msg_idx, &md);
|
||||
if (retval != ExtErr_OK)
|
||||
return retval;
|
||||
+ PRE_MEM_WRITE(tst, s390_NNPA_errmsg_access[msg_idx],
|
||||
+ parms->out[i].address, md.total_size);
|
||||
}
|
||||
if (save_area_size != 0) {
|
||||
PRE_MEM_WRITE(tst, "NNPA(save_area)", parms->save_area_address,
|
||||
@@ -653,8 +719,10 @@ static enum ExtensionError do_extension_NNPA(ThreadState* tst, ULong variant)
|
||||
cc = do_NNPA_insn(&gpr0, parms_addr);
|
||||
if (cc == 0) {
|
||||
for (UInt i = 0; i < out_tensors; i++) {
|
||||
- NNPA_post_write_tensor0(tst, s390_NNPA_message_out + i,
|
||||
- &orig_parms.out[i]);
|
||||
+ retval = NNPA_track_tensor(tst, s390_NNPA_message_out + i,
|
||||
+ &orig_parms.out[i], True);
|
||||
+ if (retval != ExtErr_OK)
|
||||
+ return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -1,102 +0,0 @@
|
||||
From 5c912fcfaff2c7c34232562a118fa5722c6df995 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Cermak <mcermak@redhat.com>
|
||||
Date: Fri, 8 Aug 2025 23:46:53 +0200
|
||||
Subject: [PATCH 3/3] Add several missing syscall hooks to ppc64-linux
|
||||
|
||||
Specifically:
|
||||
|
||||
sys_getrlimit
|
||||
sys_mincore
|
||||
sys_tkill
|
||||
sys_unshare
|
||||
sys_splice
|
||||
sys_tee
|
||||
sys_vmsplice
|
||||
sys_fanotify_init
|
||||
sys_fanotify_mark
|
||||
sys_kcmp
|
||||
sys_bpf
|
||||
|
||||
https://bugs.kde.org/show_bug.cgi?id=508030
|
||||
(cherry picked from commit 4363549490ecaeaa6c3048beeb8c5edcec33ec06)
|
||||
---
|
||||
NEWS | 1 +
|
||||
coregrind/m_syswrap/syswrap-ppc64-linux.c | 14 +++++++++++---
|
||||
2 files changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 4e6e6c6d2387..3eea6bb1b709 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -6,6 +6,7 @@ Branch 3.25.x
|
||||
The following bugs have been fixed or resolved on this branch.
|
||||
|
||||
503241 s390x: Support z17 changes to the NNPA instruction
|
||||
+508030 Add several missing syscall hooks to ppc64-linux
|
||||
|
||||
To see details of a given bug, visit
|
||||
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
|
||||
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
index 007fa6336c0e..03a5e6a822c1 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
@@ -691,7 +691,7 @@ static SyscallTableEntry syscall_table[] = {
|
||||
// _____(__NR_sethostname, sys_sethostname), // 74
|
||||
|
||||
GENX_(__NR_setrlimit, sys_setrlimit), // 75
|
||||
-// _____(__NR_getrlimit, sys_getrlimit), // 76
|
||||
+ GENXY(__NR_getrlimit, sys_getrlimit), // 76
|
||||
GENXY(__NR_getrusage, sys_getrusage), // 77
|
||||
GENXY(__NR_gettimeofday, sys_gettimeofday), // 78
|
||||
// _____(__NR_settimeofday, sys_settimeofday), // 79
|
||||
@@ -847,9 +847,9 @@ static SyscallTableEntry syscall_table[] = {
|
||||
LINXY(__NR_fcntl64, sys_fcntl64), // 204 !!!!?? 32bit only */
|
||||
|
||||
GENX_(__NR_madvise, sys_madvise), // 205
|
||||
-// _____(__NR_mincore, sys_mincore), // 206
|
||||
+ GENXY(__NR_mincore, sys_mincore), // 206
|
||||
LINX_(__NR_gettid, sys_gettid), // 207
|
||||
-// _____(__NR_tkill, sys_tkill), // 208
|
||||
+ LINXY(__NR_tkill, sys_tkill), // 208
|
||||
LINX_(__NR_setxattr, sys_setxattr), // 209
|
||||
|
||||
LINX_(__NR_lsetxattr, sys_lsetxattr), // 210
|
||||
@@ -934,6 +934,10 @@ static SyscallTableEntry syscall_table[] = {
|
||||
|
||||
LINXY(__NR_pselect6, sys_pselect6), // 280
|
||||
LINXY(__NR_ppoll, sys_ppoll), // 281
|
||||
+ LINX_(__NR_unshare, sys_unshare), // 282
|
||||
+ LINX_(__NR_splice, sys_splice), // 283
|
||||
+ LINX_(__NR_tee, sys_tee), // 284
|
||||
+ LINXY(__NR_vmsplice, sys_vmsplice), // 285
|
||||
|
||||
LINXY(__NR_openat, sys_openat), // 286
|
||||
LINX_(__NR_mkdirat, sys_mkdirat), // 287
|
||||
@@ -972,6 +976,8 @@ static SyscallTableEntry syscall_table[] = {
|
||||
LINXY(__NR_preadv, sys_preadv), // 320
|
||||
LINX_(__NR_pwritev, sys_pwritev), // 321
|
||||
LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 322
|
||||
+ LINXY(__NR_fanotify_init, sys_fanotify_init), // 323
|
||||
+ LINX_(__NR_fanotify_mark, sys_fanotify_mark), // 324
|
||||
|
||||
LINXY(__NR_prlimit64, sys_prlimit64), // 325
|
||||
LINXY(__NR_socket, sys_socket), // 326
|
||||
@@ -1001,6 +1007,7 @@ static SyscallTableEntry syscall_table[] = {
|
||||
|
||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351
|
||||
LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 352
|
||||
+ LINX_(__NR_kcmp, sys_kcmp), // 354
|
||||
|
||||
LINX_(__NR_sched_setattr, sys_sched_setattr), // 355
|
||||
LINXY(__NR_sched_getattr, sys_sched_getattr), // 356
|
||||
@@ -1008,6 +1015,7 @@ static SyscallTableEntry syscall_table[] = {
|
||||
|
||||
LINXY(__NR_getrandom, sys_getrandom), // 359
|
||||
LINXY(__NR_memfd_create, sys_memfd_create), // 360
|
||||
+ LINXY(__NR_bpf, sys_bpf), // 361
|
||||
|
||||
LINX_(__NR_execveat, sys_execveat), // 362
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -1,87 +0,0 @@
|
||||
diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c
|
||||
index 63172b971..857f910cb 100644
|
||||
--- a/coregrind/m_redir.c
|
||||
+++ b/coregrind/m_redir.c
|
||||
@@ -1508,6 +1508,12 @@ void VG_(redir_initialise) ( void )
|
||||
NULL /* not mandatory - so why bother at all? */
|
||||
/* glibc-2.5 (FC6, ppc64) seems fine without it */
|
||||
);
|
||||
+
|
||||
+ add_hardwired_spec(
|
||||
+ "ld64.so.2", "strcmp",
|
||||
+ (Addr)&VG_(ppc64_linux_REDIR_FOR_strcmp),
|
||||
+ NULL
|
||||
+ );
|
||||
}
|
||||
|
||||
# elif defined(VGP_arm_linux)
|
||||
diff --git a/coregrind/m_trampoline.S b/coregrind/m_trampoline.S
|
||||
index 2c2cc0dc2..5e1f2f147 100644
|
||||
--- a/coregrind/m_trampoline.S
|
||||
+++ b/coregrind/m_trampoline.S
|
||||
@@ -602,8 +602,52 @@ VG_(ppc64_linux_REDIR_FOR_strchr):
|
||||
.long 0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.L1end:
|
||||
-
|
||||
|
||||
+ /* this function is written using the "dotless" ABI convention */
|
||||
+ .align 2
|
||||
+ .globl VG_(ppc64_linux_REDIR_FOR_strcmp)
|
||||
+#if !defined VGP_ppc64be_linux || _CALL_ELF == 2
|
||||
+ /* Little Endian uses ELF version 2 */
|
||||
+ .type VG_(ppc64_linux_REDIR_FOR_strcmp),@function
|
||||
+VG_(ppc64_linux_REDIR_FOR_strcmp):
|
||||
+#else
|
||||
+ /* Big Endian uses ELF version 1 */
|
||||
+ .section ".opd","aw"
|
||||
+ .align 3
|
||||
+VG_(ppc64_linux_REDIR_FOR_strcmp):
|
||||
+ .quad .L.VG_(ppc64_linux_REDIR_FOR_strcmp),.TOC.@tocbase,0
|
||||
+ .previous
|
||||
+ .size VG_(ppc64_linux_REDIR_FOR_strcmp), \
|
||||
+ .LFE0-.L.VG_(ppc64_linux_REDIR_FOR_strcmp)
|
||||
+ .type VG_(ppc64_linux_REDIR_FOR_strcmp), @function
|
||||
+
|
||||
+.L.VG_(ppc64_linux_REDIR_FOR_strcmp):
|
||||
+#endif
|
||||
+#if _CALL_ELF == 2
|
||||
+0: addis 2,12,.TOC.-0b@ha
|
||||
+ addi 2,2,.TOC.-0b@l
|
||||
+ .localentry VG_(ppc64_linux_REDIR_FOR_strcmp), .-VG_(ppc64_linux_REDIR_FOR_strcmp)
|
||||
+#endif
|
||||
+.LFB0:
|
||||
+ .cfi_startproc
|
||||
+ li 10,0
|
||||
+.L3:
|
||||
+ lbzx 8,3,10
|
||||
+ lbzx 9,4,10
|
||||
+ cmpwi 0,8,0
|
||||
+ beq 0,.L2
|
||||
+ cmpw 0,8,9
|
||||
+ addi 10,10,1
|
||||
+ beq 0,.L3
|
||||
+.L2:
|
||||
+ subf 3,9,8
|
||||
+ extsw 3,3
|
||||
+ blr
|
||||
+ .long 0
|
||||
+ .byte 0,0,0,0,0,0,0,0
|
||||
+ .cfi_endproc
|
||||
+.LFE0:
|
||||
+
|
||||
.global VG_(trampoline_stuff_end)
|
||||
VG_(trampoline_stuff_end):
|
||||
|
||||
diff --git a/coregrind/pub_core_trampoline.h b/coregrind/pub_core_trampoline.h
|
||||
index 11d791df7..92b4fc67b 100644
|
||||
--- a/coregrind/pub_core_trampoline.h
|
||||
+++ b/coregrind/pub_core_trampoline.h
|
||||
@@ -97,6 +97,7 @@ extern void* VG_(ppc32_linux_REDIR_FOR_strchr)( void*, Int );
|
||||
#if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
|
||||
extern Addr VG_(ppc64_linux_SUBST_FOR_rt_sigreturn);
|
||||
extern UInt VG_(ppc64_linux_REDIR_FOR_strlen)( void* );
|
||||
+extern UInt VG_(ppc64_linux_REDIR_FOR_strcmp)( void*, void* );
|
||||
extern void* VG_(ppc64_linux_REDIR_FOR_strchr)( void*, Int );
|
||||
/* A label (sans dot) marking the ultra-magical return stub via which
|
||||
all redirected and wrapped functions are made to "return" on
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (valgrind-3.25.1.tar.bz2) = 6a474d58730274c57d6ca012ffd3226d393d6507cd57bf46c3b26c87a0cba84e3c8cfc84c8c76e50041861e98baba7b9613490faef4212d082845581d08af351
|
||||
SHA512 (valgrind-3.26.0.tar.bz2) = 80ebf9197be602fdd4aad0e9277e6ef2fd25ede9cecb6e6d159f6f062c13f62ad907c6b6e7000e82b3404d8b4f9e7bf15813f60d9fed414c7b713a4280c82898
|
||||
|
||||
@ -1,34 +1,28 @@
|
||||
commit d3c977726064ba09fed6dfc7daf22b16824c97b4
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Fri May 24 18:24:56 2019 +0200
|
||||
|
||||
Add -Wl,-z,now to some binaries.
|
||||
|
||||
diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am
|
||||
index 1b7842b..e211eec 100644
|
||||
index 2b8703cf1a63..8cb828b85c57 100644
|
||||
--- a/auxprogs/Makefile.am
|
||||
+++ b/auxprogs/Makefile.am
|
||||
@@ -32,7 +32,7 @@ valgrind_listener_SOURCES = valgrind-listener.c
|
||||
@@ -50,7 +50,7 @@ valgrind_listener_SOURCES = valgrind-listener.c
|
||||
valgrind_listener_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fhosted -fstack-protector-strong
|
||||
valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI) -Wl,-z,now
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
valgrind_listener_CFLAGS += -static
|
||||
endif
|
||||
@@ -51,7 +51,7 @@ valgrind_di_server_SOURCES = valgrind-di-server.c
|
||||
@@ -69,7 +69,7 @@ valgrind_di_server_SOURCES = valgrind-di-server.c
|
||||
valgrind_di_server_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fhosted -fstack-protector-strong
|
||||
valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI) -Wl,-z,now
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
valgrind_di_server_CFLAGS += -static
|
||||
endif
|
||||
@@ -86,7 +86,7 @@ getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = getoff.c
|
||||
@@ -104,7 +104,7 @@ getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = getoff.c
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fstack-protector-strong
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fhosted -fstack-protector-strong
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
+getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
|
||||
@ -36,21 +30,21 @@ index 1b7842b..e211eec 100644
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD = $(LDADD) -ldl
|
||||
endif
|
||||
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
|
||||
index 3c73210..fb6b7bb 100644
|
||||
index 0bcb4a4f423f..59fc48052e50 100644
|
||||
--- a/coregrind/Makefile.am
|
||||
+++ b/coregrind/Makefile.am
|
||||
@@ -57,7 +57,7 @@ RANLIB = ${LTO_RANLIB}
|
||||
@@ -64,7 +64,7 @@ RANLIB = ${LTO_RANLIB}
|
||||
valgrind_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted -fstack-protector-strong
|
||||
valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
+valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
|
||||
# If there is no secondary platform, and the platforms include x86-darwin,
|
||||
# then the primary platform must be x86-darwin. Hence:
|
||||
if ! VGCONF_HAVE_PLATFORM_SEC
|
||||
@@ -104,7 +104,7 @@
|
||||
@@ -106,7 +106,7 @@ endif
|
||||
vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI) $(GDB_SCRIPTS_DIR)
|
||||
vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted -fstack-protector-strong
|
||||
vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-vgdb_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
+vgdb_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
|
||||
@ -1,45 +1,48 @@
|
||||
commit b73fb7a614e1b5d60af23fb0752b5cead995e02e
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Sun Apr 14 00:30:05 2019 +0200
|
||||
|
||||
Remove no-stack-protector, add stack-protector-strong to some.
|
||||
|
||||
diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am
|
||||
index 56cc5ef..1b7842b 100644
|
||||
index d96e7fd0a968..2b8703cf1a63 100644
|
||||
--- a/auxprogs/Makefile.am
|
||||
+++ b/auxprogs/Makefile.am
|
||||
@@ -30,7 +30,7 @@ bin_PROGRAMS = valgrind-listener valgrind-di-server
|
||||
@@ -48,7 +48,7 @@ bin_PROGRAMS = valgrind-listener valgrind-di-server
|
||||
|
||||
valgrind_listener_SOURCES = valgrind-listener.c
|
||||
valgrind_listener_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
-valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
-valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fhosted
|
||||
+valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fhosted -fstack-protector-strong
|
||||
valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
@@ -49,7 +49,7 @@ endif
|
||||
@@ -67,7 +67,7 @@ endif
|
||||
|
||||
valgrind_di_server_SOURCES = valgrind-di-server.c
|
||||
valgrind_di_server_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
-valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
-valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fhosted
|
||||
+valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fhosted -fstack-protector-strong
|
||||
valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
@@ -84,7 +84,7 @@ endif
|
||||
@@ -102,7 +102,7 @@ endif
|
||||
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = getoff.c
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
-getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
+getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fstack-protector-strong
|
||||
-getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fhosted
|
||||
+getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fhosted -fstack-protector-strong
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
if HAVE_DLINFO_RTLD_DI_TLS_MODID
|
||||
@@ -119,7 +119,7 @@ endif
|
||||
if VGCONF_HAVE_PLATFORM_SEC
|
||||
getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES = getoff.c
|
||||
getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
-getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -fhosted
|
||||
+getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -fhosted -fstack-protector-strong
|
||||
getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_SEC)
|
||||
getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_SEC)
|
||||
if HAVE_DLINFO_RTLD_DI_TLS_MODID
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f8c798b..ccc8f52 100755
|
||||
index 90fafaf1c557..84a3d22c5bff 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2352,24 +2352,24 @@
|
||||
@@ -2764,24 +2764,24 @@ AC_LANG(C)
|
||||
AM_CONDITIONAL([HAVE_ALIGNED_CXX_ALLOC], [test x$ac_have_aligned_cxx_alloc = xyes])
|
||||
|
||||
# does this compiler support -fno-stack-protector ?
|
||||
@ -82,24 +85,24 @@ index f8c798b..ccc8f52 100755
|
||||
|
||||
# does this compiler support -finline-functions ?
|
||||
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
|
||||
index 94030fd..3c73210 100644
|
||||
index 4ead1542b0c7..0bcb4a4f423f 100644
|
||||
--- a/coregrind/Makefile.am
|
||||
+++ b/coregrind/Makefile.am
|
||||
@@ -55,7 +55,7 @@ AR = ${LTO_AR}
|
||||
@@ -62,7 +62,7 @@ AR = ${LTO_AR}
|
||||
RANLIB = ${LTO_RANLIB}
|
||||
|
||||
valgrind_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
-valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS)
|
||||
+valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
-valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted
|
||||
+valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted -fstack-protector-strong
|
||||
valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
# If there is no secondary platform, and the platforms include x86-darwin,
|
||||
@@ -102,7 +102,7 @@
|
||||
@@ -104,7 +104,7 @@ vgdb_SOURCES += vgdb-invoker-freebsd.c
|
||||
endif
|
||||
|
||||
vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI) $(GDB_SCRIPTS_DIR)
|
||||
-vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS)
|
||||
+vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
-vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted
|
||||
+vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted -fstack-protector-strong
|
||||
vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
vgdb_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
Summary: Dynamic analysis tools to detect memory or thread bugs and profile
|
||||
Name: %{?scl_prefix}valgrind
|
||||
Version: 3.25.1
|
||||
Release: 3%{?dist}
|
||||
Version: 3.26.0
|
||||
Release: 1%{?dist}
|
||||
Epoch: 1
|
||||
|
||||
# This ignores licenses that are only found in the test or perf sources
|
||||
@ -12,7 +12,7 @@ Epoch: 1
|
||||
# a license specifier is in coregrind/m_main.c for some Hacker's Delight
|
||||
# public domain code, which is only compiled into Darwin binaries, which
|
||||
# we don't create. Also some subpackages have their own license tags.
|
||||
License: GPL-2.0-or-later AND bzip2-1.0.6 AND GFDL-1.2-or-later AND (GPL-2.0-or-later AND LGPL-2.0-or-later) AND (GPL-2.0-or-later AND ISC) AND (GPL-2.0-or-later AND Unlicense) AND (GPL-2.0-or-later AND Zlib) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later AND BSD-3-Clause) AND (GPL-2.0-or-later AND (MIT OR NCSA)) AND CMU-Mach AND (GPL-2.0-or-later AND X11 AND BSD-3-Clause) AND X11 AND (GPL-2.0-or-later AND LGPL-2.0-or-later) AND (GPL-2.0-or-later AND (GPL-2.0-or-later OR MPL-2.0)) AND (GPL-2.0-or-later WITH Autoconf-exception-generic) AND (GPL-3.0-or-later WITH Autoconf-exception-generic-3.0) AND FSFULLR AND FSFAP AND FSFUL AND FSFULLRWD
|
||||
License: GPL-3.0-or-later AND bzip2-1.0.6 AND (GPL-3.0-or-later AND LGPL-2.0-or-later) AND (GPL-3.0-or-later AND ISC) AND (GPL-3.0-or-later AND Unlicense) AND (GPL-3.0-or-later AND Zlib) AND (GPL-3.0-or-later WITH GCC-exception-2.0) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-3.0-or-later AND BSD-3-Clause) AND (GPL-3.0-or-later AND (MIT OR NCSA)) AND CMU-Mach AND (GPL-3.0-or-later AND X11 AND BSD-3-Clause) AND X11 AND (GPL-3.0-or-later AND LGPL-2.0-or-later) AND (GPL-2.0-or-later WITH Autoconf-exception-generic) AND (GPL-3.0-or-later WITH Autoconf-exception-generic-3.0) AND FSFULLR AND FSFAP AND FSFUL AND FSFULLRWD
|
||||
URL: https://www.valgrind.org/
|
||||
|
||||
# Are we building for a Software Collection?
|
||||
@ -80,19 +80,10 @@ Patch1: valgrind-3.9.0-cachegrind-improvements.patch
|
||||
Patch2: valgrind-3.9.0-ldso-supp.patch
|
||||
|
||||
# Add some stack-protector
|
||||
Patch3: valgrind-3.16.0-some-stack-protector.patch
|
||||
Patch3: valgrind-3.26.0-some-stack-protector.patch
|
||||
|
||||
# Add some -Wl,z,now.
|
||||
Patch4: valgrind-3.16.0-some-Wl-z-now.patch
|
||||
|
||||
# VALGRIND_3_25_BRANCH patches
|
||||
Patch5: 0001-Prepare-NEWS-for-branch-3.25.x-fixes.patch
|
||||
Patch6: 0002-Bug-503241-s390x-Support-z17-changes-to-the-NNPA-ins.patch
|
||||
Patch7: 0003-Add-several-missing-syscall-hooks-to-ppc64-linux.patch
|
||||
|
||||
# Proposed upstream patches
|
||||
# https://bugs.kde.org/show_bug.cgi?id=508145
|
||||
Patch101: ppc64-strcmp-ld.patch
|
||||
Patch4: valgrind-3.26.0-some-Wl-z-now.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: glibc-devel
|
||||
@ -223,7 +214,7 @@ Documentation in html and pdf, plus man pages for valgrind tools and scripts.
|
||||
|
||||
%package scripts
|
||||
Summary: Scripts for post-processing valgrind tool output
|
||||
License: GPL-2.0-or-later
|
||||
License: GPL-3.0-or-later AND (GPL-3.0-or-later OR MPL-2.0)
|
||||
# Most scripts can be used as is for post-processing a valgrind tool run.
|
||||
# But callgrind_control uses vgdb.
|
||||
Recommends: %{?scl_prefix}valgrind-gdb = %{epoch}:%{version}-%{release}
|
||||
@ -233,7 +224,7 @@ Perl and Python scripts for post-processing valgrind tool output.
|
||||
|
||||
%package gdb
|
||||
Summary: Tools for integrating valgrind and gdb
|
||||
License: GPL-2.0-or-later
|
||||
License: GPL-3.0-or-later
|
||||
Requires: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release}
|
||||
# vgdb can be used without gdb, just to control valgrind.
|
||||
# But normally you use it together with both valgrind and gdb.
|
||||
@ -273,12 +264,6 @@ Valgrind User Manual for details.
|
||||
%patch -P3 -p1
|
||||
%patch -P4 -p1
|
||||
|
||||
%patch -P5 -p1
|
||||
%patch -P6 -p1
|
||||
%patch -P7 -p1
|
||||
|
||||
%patch -P101 -p1
|
||||
|
||||
%build
|
||||
# LTO triggers undefined symbols in valgrind. But valgrind has a
|
||||
# --enable-lto configure time option that we will use instead.
|
||||
@ -482,6 +467,7 @@ echo ===============END TESTING===============
|
||||
%{_bindir}/valgrind-di-server
|
||||
%{_bindir}/valgrind-listener
|
||||
%{_bindir}/vgdb
|
||||
%{_bindir}/vgstack
|
||||
# gdb register descriptions
|
||||
%{_libexecdir}/valgrind/*.xml
|
||||
%{_datadir}/gdb/auto-load/valgrind-monitor.py
|
||||
@ -517,6 +503,14 @@ echo ===============END TESTING===============
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 4 2025 Mark Wielaard <mjw@redhat.com> - 3.26.0-1
|
||||
- Valgrind 3.26.0 final
|
||||
- Remove all VALGRIND_3_25_BRANCH and proposed upstream patches
|
||||
- Refresh some-stack-protector and some-Wl-z-now patches.
|
||||
- Add vgstack to valgrind-gdb.
|
||||
- Update License to GPL-3.0-or-later
|
||||
- Clarify License of valgrind-scripts.
|
||||
|
||||
* Mon Aug 18 2025 Mark Wielaard <mjw@redhat.com> - 3.25.1-3
|
||||
- Add ppc64-strcmp-ld.patch
|
||||
- Add 0003-Add-several-missing-syscall-hooks-to-ppc64-linux.patch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user