From debbugs-submit-bounces@debbugs.gnu.org Tue May 21 07:25:53 2019 Received: (at submit) by debbugs.gnu.org; 21 May 2019 11:25:53 +0000 Received: from localhost ([127.0.0.1]:38760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hT2u1-000264-2m for submit@debbugs.gnu.org; Tue, 21 May 2019 07:25:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hT2tz-00025s-3C for submit@debbugs.gnu.org; Tue, 21 May 2019 07:25:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:35292) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hT2tr-0003tz-46 for submit@debbugs.gnu.org; Tue, 21 May 2019 07:25:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT2tp-0001Y8-Jg for bug-gzip@gnu.org; Tue, 21 May 2019 07:25:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hT2tl-0003px-Sq for bug-gzip@gnu.org; Tue, 21 May 2019 07:25:41 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:43298 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hT2tl-0003n6-Nj for bug-gzip@gnu.org; Tue, 21 May 2019 07:25:37 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4LBIEqZ029883 for ; Tue, 21 May 2019 07:25:34 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2smg25s569-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 21 May 2019 07:25:33 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 21 May 2019 12:25:32 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 21 May 2019 12:25:30 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4LBPSlE45154444 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 May 2019 11:25:28 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 886C94C044; Tue, 21 May 2019 11:25:28 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 639314C04A; Tue, 21 May 2019 11:25:28 +0000 (GMT) Received: from white.boeblingen.de.ibm.com (unknown [9.152.96.43]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 21 May 2019 11:25:28 +0000 (GMT) From: Ilya Leoshkevich To: bug-gzip@gnu.org Subject: [PATCH] IBM Z DFLTCC: fix three data corruption issues Date: Tue, 21 May 2019 13:25:23 +0200 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19052111-0028-0000-0000-0000036FF130 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19052111-0029-0000-0000-0000242F9AEC Message-Id: <20190521112523.68548-1-iii@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-21_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905210071 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Ilya Leoshkevich X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hello, This patch fixes three bugs found during internal testing. It also adds feature detection for sys/sdt.h, adds diagnostic output when hardware decompression fails, and fixes formatting in a few places. Best regards, Ilya --- * configure.ac (AC_CHECK_HEADERS_ONCE): Add feature detection for sys/sdt.h probes. * dfltcc.c (dfltcc_cc): Minor formatting improvements. (HB_BITS): Remove. (HB_SIZE): Likewise. (dfltcc): Use sys/sdt.h feature detection. (bi_load): New function. (bi_close_block): Use bi_load. (close_stream): Fix overwriting the End-of-block Symbol. (dfltcc_deflate): Fix losing partial byte on flush. Fix setting Block-Continuation Flag when DFLTCC-CMPR outputs 0 bits and requests a retry. Minor formatting improvements. (dfltcc_inflate): Retry immediately if requested. Print the hardware error code and flush the output buffer on error. Minor formatting improvements. * tests/hufts: Ignore the hardware error code. --- configure.ac | 2 +- dfltcc.c | 63 +++++++++++++++++++++++++++++++++++----------------- tests/hufts | 2 ++ 3 files changed, 46 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index 76ac26f..b4aea34 100644 --- a/configure.ac +++ b/configure.ac @@ -263,7 +263,7 @@ AC_SUBST([ASFLAGS_config]) AC_ISC_POSIX AC_C_CONST AC_HEADER_STDC -AC_CHECK_HEADERS_ONCE(fcntl.h limits.h memory.h time.h) +AC_CHECK_HEADERS_ONCE(fcntl.h limits.h memory.h time.h sys/sdt.h) AC_CHECK_FUNCS_ONCE([chown fchmod fchown lstat siginterrupt]) AC_HEADER_DIRENT AC_TYPE_SIGNAL diff --git a/dfltcc.c b/dfltcc.c index ba62968..6ad41a8 100644 --- a/dfltcc.c +++ b/dfltcc.c @@ -22,7 +22,7 @@ #include #include -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H # include #endif @@ -39,11 +39,11 @@ typedef enum { - DFLTCC_CC_OK = 0, - DFLTCC_CC_OP1_TOO_SHORT = 1, - DFLTCC_CC_OP2_TOO_SHORT = 2, - DFLTCC_CC_OP2_CORRUPT = 2, - DFLTCC_CC_AGAIN = 3, + DFLTCC_CC_OK = 0, + DFLTCC_CC_OP1_TOO_SHORT = 1, + DFLTCC_CC_OP2_TOO_SHORT = 2, + DFLTCC_CC_OP2_CORRUPT = 2, + DFLTCC_CC_AGAIN = 3, } dfltcc_cc; #define DFLTCC_QAF 0 @@ -51,8 +51,6 @@ typedef enum #define DFLTCC_CMPR 2 #define DFLTCC_XPND 4 #define HBT_CIRCULAR (1 << 7) -/* #define HB_BITS 15 */ -/* #define HB_SIZE (1 << HB_BITS) */ #define DFLTCC_FACILITY 151 #define DFLTCC_FMT0 0 #define CVT_CRC32 0 @@ -180,12 +178,12 @@ dfltcc (int fn, void *param, int cc; __asm__ volatile ( -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H STAP_PROBE_ASM (zlib, dfltcc_entry, STAP_PROBE_ASM_TEMPLATE (5)) #endif ".insn rrf,0xb9390000,%[r2],%[r4],%[hist],0\n" -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H STAP_PROBE_ASM (zlib, dfltcc_exit, STAP_PROBE_ASM_TEMPLATE (5)) #endif @@ -198,7 +196,7 @@ dfltcc (int fn, void *param, : [r0] "r" (r0) , [r1] "r" (r1) , [hist] "r" (hist) -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H , STAP_PROBE_ASM_OPERANDS (5, r2, r3, r4, r5, hist) #endif : "cc", "memory"); @@ -264,10 +262,16 @@ init_param (union aligned_dfltcc_param_v0 *ctx) } static void -bi_close_block (struct dfltcc_param_v0 *param) +bi_load (struct dfltcc_param_v0 *param) { bi_valid = param->sbb; bi_buf = bi_valid == 0 ? 0 : outbuf[outcnt] & ((1 << bi_valid) - 1); +} + +static void +bi_close_block (struct dfltcc_param_v0 *param) +{ + bi_load (param); send_bits (bi_reverse (param->eobs >> (15 - param->eobl), param->eobl), param->eobl); param->bcf = 0; @@ -278,6 +282,7 @@ close_block (struct dfltcc_param_v0 *param) { bi_close_block (param); bi_windup (); + /* bi_windup has written out a possibly partial byte, fix up the position */ param->sbb = (param->sbb + param->eobl) % 8; if (param->sbb != 0) { @@ -291,6 +296,8 @@ close_stream (struct dfltcc_param_v0 *param) { if (param->bcf) bi_close_block (param); + else + bi_load (param); send_bits (1, 3); /* BFINAL=1, BTYPE=00 */ bi_windup (); put_short (0x0000); @@ -334,7 +341,16 @@ dfltcc_deflate (int pack_level) { /* Flush the output data. */ if (outcnt > OUTBUFSIZ - 8) - flush_outbuf (); + { + if (param->sbb == 0) + flush_outbuf (); + else + { + uch partial = outbuf[outcnt]; + flush_outbuf (); + outbuf[outcnt] = partial; + } + } /* Close the block. */ if (param->bcf && total_in == block_threshold && !param->cf) @@ -360,14 +376,16 @@ dfltcc_deflate (int pack_level) { if (total_in == 0 && block_threshold > 0) param->htt = HTT_FIXED; - else { - param->htt = HTT_DYNAMIC; - dfltcc_gdht (param); - } + else + { + param->htt = HTT_DYNAMIC; + dfltcc_gdht (param); + } } /* Compress inbuf into outbuf. */ - dfltcc_cmpr_xpnd (param, DFLTCC_CMPR); + while (dfltcc_cmpr_xpnd (param, DFLTCC_CMPR) == DFLTCC_CC_AGAIN) + ; /* Unmask the input data. */ insize += extra; @@ -413,7 +431,9 @@ dfltcc_inflate (void) } /* Decompress inbuf into outbuf. */ - dfltcc_cc cc = dfltcc_cmpr_xpnd (param, DFLTCC_XPND); + dfltcc_cc cc; + while ((cc = dfltcc_cmpr_xpnd (param, DFLTCC_XPND)) == DFLTCC_CC_AGAIN) + ; if (cc == DFLTCC_CC_OK) { /* The entire deflate stream has been successfully decompressed. */ @@ -422,6 +442,9 @@ dfltcc_inflate (void) if (cc == DFLTCC_CC_OP2_CORRUPT && param->oesc != 0) { /* The deflate stream is corrupted. */ + fprintf (stderr, "Operation-Ending-Supplemental Code 0x%x\n", + param->oesc); + flush_outbuf (); return 2; } /* There must be more data to decompress. */ @@ -430,7 +453,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++; } diff --git a/tests/hufts b/tests/hufts index cd8368a..7ca22af 100755 --- a/tests/hufts +++ b/tests/hufts @@ -28,6 +28,7 @@ returns_ 1 gzip -dc "$abs_srcdir/hufts-segv.gz" > out 2> err || fail=1 compare /dev/null out || fail=1 sed 's/.*hufts-segv.gz: /...: /' err > k; mv k err || fail=1 +grep -v 'Operation-Ending-Supplemental Code' err > k; mv k err || fail=1 compare exp err || fail=1 printf '\037\213\010\000\060\060\060\060\060\060\144\000\000\000' > bug33501 \ @@ -35,6 +36,7 @@ printf '\037\213\010\000\060\060\060\060\060\060\144\000\000\000' > bug33501 \ printf '\ngzip: stdin: invalid compressed data--format violated\n' >exp33501 \ || framework_failure_ returns_ 1 gzip -d out33501 2> err33501 || fail=1 +grep -v 'Operation-Ending-Supplemental Code' err33501 > k; mv k err33501 || fail=1 compare exp33501 err33501 || fail=1 Exit $fail -- 2.21.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 03 10:35:40 2019 Received: (at 35841) by debbugs.gnu.org; 3 Jun 2019 14:35:40 +0000 Received: from localhost ([127.0.0.1]:42664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXo3o-0000DC-7g for submit@debbugs.gnu.org; Mon, 03 Jun 2019 10:35:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXo3i-0000Cy-Bs for 35841@debbugs.gnu.org; Mon, 03 Jun 2019 10:35:38 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x53EYBLS011970 for <35841@debbugs.gnu.org>; Mon, 3 Jun 2019 10:35:32 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sw3x1n3v3-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <35841@debbugs.gnu.org>; Mon, 03 Jun 2019 10:35:31 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <35841@debbugs.gnu.org> from ; Mon, 3 Jun 2019 15:35:29 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 3 Jun 2019 15:35:26 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x53EZPcK49873032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Jun 2019 14:35:25 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3F2014C059; Mon, 3 Jun 2019 14:35:25 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 17A8C4C050; Mon, 3 Jun 2019 14:35:25 +0000 (GMT) Received: from white.boeblingen.de.ibm.com (unknown [9.152.99.180]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 3 Jun 2019 14:35:25 +0000 (GMT) From: Ilya Leoshkevich To: 35841@debbugs.gnu.org Subject: [PATCH v2] IBM Z DFLTCC: fix three data corruption issues Date: Mon, 3 Jun 2019 16:35:21 +0200 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19060314-4275-0000-0000-0000033BC53E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19060314-4276-0000-0000-0000384BD062 Message-Id: <20190603143521.7906-1-iii@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-03_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906030103 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35841 Cc: Ilya Leoshkevich X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, QEMU maintainers have found an issue related to incorrect usage of STFLE instruction [1]. I have integrated the fix into this patch. [1] https://lists.gnu.org/archive/html/qemu-devel/2019-06/msg00113.html Best regards, Ilya * configure.ac (AC_CHECK_HEADERS_ONCE): Add feature detection for sys/sdt.h probes. * dfltcc.c (dfltcc_cc): Minor formatting improvements. (HB_BITS): Remove. (HB_SIZE): Likewise. (is_dfltcc_enabled): Fix buffer overrun on newer models and incomplete initialization on older models. (dfltcc): Use sys/sdt.h feature detection. (bi_load): New function. (bi_close_block): Use bi_load. (close_stream): Fix overwriting the End-of-block Symbol. (dfltcc_deflate): Fix losing partial byte on flush. Fix setting Block-Continuation Flag when DFLTCC-CMPR outputs 0 bits and requests a retry. Minor formatting improvements. (dfltcc_inflate): Retry immediately if requested. Print the hardware error code and flush the output buffer on error. Minor formatting improvements. * tests/hufts: Ignore the hardware error code. --- configure.ac | 2 +- dfltcc.c | 68 +++++++++++++++++++++++++++++++++++----------------- tests/hufts | 2 ++ 3 files changed, 49 insertions(+), 23 deletions(-) diff --git a/configure.ac b/configure.ac index 76ac26f..b4aea34 100644 --- a/configure.ac +++ b/configure.ac @@ -263,7 +263,7 @@ AC_SUBST([ASFLAGS_config]) AC_ISC_POSIX AC_C_CONST AC_HEADER_STDC -AC_CHECK_HEADERS_ONCE(fcntl.h limits.h memory.h time.h) +AC_CHECK_HEADERS_ONCE(fcntl.h limits.h memory.h time.h sys/sdt.h) AC_CHECK_FUNCS_ONCE([chown fchmod fchown lstat siginterrupt]) AC_HEADER_DIRENT AC_TYPE_SIGNAL diff --git a/dfltcc.c b/dfltcc.c index ba62968..f0f848b 100644 --- a/dfltcc.c +++ b/dfltcc.c @@ -22,7 +22,7 @@ #include #include -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H # include #endif @@ -39,11 +39,11 @@ typedef enum { - DFLTCC_CC_OK = 0, - DFLTCC_CC_OP1_TOO_SHORT = 1, - DFLTCC_CC_OP2_TOO_SHORT = 2, - DFLTCC_CC_OP2_CORRUPT = 2, - DFLTCC_CC_AGAIN = 3, + DFLTCC_CC_OK = 0, + DFLTCC_CC_OP1_TOO_SHORT = 1, + DFLTCC_CC_OP2_TOO_SHORT = 2, + DFLTCC_CC_OP2_CORRUPT = 2, + DFLTCC_CC_AGAIN = 3, } dfltcc_cc; #define DFLTCC_QAF 0 @@ -51,8 +51,6 @@ typedef enum #define DFLTCC_CMPR 2 #define DFLTCC_XPND 4 #define HBT_CIRCULAR (1 << 7) -/* #define HB_BITS 15 */ -/* #define HB_SIZE (1 << HB_BITS) */ #define DFLTCC_FACILITY 151 #define DFLTCC_FMT0 0 #define CVT_CRC32 0 @@ -155,9 +153,10 @@ is_dfltcc_enabled (void) if (env && !strcmp (env, "0")) return 0; - register int r0 __asm__ ("r0") = sizeof facilities / 8; + 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"); + : [facilities] "=Q"(facilities), [r0] "+r"(r0) :: "cc"); return is_bit_set (facilities, DFLTCC_FACILITY); } @@ -180,12 +179,12 @@ dfltcc (int fn, void *param, int cc; __asm__ volatile ( -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H STAP_PROBE_ASM (zlib, dfltcc_entry, STAP_PROBE_ASM_TEMPLATE (5)) #endif ".insn rrf,0xb9390000,%[r2],%[r4],%[hist],0\n" -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H STAP_PROBE_ASM (zlib, dfltcc_exit, STAP_PROBE_ASM_TEMPLATE (5)) #endif @@ -198,7 +197,7 @@ dfltcc (int fn, void *param, : [r0] "r" (r0) , [r1] "r" (r1) , [hist] "r" (hist) -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H , 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) } static void -bi_close_block (struct dfltcc_param_v0 *param) +bi_load (struct dfltcc_param_v0 *param) { bi_valid = param->sbb; bi_buf = bi_valid == 0 ? 0 : outbuf[outcnt] & ((1 << bi_valid) - 1); +} + +static void +bi_close_block (struct dfltcc_param_v0 *param) +{ + bi_load (param); 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) { bi_close_block (param); bi_windup (); + /* bi_windup has written out a possibly partial byte, fix up the position */ param->sbb = (param->sbb + param->eobl) % 8; if (param->sbb != 0) { @@ -291,6 +297,8 @@ close_stream (struct dfltcc_param_v0 *param) { if (param->bcf) bi_close_block (param); + else + bi_load (param); send_bits (1, 3); /* BFINAL=1, BTYPE=00 */ bi_windup (); put_short (0x0000); @@ -334,7 +342,16 @@ dfltcc_deflate (int pack_level) { /* Flush the output data. */ if (outcnt > OUTBUFSIZ - 8) - flush_outbuf (); + { + if (param->sbb == 0) + flush_outbuf (); + else + { + uch partial = outbuf[outcnt]; + flush_outbuf (); + outbuf[outcnt] = partial; + } + } /* Close the block. */ if (param->bcf && total_in == block_threshold && !param->cf) @@ -360,14 +377,16 @@ dfltcc_deflate (int pack_level) { if (total_in == 0 && block_threshold > 0) param->htt = HTT_FIXED; - else { - param->htt = HTT_DYNAMIC; - dfltcc_gdht (param); - } + else + { + param->htt = HTT_DYNAMIC; + dfltcc_gdht (param); + } } /* Compress inbuf into outbuf. */ - dfltcc_cmpr_xpnd (param, DFLTCC_CMPR); + while (dfltcc_cmpr_xpnd (param, DFLTCC_CMPR) == DFLTCC_CC_AGAIN) + ; /* Unmask the input data. */ insize += extra; @@ -413,7 +432,9 @@ dfltcc_inflate (void) } /* Decompress inbuf into outbuf. */ - dfltcc_cc cc = dfltcc_cmpr_xpnd (param, DFLTCC_XPND); + dfltcc_cc cc; + while ((cc = dfltcc_cmpr_xpnd (param, DFLTCC_XPND)) == DFLTCC_CC_AGAIN) + ; if (cc == DFLTCC_CC_OK) { /* The entire deflate stream has been successfully decompressed. */ @@ -422,6 +443,9 @@ dfltcc_inflate (void) if (cc == DFLTCC_CC_OP2_CORRUPT && param->oesc != 0) { /* The deflate stream is corrupted. */ + fprintf (stderr, "Operation-Ending-Supplemental Code 0x%x\n", + param->oesc); + flush_outbuf (); 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++; } diff --git a/tests/hufts b/tests/hufts index cd8368a..7ca22af 100755 --- a/tests/hufts +++ b/tests/hufts @@ -28,6 +28,7 @@ returns_ 1 gzip -dc "$abs_srcdir/hufts-segv.gz" > out 2> err || fail=1 compare /dev/null out || fail=1 sed 's/.*hufts-segv.gz: /...: /' err > k; mv k err || fail=1 +grep -v 'Operation-Ending-Supplemental Code' err > k; mv k err || fail=1 compare exp err || fail=1 printf '\037\213\010\000\060\060\060\060\060\060\144\000\000\000' > bug33501 \ @@ -35,6 +36,7 @@ printf '\037\213\010\000\060\060\060\060\060\060\144\000\000\000' > bug33501 \ printf '\ngzip: stdin: invalid compressed data--format violated\n' >exp33501 \ || framework_failure_ returns_ 1 gzip -d out33501 2> err33501 || fail=1 +grep -v 'Operation-Ending-Supplemental Code' err33501 > k; mv k err33501 || fail=1 compare exp33501 err33501 || fail=1 Exit $fail -- 2.21.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 04:44:07 2019 Received: (at 35841) by debbugs.gnu.org; 18 Jun 2019 08:44:07 +0000 Received: from localhost ([127.0.0.1]:43732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hd9ip-0002rv-69 for submit@debbugs.gnu.org; Tue, 18 Jun 2019 04:44:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:12928 helo=mx0a-001b2d01.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hd9ii-0002rE-KW for 35841@debbugs.gnu.org; Tue, 18 Jun 2019 04:44:03 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5I8howt124688 for <35841@debbugs.gnu.org>; Tue, 18 Jun 2019 04:43:58 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t6uwtt3wv-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <35841@debbugs.gnu.org>; Tue, 18 Jun 2019 04:43:56 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <35841@debbugs.gnu.org> from ; Tue, 18 Jun 2019 09:43:39 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 18 Jun 2019 09:43:36 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5I8hZuv38010886 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <35841@debbugs.gnu.org>; Tue, 18 Jun 2019 08:43:35 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A0A82A4051 for <35841@debbugs.gnu.org>; Tue, 18 Jun 2019 08:43:35 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 886E2A4057 for <35841@debbugs.gnu.org>; Tue, 18 Jun 2019 08:43:35 +0000 (GMT) Received: from dyn-9-152-99-49.boeblingen.de.ibm.com (unknown [9.152.99.49]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP for <35841@debbugs.gnu.org>; Tue, 18 Jun 2019 08:43:35 +0000 (GMT) From: Ilya Leoshkevich Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: PING: [PATCH v2] IBM Z DFLTCC: fix three data corruption issues Date: Tue, 18 Jun 2019 10:43:35 +0200 References: <20190603143521.7906-1-iii@linux.ibm.com> To: 35841@debbugs.gnu.org In-Reply-To: <20190603143521.7906-1-iii@linux.ibm.com> X-Mailer: Apple Mail (2.3445.9.1) X-TM-AS-GCONF: 00 x-cbid: 19061808-0012-0000-0000-0000032A13EC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061808-0013-0000-0000-000021632FA9 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-18_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906180073 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35841 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, I would like to ping this patch, and also https://lists.gnu.org/archive/html/bug-gzip/2019-04/msg00013.html Best regards, Ilya > Am 03.06.2019 um 16:35 schrieb Ilya Leoshkevich : > > configure.ac | 2 +- > dfltcc.c | 68 +++++++++++++++++++++++++++++++++++----------------- > tests/hufts | 2 ++ > 3 files changed, 49 insertions(+), 23 deletions(-) From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 08 09:42:29 2019 Received: (at 35841) by debbugs.gnu.org; 8 Jul 2019 13:42:29 +0000 Received: from localhost ([127.0.0.1]:58066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkTuU-0006EU-HS for submit@debbugs.gnu.org; Mon, 08 Jul 2019 09:42:29 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:2518 helo=mx0a-001b2d01.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkTuJ-0006EB-9h for 35841@debbugs.gnu.org; Mon, 08 Jul 2019 09:42:20 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x68Dfurt037486 for <35841@debbugs.gnu.org>; Mon, 8 Jul 2019 09:42:12 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tm5w72seg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <35841@debbugs.gnu.org>; Mon, 08 Jul 2019 09:42:12 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <35841@debbugs.gnu.org> from ; Mon, 8 Jul 2019 14:42:11 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 8 Jul 2019 14:42:09 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x68Dg7s451314888 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 8 Jul 2019 13:42:07 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 573C4A4051; Mon, 8 Jul 2019 13:42:07 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2936EA404D; Mon, 8 Jul 2019 13:42:07 +0000 (GMT) Received: from white.boeblingen.de.ibm.com (unknown [9.152.99.31]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 8 Jul 2019 13:42:07 +0000 (GMT) From: Ilya Leoshkevich To: 35841@debbugs.gnu.org Subject: [PATCH v3] IBM Z DFLTCC: fix three data corruption issues Date: Mon, 8 Jul 2019 15:42:05 +0200 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19070813-0012-0000-0000-00000330541E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19070813-0013-0000-0000-00002169B58B Message-Id: <20190708134205.94219-1-iii@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-08_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907080172 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35841 Cc: Ilya Leoshkevich X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, SUSE maintainers have found an issue related to building zlib in 31-bit mode, which also applies to gzip: STFLE instruction can be used only in z/Architecture mode. I have integrated the fix into this patch. Best regards, Ilya * configure.ac (AC_CHECK_HEADERS_ONCE): Add feature detection for sys/sdt.h probes. * dfltcc.c (dfltcc_cc): Minor formatting improvements. (HB_BITS): Remove. (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. (close_stream): Fix overwriting the End-of-block Symbol. (dfltcc_deflate): Fix losing partial byte on flush. Fix setting Block-Continuation Flag when DFLTCC-CMPR outputs 0 bits and requests a retry. Minor formatting improvements. (dfltcc_inflate): Retry immediately if requested. Print the hardware error code and flush the output buffer on error. Minor formatting improvements. * tests/hufts: Ignore the hardware error code. --- configure.ac | 2 +- dfltcc.c | 76 ++++++++++++++++++++++++++++++++++++---------------- tests/hufts | 2 ++ 3 files changed, 56 insertions(+), 24 deletions(-) diff --git a/configure.ac b/configure.ac index 76ac26f..b4aea34 100644 --- a/configure.ac +++ b/configure.ac @@ -263,7 +263,7 @@ AC_SUBST([ASFLAGS_config]) AC_ISC_POSIX AC_C_CONST AC_HEADER_STDC -AC_CHECK_HEADERS_ONCE(fcntl.h limits.h memory.h time.h) +AC_CHECK_HEADERS_ONCE(fcntl.h limits.h memory.h time.h sys/sdt.h) AC_CHECK_FUNCS_ONCE([chown fchmod fchown lstat siginterrupt]) AC_HEADER_DIRENT AC_TYPE_SIGNAL diff --git a/dfltcc.c b/dfltcc.c index ba62968..ed3be8d 100644 --- a/dfltcc.c +++ b/dfltcc.c @@ -22,7 +22,7 @@ #include #include -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H # include #endif @@ -39,11 +39,11 @@ typedef enum { - DFLTCC_CC_OK = 0, - DFLTCC_CC_OP1_TOO_SHORT = 1, - DFLTCC_CC_OP2_TOO_SHORT = 2, - DFLTCC_CC_OP2_CORRUPT = 2, - DFLTCC_CC_AGAIN = 3, + DFLTCC_CC_OK = 0, + DFLTCC_CC_OP1_TOO_SHORT = 1, + DFLTCC_CC_OP2_TOO_SHORT = 2, + DFLTCC_CC_OP2_CORRUPT = 2, + DFLTCC_CC_AGAIN = 3, } dfltcc_cc; #define DFLTCC_QAF 0 @@ -51,8 +51,6 @@ typedef enum #define DFLTCC_CMPR 2 #define DFLTCC_XPND 4 #define HBT_CIRCULAR (1 << 7) -/* #define HB_BITS 15 */ -/* #define HB_SIZE (1 << HB_BITS) */ #define DFLTCC_FACILITY 151 #define DFLTCC_FMT0 0 #define CVT_CRC32 0 @@ -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; + /* 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 +185,12 @@ dfltcc (int fn, void *param, int cc; __asm__ volatile ( -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H STAP_PROBE_ASM (zlib, dfltcc_entry, STAP_PROBE_ASM_TEMPLATE (5)) #endif ".insn rrf,0xb9390000,%[r2],%[r4],%[hist],0\n" -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H STAP_PROBE_ASM (zlib, dfltcc_exit, STAP_PROBE_ASM_TEMPLATE (5)) #endif @@ -198,7 +203,7 @@ dfltcc (int fn, void *param, : [r0] "r" (r0) , [r1] "r" (r1) , [hist] "r" (hist) -#ifdef DFLTCC_USDT +#ifdef HAVE_SYS_SDT_H , STAP_PROBE_ASM_OPERANDS (5, r2, r3, r4, r5, hist) #endif : "cc", "memory"); @@ -264,10 +269,16 @@ init_param (union aligned_dfltcc_param_v0 *ctx) } static void -bi_close_block (struct dfltcc_param_v0 *param) +bi_load (struct dfltcc_param_v0 *param) { bi_valid = param->sbb; bi_buf = bi_valid == 0 ? 0 : outbuf[outcnt] & ((1 << bi_valid) - 1); +} + +static void +bi_close_block (struct dfltcc_param_v0 *param) +{ + bi_load (param); send_bits (bi_reverse (param->eobs >> (15 - param->eobl), param->eobl), param->eobl); param->bcf = 0; @@ -278,6 +289,7 @@ close_block (struct dfltcc_param_v0 *param) { bi_close_block (param); bi_windup (); + /* bi_windup has written out a possibly partial byte, fix up the position */ param->sbb = (param->sbb + param->eobl) % 8; if (param->sbb != 0) { @@ -291,6 +303,8 @@ close_stream (struct dfltcc_param_v0 *param) { if (param->bcf) bi_close_block (param); + else + bi_load (param); send_bits (1, 3); /* BFINAL=1, BTYPE=00 */ bi_windup (); put_short (0x0000); @@ -334,7 +348,16 @@ dfltcc_deflate (int pack_level) { /* Flush the output data. */ if (outcnt > OUTBUFSIZ - 8) - flush_outbuf (); + { + if (param->sbb == 0) + flush_outbuf (); + else + { + uch partial = outbuf[outcnt]; + flush_outbuf (); + outbuf[outcnt] = partial; + } + } /* Close the block. */ if (param->bcf && total_in == block_threshold && !param->cf) @@ -360,14 +383,16 @@ dfltcc_deflate (int pack_level) { if (total_in == 0 && block_threshold > 0) param->htt = HTT_FIXED; - else { - param->htt = HTT_DYNAMIC; - dfltcc_gdht (param); - } + else + { + param->htt = HTT_DYNAMIC; + dfltcc_gdht (param); + } } /* Compress inbuf into outbuf. */ - dfltcc_cmpr_xpnd (param, DFLTCC_CMPR); + while (dfltcc_cmpr_xpnd (param, DFLTCC_CMPR) == DFLTCC_CC_AGAIN) + ; /* Unmask the input data. */ insize += extra; @@ -413,7 +438,9 @@ dfltcc_inflate (void) } /* Decompress inbuf into outbuf. */ - dfltcc_cc cc = dfltcc_cmpr_xpnd (param, DFLTCC_XPND); + dfltcc_cc cc; + while ((cc = dfltcc_cmpr_xpnd (param, DFLTCC_XPND)) == DFLTCC_CC_AGAIN) + ; if (cc == DFLTCC_CC_OK) { /* The entire deflate stream has been successfully decompressed. */ @@ -422,6 +449,9 @@ dfltcc_inflate (void) if (cc == DFLTCC_CC_OP2_CORRUPT && param->oesc != 0) { /* The deflate stream is corrupted. */ + fprintf (stderr, "Operation-Ending-Supplemental Code 0x%x\n", + param->oesc); + flush_outbuf (); return 2; } /* There must be more data to decompress. */ @@ -430,7 +460,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++; } diff --git a/tests/hufts b/tests/hufts index cd8368a..7ca22af 100755 --- a/tests/hufts +++ b/tests/hufts @@ -28,6 +28,7 @@ returns_ 1 gzip -dc "$abs_srcdir/hufts-segv.gz" > out 2> err || fail=1 compare /dev/null out || fail=1 sed 's/.*hufts-segv.gz: /...: /' err > k; mv k err || fail=1 +grep -v 'Operation-Ending-Supplemental Code' err > k; mv k err || fail=1 compare exp err || fail=1 printf '\037\213\010\000\060\060\060\060\060\060\144\000\000\000' > bug33501 \ @@ -35,6 +36,7 @@ printf '\037\213\010\000\060\060\060\060\060\060\144\000\000\000' > bug33501 \ printf '\ngzip: stdin: invalid compressed data--format violated\n' >exp33501 \ || framework_failure_ returns_ 1 gzip -d out33501 2> err33501 || fail=1 +grep -v 'Operation-Ending-Supplemental Code' err33501 > k; mv k err33501 || fail=1 compare exp33501 err33501 || fail=1 Exit $fail -- 2.21.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 05:06:56 2019 Received: (at 35841) by debbugs.gnu.org; 6 Aug 2019 09:06:56 +0000 Received: from localhost ([127.0.0.1]:36499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huvQl-0008LX-MF for submit@debbugs.gnu.org; Tue, 06 Aug 2019 05:06:56 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37304 helo=mx0a-001b2d01.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huvQj-0008LP-KA for 35841@debbugs.gnu.org; Tue, 06 Aug 2019 05:06:54 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7692aU1041299 for <35841@debbugs.gnu.org>; Tue, 6 Aug 2019 05:06:51 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0b-001b2d01.pphosted.com with ESMTP id 2u74wsc3m1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <35841@debbugs.gnu.org>; Tue, 06 Aug 2019 05:06:51 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <35841@debbugs.gnu.org> from ; Tue, 6 Aug 2019 10:06:49 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 6 Aug 2019 10:06:45 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x7696iic46661720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Aug 2019 09:06:44 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CE5D511C066; Tue, 6 Aug 2019 09:06:44 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9A2B311C052; Tue, 6 Aug 2019 09:06:44 +0000 (GMT) Received: from dyn-9-152-97-94.boeblingen.de.ibm.com (unknown [9.152.97.94]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 6 Aug 2019 09:06:44 +0000 (GMT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: PING: [PATCH v3] IBM Z DFLTCC: fix three data corruption issues From: Ilya Leoshkevich In-Reply-To: <20190708134205.94219-1-iii@linux.ibm.com> Date: Tue, 6 Aug 2019 11:06:39 +0200 Content-Transfer-Encoding: quoted-printable References: <20190708134205.94219-1-iii@linux.ibm.com> To: 35841@debbugs.gnu.org X-Mailer: Apple Mail (2.3445.9.1) X-TM-AS-GCONF: 00 x-cbid: 19080609-4275-0000-0000-00000354ECA2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19080609-4276-0000-0000-00003865E847 Message-Id: <6C2DD122-CA3F-4038-8B22-472CBC553A65@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-08-06_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908060097 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35841 Cc: Paul Eggert , Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, I would like to ping this patch. Also, Paul asked me to document the new environment variables, I=E2=80=99ve also sent a patch for that a while ago: https://lists.gnu.org/archive/html/bug-gzip/2019-04/msg00013.html Best regards, Ilya > Am 08.07.2019 um 15:42 schrieb Ilya Leoshkevich : >=20 > Hello, >=20 > SUSE maintainers have found an issue related to building zlib in = 31-bit > mode, which also applies to gzip: STFLE instruction can be used only = in > z/Architecture mode. I have integrated the fix into this patch. >=20 > Best regards, > Ilya >=20 > * configure.ac (AC_CHECK_HEADERS_ONCE): Add feature detection for > sys/sdt.h probes. > * dfltcc.c (dfltcc_cc): Minor formatting improvements. > (HB_BITS): Remove. > (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. > (close_stream): Fix overwriting the End-of-block Symbol. > (dfltcc_deflate): Fix losing partial byte on flush. > Fix setting Block-Continuation Flag when DFLTCC-CMPR outputs 0 bits = and > requests a retry. > Minor formatting improvements. > (dfltcc_inflate): Retry immediately if requested. > Print the hardware error code and flush the output buffer on error. > Minor formatting improvements. > * tests/hufts: Ignore the hardware error code. > --- > configure.ac | 2 +- > dfltcc.c | 76 ++++++++++++++++++++++++++++++++++++---------------- > tests/hufts | 2 ++ > 3 files changed, 56 insertions(+), 24 deletions(-) >=20 > diff --git a/configure.ac b/configure.ac > index 76ac26f..b4aea34 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -263,7 +263,7 @@ AC_SUBST([ASFLAGS_config]) > AC_ISC_POSIX > AC_C_CONST > AC_HEADER_STDC > -AC_CHECK_HEADERS_ONCE(fcntl.h limits.h memory.h time.h) > +AC_CHECK_HEADERS_ONCE(fcntl.h limits.h memory.h time.h sys/sdt.h) > AC_CHECK_FUNCS_ONCE([chown fchmod fchown lstat siginterrupt]) > AC_HEADER_DIRENT > AC_TYPE_SIGNAL > diff --git a/dfltcc.c b/dfltcc.c > index ba62968..ed3be8d 100644 > --- a/dfltcc.c > +++ b/dfltcc.c > @@ -22,7 +22,7 @@ > #include > #include >=20 > -#ifdef DFLTCC_USDT > +#ifdef HAVE_SYS_SDT_H > # include > #endif >=20 > @@ -39,11 +39,11 @@ >=20 > typedef enum > { > - DFLTCC_CC_OK =3D 0, > - DFLTCC_CC_OP1_TOO_SHORT =3D 1, > - DFLTCC_CC_OP2_TOO_SHORT =3D 2, > - DFLTCC_CC_OP2_CORRUPT =3D 2, > - DFLTCC_CC_AGAIN =3D 3, > + DFLTCC_CC_OK =3D 0, > + DFLTCC_CC_OP1_TOO_SHORT =3D 1, > + DFLTCC_CC_OP2_TOO_SHORT =3D 2, > + DFLTCC_CC_OP2_CORRUPT =3D 2, > + DFLTCC_CC_AGAIN =3D 3, > } dfltcc_cc; >=20 > #define DFLTCC_QAF 0 > @@ -51,8 +51,6 @@ typedef enum > #define DFLTCC_CMPR 2 > #define DFLTCC_XPND 4 > #define HBT_CIRCULAR (1 << 7) > -/* #define HB_BITS 15 */ > -/* #define HB_SIZE (1 << HB_BITS) */ > #define DFLTCC_FACILITY 151 > #define DFLTCC_FMT0 0 > #define CVT_CRC32 0 > @@ -155,9 +153,16 @@ is_dfltcc_enabled (void) > if (env && !strcmp (env, "0")) > return 0; >=20 > - register int r0 __asm__ ("r0") =3D sizeof facilities / 8; > - __asm__ ("stfle %[facilities]\n" > - : [facilities] "=3DQ"(facilities) : [r0] "r"(r0) : "cc", = "memory"); > + memset (facilities, 0, sizeof facilities); > + register char r0 __asm__ ("r0") =3D sizeof facilities / 8 - 1; > + /* 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] "=3DQ"(facilities), [r0] "+r"(r0) :: "cc"); > return is_bit_set (facilities, DFLTCC_FACILITY); > } >=20 > @@ -180,12 +185,12 @@ dfltcc (int fn, void *param, > int cc; >=20 > __asm__ volatile ( > -#ifdef DFLTCC_USDT > +#ifdef HAVE_SYS_SDT_H > STAP_PROBE_ASM (zlib, dfltcc_entry, > STAP_PROBE_ASM_TEMPLATE (5)) > #endif > ".insn rrf,0xb9390000,%[r2],%[r4],%[hist],0\n" > -#ifdef DFLTCC_USDT > +#ifdef HAVE_SYS_SDT_H > STAP_PROBE_ASM (zlib, dfltcc_exit, > STAP_PROBE_ASM_TEMPLATE (5)) > #endif > @@ -198,7 +203,7 @@ dfltcc (int fn, void *param, > : [r0] "r" (r0) > , [r1] "r" (r1) > , [hist] "r" (hist) > -#ifdef DFLTCC_USDT > +#ifdef HAVE_SYS_SDT_H > , STAP_PROBE_ASM_OPERANDS (5, r2, r3, r4, r5, = hist) > #endif > : "cc", "memory"); > @@ -264,10 +269,16 @@ init_param (union aligned_dfltcc_param_v0 *ctx) > } >=20 > static void > -bi_close_block (struct dfltcc_param_v0 *param) > +bi_load (struct dfltcc_param_v0 *param) > { > bi_valid =3D param->sbb; > bi_buf =3D bi_valid =3D=3D 0 ? 0 : outbuf[outcnt] & ((1 << bi_valid) = - 1); > +} > + > +static void > +bi_close_block (struct dfltcc_param_v0 *param) > +{ > + bi_load (param); > send_bits (bi_reverse (param->eobs >> (15 - param->eobl), = param->eobl), > param->eobl); > param->bcf =3D 0; > @@ -278,6 +289,7 @@ close_block (struct dfltcc_param_v0 *param) > { > bi_close_block (param); > bi_windup (); > + /* bi_windup has written out a possibly partial byte, fix up the = position */ > param->sbb =3D (param->sbb + param->eobl) % 8; > if (param->sbb !=3D 0) > { > @@ -291,6 +303,8 @@ close_stream (struct dfltcc_param_v0 *param) > { > if (param->bcf) > bi_close_block (param); > + else > + bi_load (param); > send_bits (1, 3); /* BFINAL=3D1, BTYPE=3D00 */ > bi_windup (); > put_short (0x0000); > @@ -334,7 +348,16 @@ dfltcc_deflate (int pack_level) > { > /* Flush the output data. */ > if (outcnt > OUTBUFSIZ - 8) > - flush_outbuf (); > + { > + if (param->sbb =3D=3D 0) > + flush_outbuf (); > + else > + { > + uch partial =3D outbuf[outcnt]; > + flush_outbuf (); > + outbuf[outcnt] =3D partial; > + } > + } >=20 > /* Close the block. */ > if (param->bcf && total_in =3D=3D block_threshold && !param->cf) > @@ -360,14 +383,16 @@ dfltcc_deflate (int pack_level) > { > if (total_in =3D=3D 0 && block_threshold > 0) > param->htt =3D HTT_FIXED; > - else { > - param->htt =3D HTT_DYNAMIC; > - dfltcc_gdht (param); > - } > + else > + { > + param->htt =3D HTT_DYNAMIC; > + dfltcc_gdht (param); > + } > } >=20 > /* Compress inbuf into outbuf. */ > - dfltcc_cmpr_xpnd (param, DFLTCC_CMPR); > + while (dfltcc_cmpr_xpnd (param, DFLTCC_CMPR) =3D=3D = DFLTCC_CC_AGAIN) > + ; >=20 > /* Unmask the input data. */ > insize +=3D extra; > @@ -413,7 +438,9 @@ dfltcc_inflate (void) > } >=20 > /* Decompress inbuf into outbuf. */ > - dfltcc_cc cc =3D dfltcc_cmpr_xpnd (param, DFLTCC_XPND); > + dfltcc_cc cc; > + while ((cc =3D dfltcc_cmpr_xpnd (param, DFLTCC_XPND)) =3D=3D = DFLTCC_CC_AGAIN) > + ; > if (cc =3D=3D DFLTCC_CC_OK) > { > /* The entire deflate stream has been successfully = decompressed. */ > @@ -422,6 +449,9 @@ dfltcc_inflate (void) > if (cc =3D=3D DFLTCC_CC_OP2_CORRUPT && param->oesc !=3D 0) > { > /* The deflate stream is corrupted. */ > + fprintf (stderr, "Operation-Ending-Supplemental Code = 0x%x\n", > + param->oesc); > + flush_outbuf (); > return 2; > } > /* There must be more data to decompress. */ > @@ -430,7 +460,7 @@ dfltcc_inflate (void) > if (param->sbb !=3D 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++; > } >=20 > diff --git a/tests/hufts b/tests/hufts > index cd8368a..7ca22af 100755 > --- a/tests/hufts > +++ b/tests/hufts > @@ -28,6 +28,7 @@ returns_ 1 gzip -dc "$abs_srcdir/hufts-segv.gz" > = out 2> err || fail=3D1 > compare /dev/null out || fail=3D1 >=20 > sed 's/.*hufts-segv.gz: /...: /' err > k; mv k err || fail=3D1 > +grep -v 'Operation-Ending-Supplemental Code' err > k; mv k err || = fail=3D1 > compare exp err || fail=3D1 >=20 > printf '\037\213\010\000\060\060\060\060\060\060\144\000\000\000' > = bug33501 \ > @@ -35,6 +36,7 @@ printf = '\037\213\010\000\060\060\060\060\060\060\144\000\000\000' > bug33501 \ > printf '\ngzip: stdin: invalid compressed data--format violated\n' = >exp33501 \ > || framework_failure_ > returns_ 1 gzip -d out33501 2> err33501 || fail=3D1 > +grep -v 'Operation-Ending-Supplemental Code' err33501 > k; mv k = err33501 || fail=3D1 > compare exp33501 err33501 || fail=3D1 >=20 > Exit $fail > --=20 > 2.21.0 >=20 From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 03 10:37:38 2019 Received: (at 35841) by debbugs.gnu.org; 3 Sep 2019 14:37:38 +0000 Received: from localhost ([127.0.0.1]:60432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i59w9-0004HZ-IY for submit@debbugs.gnu.org; Tue, 03 Sep 2019 10:37:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:22628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i59w4-0004HO-6H for 35841@debbugs.gnu.org; Tue, 03 Sep 2019 10:37:35 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x83EZUCf054288 for <35841@debbugs.gnu.org>; Tue, 3 Sep 2019 10:37:29 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2uss0n22w0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <35841@debbugs.gnu.org>; Tue, 03 Sep 2019 10:37:27 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <35841@debbugs.gnu.org> from ; Tue, 3 Sep 2019 15:37:24 +0100 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 3 Sep 2019 15:37:21 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x83EbKD145744472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Sep 2019 14:37:20 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 50FFC11C054; Tue, 3 Sep 2019 14:37:20 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1A1ED11C052; Tue, 3 Sep 2019 14:37:20 +0000 (GMT) Received: from dyn-9-152-99-150.boeblingen.de.ibm.com (unknown [9.152.99.150]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 3 Sep 2019 14:37:20 +0000 (GMT) From: Ilya Leoshkevich Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: PING^2: [PATCH v3] IBM Z DFLTCC: fix three data corruption issues Date: Tue, 3 Sep 2019 16:37:19 +0200 References: <20190708134205.94219-1-iii@linux.ibm.com> To: 35841@debbugs.gnu.org, Paul Eggert , Jim Meyering In-Reply-To: <20190708134205.94219-1-iii@linux.ibm.com> X-Mailer: Apple Mail (2.3445.9.1) X-TM-AS-GCONF: 00 x-cbid: 19090314-0028-0000-0000-00000397207B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19090314-0029-0000-0000-000024596E65 Message-Id: <7A05968C-9586-4874-9C8E-E04D05B9DA36@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-09-03_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=4 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1909030153 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35841 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Am 08.07.2019 um 15:42 schrieb Ilya Leoshkevich : >=20 > Hello, >=20 > SUSE maintainers have found an issue related to building zlib in = 31-bit > mode, which also applies to gzip: STFLE instruction can be used only = in > z/Architecture mode. I have integrated the fix into this patch. >=20 > Best regards, > Ilya >=20 > * configure.ac (AC_CHECK_HEADERS_ONCE): Add feature detection for > sys/sdt.h probes. > * dfltcc.c (dfltcc_cc): Minor formatting improvements. > (HB_BITS): Remove. > (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. > (close_stream): Fix overwriting the End-of-block Symbol. > (dfltcc_deflate): Fix losing partial byte on flush. > Fix setting Block-Continuation Flag when DFLTCC-CMPR outputs 0 bits = and > requests a retry. > Minor formatting improvements. > (dfltcc_inflate): Retry immediately if requested. > Print the hardware error code and flush the output buffer on error. > Minor formatting improvements. > * tests/hufts: Ignore the hardware error code. > --- > configure.ac | 2 +- > dfltcc.c | 76 ++++++++++++++++++++++++++++++++++++---------------- > tests/hufts | 2 ++ > 3 files changed, 56 insertions(+), 24 deletions(-) >=20 > diff --git a/configure.ac b/configure.ac > index 76ac26f..b4aea34 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -263,7 +263,7 @@ AC_SUBST([ASFLAGS_config]) > AC_ISC_POSIX > AC_C_CONST > AC_HEADER_STDC > -AC_CHECK_HEADERS_ONCE(fcntl.h limits.h memory.h time.h) > +AC_CHECK_HEADERS_ONCE(fcntl.h limits.h memory.h time.h sys/sdt.h) > AC_CHECK_FUNCS_ONCE([chown fchmod fchown lstat siginterrupt]) > AC_HEADER_DIRENT > AC_TYPE_SIGNAL > diff --git a/dfltcc.c b/dfltcc.c > index ba62968..ed3be8d 100644 > --- a/dfltcc.c > +++ b/dfltcc.c > @@ -22,7 +22,7 @@ > #include > #include >=20 > -#ifdef DFLTCC_USDT > +#ifdef HAVE_SYS_SDT_H > # include > #endif >=20 > @@ -39,11 +39,11 @@ >=20 > typedef enum > { > - DFLTCC_CC_OK =3D 0, > - DFLTCC_CC_OP1_TOO_SHORT =3D 1, > - DFLTCC_CC_OP2_TOO_SHORT =3D 2, > - DFLTCC_CC_OP2_CORRUPT =3D 2, > - DFLTCC_CC_AGAIN =3D 3, > + DFLTCC_CC_OK =3D 0, > + DFLTCC_CC_OP1_TOO_SHORT =3D 1, > + DFLTCC_CC_OP2_TOO_SHORT =3D 2, > + DFLTCC_CC_OP2_CORRUPT =3D 2, > + DFLTCC_CC_AGAIN =3D 3, > } dfltcc_cc; >=20 > #define DFLTCC_QAF 0 > @@ -51,8 +51,6 @@ typedef enum > #define DFLTCC_CMPR 2 > #define DFLTCC_XPND 4 > #define HBT_CIRCULAR (1 << 7) > -/* #define HB_BITS 15 */ > -/* #define HB_SIZE (1 << HB_BITS) */ > #define DFLTCC_FACILITY 151 > #define DFLTCC_FMT0 0 > #define CVT_CRC32 0 > @@ -155,9 +153,16 @@ is_dfltcc_enabled (void) > if (env && !strcmp (env, "0")) > return 0; >=20 > - register int r0 __asm__ ("r0") =3D sizeof facilities / 8; > - __asm__ ("stfle %[facilities]\n" > - : [facilities] "=3DQ"(facilities) : [r0] "r"(r0) : "cc", = "memory"); > + memset (facilities, 0, sizeof facilities); > + register char r0 __asm__ ("r0") =3D sizeof facilities / 8 - 1; > + /* 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] "=3DQ"(facilities), [r0] "+r"(r0) :: "cc"); > return is_bit_set (facilities, DFLTCC_FACILITY); > } >=20 > @@ -180,12 +185,12 @@ dfltcc (int fn, void *param, > int cc; >=20 > __asm__ volatile ( > -#ifdef DFLTCC_USDT > +#ifdef HAVE_SYS_SDT_H > STAP_PROBE_ASM (zlib, dfltcc_entry, > STAP_PROBE_ASM_TEMPLATE (5)) > #endif > ".insn rrf,0xb9390000,%[r2],%[r4],%[hist],0\n" > -#ifdef DFLTCC_USDT > +#ifdef HAVE_SYS_SDT_H > STAP_PROBE_ASM (zlib, dfltcc_exit, > STAP_PROBE_ASM_TEMPLATE (5)) > #endif > @@ -198,7 +203,7 @@ dfltcc (int fn, void *param, > : [r0] "r" (r0) > , [r1] "r" (r1) > , [hist] "r" (hist) > -#ifdef DFLTCC_USDT > +#ifdef HAVE_SYS_SDT_H > , STAP_PROBE_ASM_OPERANDS (5, r2, r3, r4, r5, = hist) > #endif > : "cc", "memory"); > @@ -264,10 +269,16 @@ init_param (union aligned_dfltcc_param_v0 *ctx) > } >=20 > static void > -bi_close_block (struct dfltcc_param_v0 *param) > +bi_load (struct dfltcc_param_v0 *param) > { > bi_valid =3D param->sbb; > bi_buf =3D bi_valid =3D=3D 0 ? 0 : outbuf[outcnt] & ((1 << bi_valid) = - 1); > +} > + > +static void > +bi_close_block (struct dfltcc_param_v0 *param) > +{ > + bi_load (param); > send_bits (bi_reverse (param->eobs >> (15 - param->eobl), = param->eobl), > param->eobl); > param->bcf =3D 0; > @@ -278,6 +289,7 @@ close_block (struct dfltcc_param_v0 *param) > { > bi_close_block (param); > bi_windup (); > + /* bi_windup has written out a possibly partial byte, fix up the = position */ > param->sbb =3D (param->sbb + param->eobl) % 8; > if (param->sbb !=3D 0) > { > @@ -291,6 +303,8 @@ close_stream (struct dfltcc_param_v0 *param) > { > if (param->bcf) > bi_close_block (param); > + else > + bi_load (param); > send_bits (1, 3); /* BFINAL=3D1, BTYPE=3D00 */ > bi_windup (); > put_short (0x0000); > @@ -334,7 +348,16 @@ dfltcc_deflate (int pack_level) > { > /* Flush the output data. */ > if (outcnt > OUTBUFSIZ - 8) > - flush_outbuf (); > + { > + if (param->sbb =3D=3D 0) > + flush_outbuf (); > + else > + { > + uch partial =3D outbuf[outcnt]; > + flush_outbuf (); > + outbuf[outcnt] =3D partial; > + } > + } >=20 > /* Close the block. */ > if (param->bcf && total_in =3D=3D block_threshold && !param->cf) > @@ -360,14 +383,16 @@ dfltcc_deflate (int pack_level) > { > if (total_in =3D=3D 0 && block_threshold > 0) > param->htt =3D HTT_FIXED; > - else { > - param->htt =3D HTT_DYNAMIC; > - dfltcc_gdht (param); > - } > + else > + { > + param->htt =3D HTT_DYNAMIC; > + dfltcc_gdht (param); > + } > } >=20 > /* Compress inbuf into outbuf. */ > - dfltcc_cmpr_xpnd (param, DFLTCC_CMPR); > + while (dfltcc_cmpr_xpnd (param, DFLTCC_CMPR) =3D=3D = DFLTCC_CC_AGAIN) > + ; >=20 > /* Unmask the input data. */ > insize +=3D extra; > @@ -413,7 +438,9 @@ dfltcc_inflate (void) > } >=20 > /* Decompress inbuf into outbuf. */ > - dfltcc_cc cc =3D dfltcc_cmpr_xpnd (param, DFLTCC_XPND); > + dfltcc_cc cc; > + while ((cc =3D dfltcc_cmpr_xpnd (param, DFLTCC_XPND)) =3D=3D = DFLTCC_CC_AGAIN) > + ; > if (cc =3D=3D DFLTCC_CC_OK) > { > /* The entire deflate stream has been successfully = decompressed. */ > @@ -422,6 +449,9 @@ dfltcc_inflate (void) > if (cc =3D=3D DFLTCC_CC_OP2_CORRUPT && param->oesc !=3D 0) > { > /* The deflate stream is corrupted. */ > + fprintf (stderr, "Operation-Ending-Supplemental Code = 0x%x\n", > + param->oesc); > + flush_outbuf (); > return 2; > } > /* There must be more data to decompress. */ > @@ -430,7 +460,7 @@ dfltcc_inflate (void) > if (param->sbb !=3D 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++; > } >=20 > diff --git a/tests/hufts b/tests/hufts > index cd8368a..7ca22af 100755 > --- a/tests/hufts > +++ b/tests/hufts > @@ -28,6 +28,7 @@ returns_ 1 gzip -dc "$abs_srcdir/hufts-segv.gz" > = out 2> err || fail=3D1 > compare /dev/null out || fail=3D1 >=20 > sed 's/.*hufts-segv.gz: /...: /' err > k; mv k err || fail=3D1 > +grep -v 'Operation-Ending-Supplemental Code' err > k; mv k err || = fail=3D1 > compare exp err || fail=3D1 >=20 > printf '\037\213\010\000\060\060\060\060\060\060\144\000\000\000' > = bug33501 \ > @@ -35,6 +36,7 @@ printf = '\037\213\010\000\060\060\060\060\060\060\144\000\000\000' > bug33501 \ > printf '\ngzip: stdin: invalid compressed data--format violated\n' = >exp33501 \ > || framework_failure_ > returns_ 1 gzip -d out33501 2> err33501 || fail=3D1 > +grep -v 'Operation-Ending-Supplemental Code' err33501 > k; mv k = err33501 || fail=3D1 > compare exp33501 err33501 || fail=3D1 >=20 > Exit $fail > --=20 > 2.21.0 >=20 Gentle ping. We managed to convince distros to take this, but it would be nice to have this upstream too :-) Best regards, Ilya= From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 05 16:12:26 2020 Received: (at 35841) by debbugs.gnu.org; 5 Jan 2020 21:12:26 +0000 Received: from localhost ([127.0.0.1]:44734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioDCE-00022K-40 for submit@debbugs.gnu.org; Sun, 05 Jan 2020 16:12:26 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:32852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioDCC-000227-Mz for 35841@debbugs.gnu.org; Sun, 05 Jan 2020 16:12:25 -0500 Received: by mail-wr1-f67.google.com with SMTP id b6so47651724wrq.0 for <35841@debbugs.gnu.org>; Sun, 05 Jan 2020 13:12:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9g5COTcu3mStTJLXdTJebNEWBucigqbUednnMRZlqDc=; b=BGmKoGMqNcnP6GlBjdoq5x5p6YmRfwmbkq23Bp6YdwUb9eHHtk1gSizQAnOExc0bKk Rqq/RO+0VoZhOIKjw7/owiUJvgjdcx7wzhra7van9DMV57Tao4ELuPj2idGUVMe5FNFv uRw+7O1hiaxZSlOtD3EyG8kPFeR+jGBoPq6wvT2iwhz61bmicthG9e9ySItjHj3zYmba OzwtX4NVO/d84G7Yrs5LQwkoNq0NE+egjF9Hbn+voaQTDfqXuxGDFO4gh7/lu8Di0tYD 2JW2KWHOZrCva7bAyo70VcMD4bzO6x+elGYIbbzFS/iNLjZf14/9kT/04+59MMDeVJ/k VOgg== X-Gm-Message-State: APjAAAUD6crpr0HLYyrtk1BfJrVND2XQTG92yKKpzBvSpjN+RNuCFmvw 2bmpKquXFcr+ef6X+ZsTX0DNIsINeP6nZ7me0Rk= X-Google-Smtp-Source: APXvYqzMV1ueG8ffMoB2L3+wjdzsuBBVmWjMgnBmJoF6FJb6fzPaJdaHxIU5Lw+8gZzqw7RUXA18NFur1/wDmMdyPmg= X-Received: by 2002:adf:b64b:: with SMTP id i11mr68912608wre.58.1578258739074; Sun, 05 Jan 2020 13:12:19 -0800 (PST) MIME-Version: 1.0 References: <20190708134205.94219-1-iii@linux.ibm.com> <6C2DD122-CA3F-4038-8B22-472CBC553A65@linux.ibm.com> In-Reply-To: <6C2DD122-CA3F-4038-8B22-472CBC553A65@linux.ibm.com> From: Jim Meyering Date: Sun, 5 Jan 2020 13:12:07 -0800 Message-ID: Subject: Re: PING: [PATCH v3] IBM Z DFLTCC: fix three data corruption issues To: Ilya Leoshkevich Content-Type: multipart/mixed; boundary="00000000000081d3f8059b6aff25" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 35841 Cc: Paul Eggert , 35841@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --00000000000081d3f8059b6aff25 Content-Type: text/plain; charset="UTF-8" On Tue, Aug 6, 2019 at 2:07 AM Ilya Leoshkevich wrote: > I would like to ping this patch. Thanks for your patience. I'm prepared to push the attached. Please proofread the commit log, noting that I've included this paragraph: > SUSE maintainers have found an issue related to building zlib in 31-bit > mode, which also applies to gzip: STFLE instruction can be used only in > z/Architecture mode. I have integrated the fix into this patch. It would be best to include a bug/mail/URL reference there. Can you do provide one? --00000000000081d3f8059b6aff25 Content-Type: application/octet-stream; name="gz-dfltcc-3-bugs.diff" Content-Disposition: attachment; filename="gz-dfltcc-3-bugs.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k51idf8q0 RnJvbSA5NmEwNGIwMzIwYzcyOGZkMDI4ZTg1MzgzNzBhNDA2Y2ZlMjdmMDdkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBJbHlhIExlb3Noa2V2aWNoIDxpaWlAbGludXguaWJtLmNvbT4K RGF0ZTogTW9uLCA4IEp1bCAyMDE5IDE1OjQyOjA1ICswMjAwClN1YmplY3Q6IFtQQVRDSF0gSUJN IFogREZMVENDOiBmaXggdGhyZWUgZGF0YSBjb3JydXB0aW9uIGlzc3VlcwoKU1VTRSBtYWludGFp bmVycyBoYXZlIGZvdW5kIGFuIGlzc3VlIHJlbGF0ZWQgdG8gYnVpbGRpbmcgemxpYiBpbiAzMS1i aXQKbW9kZSwgd2hpY2ggYWxzbyBhcHBsaWVzIHRvIGd6aXA6IFNURkxFIGluc3RydWN0aW9uIGNh biBiZSB1c2VkIG9ubHkgaW4Kei9BcmNoaXRlY3R1cmUgbW9kZS4gIEkgaGF2ZSBpbnRlZ3JhdGVk IHRoZSBmaXggaW50byB0aGlzIHBhdGNoLgoKKiBjb25maWd1cmUuYWMgKEFDX0NIRUNLX0hFQURF UlNfT05DRSk6IEFkZCBmZWF0dXJlIGRldGVjdGlvbiBmb3IKc3lzL3NkdC5oIHBy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IFNUQVBfUFJP QkVfQVNNX1RFTVBMQVRFICg1KSkKICNlbmRpZgogICAgICAgICAgICAgICAgICAgICAiLmluc24g cnJmLDB4YjkzOTAwMDAsJVtyMl0sJVtyNF0sJVtoaXN0XSwwXG4iCi0jaWZkZWYgREZMVENDX1VT RFQKKyNpZmRlZiBIQVZFX1NZU19TRFRfSAogICAgICAgICAgICAgICAgICAgICBTVEFQX1BST0JF X0FTTSAoemxpYiwgZGZsdGNjX2V4aXQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBTVEFQX1BST0JFX0FTTV9URU1QTEFURSAoNSkpCiAjZW5kaWYKQEAgLTE5OCw3ICsyMDMs NyBAQCBkZmx0Y2MgKGludCBmbiwgdm9pZCAqcGFyYW0sCiAgICAgICAgICAgICAgICAgICAgIDog W3IwXSAiciIgKHIwKQogICAgICAgICAgICAgICAgICAgICAgICwgW3IxXSAiciIgKHIxKQogICAg ICAgICAgICAgICAgICAgICAgICwgW2hpc3RdICJyIiAoaGlzdCkKLSNpZmRlZiBERkxUQ0NfVVNE VAorI2lmZGVmIEhBVkVfU1lTX1NEVF9ICiAgICAgICAgICAgICAgICAgICAgICAgLCBTVEFQX1BS T0JFX0FTTV9PUEVSQU5EUyAoNSwgcjIsIHIzLCByNCwgcjUsIGhpc3QpCiAjZW5kaWYKICAgICAg ICAgICAgICAgICAgICAgOiAiY2MiLCAibWVtb3J5Iik7CkBAIC0yNjQsMTAgKzI2OSwxNiBAQCBp bml0X3BhcmFtICh1bmlvbiBhbGlnbmVkX2RmbHRjY19wYXJhbV92MCAqY3R4KQogfQoKIHN0YXRp YyB2b2lkCi1iaV9jbG9zZV9ibG9jayAoc3RydWN0IGRmbHRjY19wYXJhbV92MCAqcGFyYW0pCiti aV9sb2FkIChzdHJ1Y3QgZGZsdGNjX3BhcmFtX3YwICpwYXJhbSkKIHsKICAgYmlfdmFsaWQgPSBw YXJhbS0+c2JiOwogICBiaV9idWYgPSBiaV92YWxpZCA9PS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ZXZlbCkKICAgICB7 CiAgICAgICAvKiBGbHVzaCB0aGUgb3V0cHV0IGRhdGEuICAqLwogICAgICAgaWYgKG91dGNudCA+ IE9VVEJVRlNJWiAtIDgpCi0gICAgICAgIGZsdXNoX291dGJ1ZiAoKTsKKyAgICAgICAgeworICAg ICAgICAgIGlmIChwYXJhbS0+c2JiID09IDApCisgICAgICAgICAgICBmbHVzaF9vdXRidWYgKCk7 CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAgICAgICAgICAgICB1Y2ggcGFydGlh bCA9IG91dGJ1ZltvdXRjbnRdOworICAgICAgICAgICAgICBmbHVzaF9vdXRidWYgKCk7CisgICAg ICAgICAgICAgIG91dGJ1ZltvdXRjbnRdID0gcGFydGlhbDsKKyAgICAgICAgICAgIH0KKyAgICAg ICAgfQoKICAgICAgIC8qIENsb3NlIHRoZSBibG9jay4gICovCiAgICAgICBpZiAocGFyYW0tPmJj ZiAmJiB0b3RhbF9pbiA9PSBibG9ja190aHJlc2hvbGQgJiYgIXBhcmFtLT5jZikKQEAgLTM2MCwx NCArMzgzLDE2IEBAIGRmbHRjY19kZWZsYXRlIChpbnQgcGFja19sZXZlbCkKICAgICAgICAgewog ICAgICAgICAgIGlmICh0b3RhbF9pbiA9PSAwICYmIGJsb2NrX3RocmVzaG9sZCA+IDApCiAgICAg ICAgICAgICBwYXJhbS0+aHR0ID0gSFRUX0ZJWEVEOwotICAgICAgICAgIGVsc2UgewotICAgICAg ICAgICAgcGFyYW0tPmh0dCA9IEhUVF9EWU5BTUlDOwotICAgICAgICAgICAgZGZsdGNjX2dkaHQg KHBhcmFtKTsKLSAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAg ICAgICAgICAgICBwYXJhbS0+aHR0ID0gSFRUX0RZTkFNSUM7CisgICAgICAgICAgICAgIGRmbHRj Y19nZGh0IChwYXJhbSk7CisgICAgICAgICAgICB9CiAgICAgICAgIH0KCiAgICAgICAvKiBDb21w cmVzcy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diAnT3Bl cmF0aW9uLUVuZGluZy1TdXBwbGVtZW50YWwgQ29kZScgZXJyID4gazsgbXYgayBlcnIgfHwgZmFp bD0xCiBjb21wYXJlIGV4cCBlcnIgfHwgZmFpbD0xCgogcHJpbnRmICdcMDM3XDIxM1wwMTBcMDAw XDA2MFwwNjBcMDYwXDA2MFwwNjBcMDYwXDE0NFwwMDBcMDAwXDAwMCcgPiBidWczMzUwMSBcCkBA IC0zNSw2ICszNiw3IEBAIHByaW50ZiAnXDAzN1wyMTNcMDEwXDAwMFwwNjBcMDYwXDA2MFwwNjBc MDYwXDA2MFwxNDRcMDAwXDAwMFwwMDAnID4gYnVnMzM1MDEgXAogcHJpbnRmICdcbmd6aXA6IHN0 ZGluOiBpbnZhbGlkIGNvbXByZXNzZWQgZGF0YS0tZm9ybWF0IHZpb2xhdGVkXG4nID5leHAzMzUw MSBcCiAgIHx8IGZyYW1ld29ya19mYWlsdXJlXwogcmV0dXJuc18gMSBnemlwIC1kIDxidWczMzUw MSA+b3V0MzM1MDEgMj4gZXJyMzM1MDEgfHwgZmFpbD0xCitncmVwIC12ICdPcGVyYXRpb24tRW5k aW5nLVN1cHBsZW1lbnRhbCBDb2RlJyBlcnIzMzUwMSA+IGs7IG12IGsgZXJyMzM1MDEgfHwgZmFp bD0xCiBjb21wYXJlIGV4cDMzNTAxIGVycjMzNTAxIHx8IGZhaWw9MQoKIEV4aXQgJGZhaWwKLS0g CjIuMjQuMC4zOTAuZzA4MzM3OGNjMzUKCg== --00000000000081d3f8059b6aff25-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 10 06:48:06 2020 Received: (at 35841) by debbugs.gnu.org; 10 Jan 2020 11:48:06 +0000 Received: from localhost ([127.0.0.1]:53725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ipslp-0001pP-Qe for submit@debbugs.gnu.org; Fri, 10 Jan 2020 06:48:06 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:30380 helo=mx0a-001b2d01.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ipslo-0001pH-DV for 35841@debbugs.gnu.org; Fri, 10 Jan 2020 06:48:04 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00ABlumo006828 for <35841@debbugs.gnu.org>; Fri, 10 Jan 2020 06:48:03 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2xereh0gmp-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <35841@debbugs.gnu.org>; Fri, 10 Jan 2020 06:48:03 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <35841@debbugs.gnu.org> from ; Fri, 10 Jan 2020 11:48:02 -0000 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 10 Jan 2020 11:48:00 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 00ABlxLX40042918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Jan 2020 11:47:59 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B76DCA404D; Fri, 10 Jan 2020 11:47:59 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4D701A4051; Fri, 10 Jan 2020 11:47:59 +0000 (GMT) Received: from dyn-9-152-96-15.boeblingen.de.ibm.com (unknown [9.152.96.15]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 10 Jan 2020 11:47:59 +0000 (GMT) Subject: Re: PING: [PATCH v3] IBM Z DFLTCC: fix three data corruption issues From: Ilya Leoshkevich To: Jim Meyering Date: Fri, 10 Jan 2020 12:47:58 +0100 In-Reply-To: References: <20190708134205.94219-1-iii@linux.ibm.com> <6C2DD122-CA3F-4038-8B22-472CBC553A65@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 (3.34.2-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 20011011-0008-0000-0000-000003483C36 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20011011-0009-0000-0000-00004A6885BD Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-01-10_01:2020-01-10, 2020-01-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 impostorscore=0 malwarescore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 clxscore=1011 priorityscore=1501 adultscore=0 mlxlogscore=803 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001100101 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35841 Cc: Paul Eggert , 35841@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sun, 2020-01-05 at 13:12 -0800, Jim Meyering wrote: > On Tue, Aug 6, 2019 at 2:07 AM Ilya Leoshkevich > wrote: > > I would like to ping this patch. > > Thanks for your patience. > I'm prepared to push the attached. > Please proofread the commit log, noting that I've included this > paragraph: > > > SUSE maintainers have found an issue related to building zlib in > > 31-bit > > mode, which also applies to gzip: STFLE instruction can be used > > only in > > z/Architecture mode. I have integrated the fix into this patch. > > It would be best to include a bug/mail/URL reference there. Can you > do > provide one? As far as I remember, it was somewhat indirect: SUSE just disabled 31- bit variant (https://build.opensuse.org/request/show/708284) and we noticed that. There is an internal (?) tracking number behind that link: bsc#1137624. The commit log looks good, thanks! From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 10 16:04:01 2020 Received: (at 35841-done) by debbugs.gnu.org; 10 Jan 2020 21:04:01 +0000 Received: from localhost ([127.0.0.1]:55039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iq1Rp-0004iv-4D for submit@debbugs.gnu.org; Fri, 10 Jan 2020 16:04:01 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:35031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iq1Rm-0004ih-Nv for 35841-done@debbugs.gnu.org; Fri, 10 Jan 2020 16:03:59 -0500 Received: by mail-wr1-f66.google.com with SMTP id g17so3104867wro.2 for <35841-done@debbugs.gnu.org>; Fri, 10 Jan 2020 13:03:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mVPtyJAUrGTc/iX3VGUdTWLKhAAK/8UkZyNOHyVrdv0=; b=UGib7xPsYy/80Ht0Ylb5Hh5b9Nk2gkWC4liaS7r/oz8TExiQ9SpTlEEE0nA2qqlkcJ XZMojTeguEV9nFill8Sd23E5Hm+CEhu88FlelNHOOQpV6x3tM1mTZ1bLd8bSBXxkkkaa hga9Tb4l4VPdF9DrkbiTMpGCQGs8YEmbADJVLrFWb3SBkW+I/2V4ggyd95J5JEczQm6m Sftogt6zHOenL/LdGRTAg0KypiobbZnzp6XnlAGXPv3jZUBJ1mAuAZ1qdXMrram+s5zo GSgdrAD2lfQ73CIlZIHkxIFM1w2CzsvFYRWP+pvgw8N5AZYMfiDow4fKGxgrH7HHBlMm 0Z1Q== X-Gm-Message-State: APjAAAXz3pLnHdK6tpcLQC9c85mu4ajPkbyr40l1ImbdXeIBDrycQiYz 1z8/UKIKQw2YdXPHvFiIoH2MraKE2s3rd69hC2c= X-Google-Smtp-Source: APXvYqyBHkbRC24sOdXYeh5sxbSMqSalI4mIimR6fpYkqWRhtX3UdqFrpGQvFbI//FE6o99ML6gyEpuI+aXmYe1dQRo= X-Received: by 2002:a5d:4386:: with SMTP id i6mr5339190wrq.63.1578690232988; Fri, 10 Jan 2020 13:03:52 -0800 (PST) MIME-Version: 1.0 References: <20190708134205.94219-1-iii@linux.ibm.com> <6C2DD122-CA3F-4038-8B22-472CBC553A65@linux.ibm.com> In-Reply-To: From: Jim Meyering Date: Fri, 10 Jan 2020 13:03:40 -0800 Message-ID: Subject: Re: PING: [PATCH v3] IBM Z DFLTCC: fix three data corruption issues To: Ilya Leoshkevich Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 35841-done Cc: Paul Eggert , 35841-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Fri, Jan 10, 2020 at 3:48 AM Ilya Leoshkevich wrote: > On Sun, 2020-01-05 at 13:12 -0800, Jim Meyering wrote: > > On Tue, Aug 6, 2019 at 2:07 AM Ilya Leoshkevich > > wrote: > > > I would like to ping this patch. > > > > Thanks for your patience. > > I'm prepared to push the attached. > > Please proofread the commit log, noting that I've included this > > paragraph: > > > > > SUSE maintainers have found an issue related to building zlib in > > > 31-bit > > > mode, which also applies to gzip: STFLE instruction can be used > > > only in > > > z/Architecture mode. I have integrated the fix into this patch. > > > > It would be best to include a bug/mail/URL reference there. Can you > > do > > provide one? > > As far as I remember, it was somewhat indirect: SUSE just disabled 31- > bit variant (https://build.opensuse.org/request/show/708284) and we > noticed that. There is an internal (?) tracking number behind that > link: bsc#1137624. > > The commit log looks good, thanks! Thanks. Pushed. From unknown Sat Aug 16 18:09:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 08 Feb 2020 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator