import gzip-1.9-9.el8

This commit is contained in:
CentOS Sources 2020-01-21 17:28:05 -05:00 committed by Stepan Oksanichenko
parent 51e1db293f
commit a30be00eea
2 changed files with 33 additions and 27 deletions

View File

@ -5,6 +5,7 @@ sys/sdt.h probes.
(HB_SIZE): Likewise.
(is_dfltcc_enabled): Fix buffer overrun on newer models and incomplete
initialization on older models.
Add machine mode hint.
(dfltcc): Use sys/sdt.h feature detection.
(bi_load): New function.
(bi_close_block): Use bi_load.
@ -19,9 +20,9 @@ Minor formatting improvements.
* tests/hufts: Ignore the hardware error code.
---
configure.ac | 2 +-
dfltcc.c | 68 +++++++++++++++++++++++++++++++++++-----------------
dfltcc.c | 76 ++++++++++++++++++++++++++++++++++++----------------
tests/hufts | 2 ++
3 files changed, 49 insertions(+), 23 deletions(-)
3 files changed, 56 insertions(+), 24 deletions(-)
diff --git a/configure.ac b/configure.ac
index 76ac26f..b4aea34 100644
@ -37,7 +38,7 @@ index 76ac26f..b4aea34 100644
AC_HEADER_DIRENT
AC_TYPE_SIGNAL
diff --git a/dfltcc.c b/dfltcc.c
index ba62968..f0f848b 100644
index ba62968..ed3be8d 100644
--- a/dfltcc.c
+++ b/dfltcc.c
@@ -22,7 +22,7 @@
@ -75,20 +76,27 @@ index ba62968..f0f848b 100644
#define DFLTCC_FACILITY 151
#define DFLTCC_FMT0 0
#define CVT_CRC32 0
@@ -155,9 +153,10 @@ is_dfltcc_enabled (void)
@@ -155,9 +153,16 @@ is_dfltcc_enabled (void)
if (env && !strcmp (env, "0"))
return 0;
- register int r0 __asm__ ("r0") = sizeof facilities / 8;
- __asm__ ("stfle %[facilities]\n"
- : [facilities] "=Q"(facilities) : [r0] "r"(r0) : "cc", "memory");
+ memset (facilities, 0, sizeof facilities);
+ register char r0 __asm__ ("r0") = sizeof facilities / 8 - 1;
__asm__ ("stfle %[facilities]\n"
- : [facilities] "=Q"(facilities) : [r0] "r"(r0) : "cc", "memory");
+ /* STFLE is supported since z9-109 and only in z/Architecture mode. When
+ * compiling with -m31, gcc defaults to ESA mode, however, since the kernel
+ * is 64-bit, it's always z/Architecture mode at runtime. */
+ __asm__ (".machinemode push\n"
+ ".machinemode zarch\n"
+ "stfle %[facilities]\n"
+ ".machinemode pop\n"
+ : [facilities] "=Q"(facilities), [r0] "+r"(r0) :: "cc");
return is_bit_set (facilities, DFLTCC_FACILITY);
}
@@ -180,12 +179,12 @@ dfltcc (int fn, void *param,
@@ -180,12 +185,12 @@ dfltcc (int fn, void *param,
int cc;
__asm__ volatile (
@ -103,7 +111,7 @@ index ba62968..f0f848b 100644
STAP_PROBE_ASM (zlib, dfltcc_exit,
STAP_PROBE_ASM_TEMPLATE (5))
#endif
@@ -198,7 +197,7 @@ dfltcc (int fn, void *param,
@@ -198,7 +203,7 @@ dfltcc (int fn, void *param,
: [r0] "r" (r0)
, [r1] "r" (r1)
, [hist] "r" (hist)
@ -112,7 +120,7 @@ index ba62968..f0f848b 100644
, STAP_PROBE_ASM_OPERANDS (5, r2, r3, r4, r5, hist)
#endif
: "cc", "memory");
@@ -264,10 +263,16 @@ init_param (union aligned_dfltcc_param_v0 *ctx)
@@ -264,10 +269,16 @@ init_param (union aligned_dfltcc_param_v0 *ctx)
}
static void
@ -130,7 +138,7 @@ index ba62968..f0f848b 100644
send_bits (bi_reverse (param->eobs >> (15 - param->eobl), param->eobl),
param->eobl);
param->bcf = 0;
@@ -278,6 +283,7 @@ close_block (struct dfltcc_param_v0 *param)
@@ -278,6 +289,7 @@ close_block (struct dfltcc_param_v0 *param)
{
bi_close_block (param);
bi_windup ();
@ -138,7 +146,7 @@ index ba62968..f0f848b 100644
param->sbb = (param->sbb + param->eobl) % 8;
if (param->sbb != 0)
{
@@ -291,6 +297,8 @@ close_stream (struct dfltcc_param_v0 *param)
@@ -291,6 +303,8 @@ close_stream (struct dfltcc_param_v0 *param)
{
if (param->bcf)
bi_close_block (param);
@ -147,7 +155,7 @@ index ba62968..f0f848b 100644
send_bits (1, 3); /* BFINAL=1, BTYPE=00 */
bi_windup ();
put_short (0x0000);
@@ -334,7 +342,16 @@ dfltcc_deflate (int pack_level)
@@ -334,7 +348,16 @@ dfltcc_deflate (int pack_level)
{
/* Flush the output data. */
if (outcnt > OUTBUFSIZ - 8)
@ -165,7 +173,7 @@ index ba62968..f0f848b 100644
/* Close the block. */
if (param->bcf && total_in == block_threshold && !param->cf)
@@ -360,14 +377,16 @@ dfltcc_deflate (int pack_level)
@@ -360,14 +383,16 @@ dfltcc_deflate (int pack_level)
{
if (total_in == 0 && block_threshold > 0)
param->htt = HTT_FIXED;
@ -187,7 +195,7 @@ index ba62968..f0f848b 100644
/* Unmask the input data. */
insize += extra;
@@ -413,7 +432,9 @@ dfltcc_inflate (void)
@@ -413,7 +438,9 @@ dfltcc_inflate (void)
}
/* Decompress inbuf into outbuf. */
@ -198,7 +206,7 @@ index ba62968..f0f848b 100644
if (cc == DFLTCC_CC_OK)
{
/* The entire deflate stream has been successfully decompressed. */
@@ -422,6 +443,9 @@ dfltcc_inflate (void)
@@ -422,6 +449,9 @@ dfltcc_inflate (void)
if (cc == DFLTCC_CC_OP2_CORRUPT && param->oesc != 0)
{
/* The deflate stream is corrupted. */
@ -208,12 +216,3 @@ index ba62968..f0f848b 100644
return 2;
}
/* There must be more data to decompress. */
@@ -430,7 +454,7 @@ dfltcc_inflate (void)
if (param->sbb != 0)
{
/* The deflate stream has ended in the middle of a byte. Go to
- the next byte boundary, so that unzip can read CRC and length. */
+ the next byte boundary, so that unzip can read CRC and length. */
inptr++;
}

View File

@ -1,7 +1,7 @@
Summary: The GNU data compression program
Name: gzip
Version: 1.9
Release: 8%{?dist}
Release: 9%{?dist}
# info pages are under GFDL license
License: GPLv3+ and GFDL
Group: Applications/File
@ -18,7 +18,9 @@ Patch3: ibm.patch
# http://git.savannah.gnu.org/cgit/gzip.git/commit/?id=be0c5581e38332b2ffa8a4cf92076cfde02872b4
Patch4: ibm2.patch
# https://lists.gnu.org/archive/html/bug-gzip/2019-06/msg00000.html
Patch5: ibm3.patch
#Patch5: ibm3.patch
# https://lists.gnu.org/archive/html/bug-gzip/2019-07/msg00000.html
Patch6: ibm4.patch
# Fixed in upstream code.
@ -51,7 +53,8 @@ very commonly used data compression program.
%patch2 -p1 -b .gzexe
%patch3 -p1 -b .ibm
%patch4 -p1 -b .ibm2
%patch5 -p1 -b .ibm3
#%patch5 -p1 -b .ibm3
%patch6 -p1 -b .ibm4
cp %{SOURCE1} .
autoreconf
@ -112,6 +115,10 @@ fi
%{profiledir}/*
%changelog
* Mon Jul 15 2019 Jakub Martisko <jamartis@redhat.com> - 1.9-9
- Another fix for the s390 patch
Related: 1730332
* Mon May 06 2019 Jakub Martisko <jamartis@redhat.com> - 1.9-8
- Apply fixes to the previous patch
Resolves: 1659434