From patchwork Thu Mar 3 10:04:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12767278 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7BDF9C433EF for ; Thu, 3 Mar 2022 10:05:08 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.282891.481729 (Exim 4.92) (envelope-from ) id 1nPiKN-0000jY-5n; Thu, 03 Mar 2022 10:04:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 282891.481729; Thu, 03 Mar 2022 10:04:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiKN-0000jR-2P; Thu, 03 Mar 2022 10:04:55 +0000 Received: by outflank-mailman (input) for mailman id 282891; Thu, 03 Mar 2022 10:04:54 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiKM-0000jF-0D for xen-devel@lists.xenproject.org; Thu, 03 Mar 2022 10:04:54 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5e7c470d-9ad9-11ec-8539-5f4723681683; Thu, 03 Mar 2022 11:04:52 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2058.outbound.protection.outlook.com [104.47.0.58]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-38-gLdoUpSfN7SGC5FW8-VIYQ-1; Thu, 03 Mar 2022 11:04:51 +0100 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR04MB3311.eurprd04.prod.outlook.com (2603:10a6:802:f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.25; Thu, 3 Mar 2022 10:04:49 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65%6]) with mapi id 15.20.5038.014; Thu, 3 Mar 2022 10:04:49 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5e7c470d-9ad9-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1646301892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ScIjlcvytU8BXsKkAKsbjjW3FXOU4vzzSPWi7azT27I=; b=H/BzgMs0s60fsQdfPoItMZOqU+BCDol3tfI3qedUlT+pYHKpF/xXJSvNpuzApMBxb0CD4p UYtgVNAJTrS/tGurndyhmfQDV13td4AeyLCPIm8+WoVi721i91BSsMYgbbuBG080ErG1j7 oStce6gINVaTRnoh3f+D4jLgkfmX41I= X-MC-Unique: gLdoUpSfN7SGC5FW8-VIYQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jn0Q6+kkh5PWhepSgu+HS3lFWwfdWbwtG5QlDuvUoXbGqgEBESTMYF/+tkbNXiGP+Oq2ofqIkdC7ko2QuTY/N9sEThX9bghQxV8/ixf8waT9exduw78Neg7e6zOl3iB0Li9ZGygzQvFWKlQj5T1h4zcUxxFuCQBOsPLkwBmOrmtWTvrWI/I/TOativZCkzdnMUMFebNgVcy1i4nubcB8h2KXOtNICUeaOnpibPPqKbTmlia12Y8SJWEt//gimgCOpAcyl2JJZzfoOcB6QDZvXzco/Nwn15TK7kqSfFJSVoXLdwACl16MN9x4LuC9vCR7kB3rSlI3MTTYUAf14FRQpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ScIjlcvytU8BXsKkAKsbjjW3FXOU4vzzSPWi7azT27I=; b=aw+eaf66yAn9qWwR0ayJqyxim9wo36I3WODkuDYa5nnhQ4huSQx3mMIDOqJhu2pRrsVEJ3X5sTqfrzTIyi1/PCGXA6vs+5GX5MSwkYsBnQAI+JcwBHR7JYK6HjZpgWpnTXYe2NYeD1f00PCoZQCXqLnBkQgOtBruIhbRPbcHn+I8kPvLBFC2YJLJ/4VgZX+rAs0drY6XOO6If+evX4YkQWNre6G70GS1lXZWRrylriMW3iWNJcayghrS717JrwY6/EJJtPulL+PogfecCV/CFron6SW7HcICcpXiHjoAQ/zJq/iKjV62edPD4C4jSAniKAvTgqY86DILyc9aPzn14g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: Date: Thu, 3 Mar 2022 11:04:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: [PATCH v3 1/7] xz: add fall-through comments to a switch statement Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu References: In-Reply-To: X-ClientProxiedBy: AS8PR07CA0037.eurprd07.prod.outlook.com (2603:10a6:20b:459::9) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 428027f1-c2b1-447d-2ff1-08d9fcfd40aa X-MS-TrafficTypeDiagnostic: VI1PR04MB3311:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6hltHTVQI53Lvf0UqAoUtAhlVO29/IoRbSpgeqlo2IuZbumzdmPfKp0CUsj7VTVgQN5eVbPkVi9EBXH5DJ+oMQ9I3oVZFa7+RRxOZTGb9k0NujC2nwk72VacDEBMdXk0d65RNjEPvcC5bSoY0f3DMfz+ob2aVloXblmTZs/5teL8/l2/RMRlyDaIY5ORwr0oVB5sspvCi5tlms47GZ9bxsUR4RDKZzVr6vESXAFYVv5gywWiCl3mfB487z0LdQNsKh8tC8/0dlklSavZ4N7/wlN+tYIvJw5kr9VOilLocIIdpFTQEV9+j6sZyQ3f5UabVt5b3d+S0yHT/iu8oQgaznRSDDk9wLRXxSD6YtSWoxlhTFBSm+UdkdVrAT6fMhRNOeTgaWQFo0ZiBEae382XKQiuXmPntxVwwKSQ/5CdAnx3vtsC5dztFqcXz9wgt/H0Zb6mnpSkJG/AbO2mKeYraVLKC6/o4KSP9dbgxGp0hvI8RR/bpElmU376ZJsN3KLA2de1XdIYnbUmlxkOXjXh5knd8eqwHOPjUSeLfxg91OvXkbvu6bIcyh6Pqt1JAuLil4qzm75gvjUBESYaSbwTqOUYi4rVMJuV55yqTkJO1RFOc/HSe3qtYEBeS+ytQwc6TZxD2o8KWsqZ+FE9VetanG9C6RESjon6VD1RQviy4DkYYBbOmyxsD0CSXKr+cyQ4jsOKWe3buG07spWP/uSMK7p6kNAHTxCT1IyeHqPi/dPKeD+RRtwHCKGQzHtq0N6S X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(83380400001)(38100700002)(5660300002)(6916009)(54906003)(66556008)(8676002)(4326008)(66476007)(66946007)(8936002)(316002)(6486002)(2616005)(186003)(26005)(508600001)(2906002)(6512007)(6506007)(31686004)(31696002)(36756003)(86362001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ghH2v8NgRGK1W7NRon0YWZBB/Du8?= =?utf-8?q?rRvlFBaQL47NLexD4XErOF2V5WYlnX6EGYFgU1YM27vEG2BSd7VWgE4DOD336Mxyn?= =?utf-8?q?40nWSqVve4G0tv9dkVC7xaRsQZWe0kS9+GVwKBKiPj4WW/O9ymqI3S7iAYy3WRdvo?= =?utf-8?q?ZxFi4835fSq5LkzmrVCReg6iASXXscf9J61DO5CeOcqu7WqKsWotWlPSD01szE9bm?= =?utf-8?q?zh5nZMT7Ep5kQuP8f+4j8gBL9iU0tZaQQ5dlcubS2UVq+y45/lIBtKfiu8sZAPymQ?= =?utf-8?q?0Nmp/5ljHeicq2yKQkGwoJjKEa+I0hcIEXVzc+HrLUzui0SWvQXv/UqnTBktNUjn4?= =?utf-8?q?xvuqL2JRa+NK5myq0+E7IAqqm0PRfQ0FKQAt8QfE00doGqQtmi9K5ygZlpFClIm8p?= =?utf-8?q?rZQCdlMWO10lZIQdlda2+6Z+Qnf15nJ8mnNlJgN0hnjJZHsywkkPGdPTnBR2Qz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cKIw89EUfeRp4m?= =?utf-8?q?R2/1mld4GmO4tDwcTRY9z1vbZskl5wXfnxlp0oE2tUfk4N+lTQBXzNXSDU8037ELZ?= =?utf-8?q?N5+2wyhsFo3wAZRxHqA877NjDiMpUEh/0LSKfQ+LI8liRZlzT2xVCtjSQIOZQpeWi?= =?utf-8?q?cQlRURHsOGXTxwwpO/mh2DpJRLGq1Donk6Lut5Zu4gvpMGQ7sws2s7mZN1eUhpQiq?= =?utf-8?q?137zXSMnYtL6XKV14BFUgjyjgNS8pxWzCctRWwN/JsaQ4T1TQRs5T6U=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 428027f1-c2b1-447d-2ff1-08d9fcfd40aa X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2022 10:04:49.3643 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WVgtC3j4Bm9DQSuNyLLd6HRNoBBJB4Q/oImdYbFNspCFb8Ee7uLxIrfs8ZwonqlLqpAWGg2SF5MMYPuDclIdkA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3311 From: Lasse Collin It's good style. I was also told that GCC 7 is more strict and might give a warning when such comments are missing. Suggested-by: Andrei Borzenkov Signed-off-by: Lasse Collin Signed-off-by: Jiri Kosina [Linux commit: 5a244f48ecbbd03a11eb84819c5c599db81823ee] Signed-off-by: Jan Beulich Reviewed-by: Luca Fancellu --- Linux has meanwhile further moved to using the "fallthrough" pseudo- keyword, but us doing so requires the tool stack to first make this available for use in at least stubdom builds. --- v2: Retain the other S-o-b, for lack of mailing list source of the original submission. --- a/xen/common/xz/dec_stream.c +++ b/xen/common/xz/dec_stream.c @@ -583,6 +583,8 @@ static enum xz_ret __init dec_main(struc if (ret != XZ_OK) return ret; + /* Fall through */ + case SEQ_BLOCK_START: /* We need one byte of input to continue. */ if (b->in_pos == b->in_size) @@ -606,6 +608,8 @@ static enum xz_ret __init dec_main(struc s->temp.pos = 0; s->sequence = SEQ_BLOCK_HEADER; + /* Fall through */ + case SEQ_BLOCK_HEADER: if (!fill_temp(s, b)) return XZ_OK; @@ -616,6 +620,8 @@ static enum xz_ret __init dec_main(struc s->sequence = SEQ_BLOCK_UNCOMPRESS; + /* Fall through */ + case SEQ_BLOCK_UNCOMPRESS: ret = dec_block(s, b); if (ret != XZ_STREAM_END) @@ -623,6 +629,8 @@ static enum xz_ret __init dec_main(struc s->sequence = SEQ_BLOCK_PADDING; + /* Fall through */ + case SEQ_BLOCK_PADDING: /* * Size of Compressed Data + Block Padding @@ -643,6 +651,8 @@ static enum xz_ret __init dec_main(struc s->sequence = SEQ_BLOCK_CHECK; + /* Fall through */ + case SEQ_BLOCK_CHECK: if (s->check_type == XZ_CHECK_CRC32) { ret = crc32_validate(s, b); @@ -665,6 +675,8 @@ static enum xz_ret __init dec_main(struc s->sequence = SEQ_INDEX_PADDING; + /* Fall through */ + case SEQ_INDEX_PADDING: while ((s->index.size + (b->in_pos - s->in_start)) & 3) { @@ -687,6 +699,8 @@ static enum xz_ret __init dec_main(struc s->sequence = SEQ_INDEX_CRC32; + /* Fall through */ + case SEQ_INDEX_CRC32: ret = crc32_validate(s, b); if (ret != XZ_STREAM_END) @@ -695,6 +709,8 @@ static enum xz_ret __init dec_main(struc s->temp.size = STREAM_HEADER_SIZE; s->sequence = SEQ_STREAM_FOOTER; + /* Fall through */ + case SEQ_STREAM_FOOTER: if (!fill_temp(s, b)) return XZ_OK; From patchwork Thu Mar 3 10:05:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12767279 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3B698C433EF for ; Thu, 3 Mar 2022 10:05:39 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.282898.481741 (Exim 4.92) (envelope-from ) id 1nPiKr-0001M8-J5; Thu, 03 Mar 2022 10:05:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 282898.481741; Thu, 03 Mar 2022 10:05:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiKr-0001M1-FV; Thu, 03 Mar 2022 10:05:25 +0000 Received: by outflank-mailman (input) for mailman id 282898; Thu, 03 Mar 2022 10:05:24 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiKq-0001Ia-5B for xen-devel@lists.xenproject.org; Thu, 03 Mar 2022 10:05:24 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 70ae4b13-9ad9-11ec-8eba-a37418f5ba1a; Thu, 03 Mar 2022 11:05:23 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2056.outbound.protection.outlook.com [104.47.0.56]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-10-lVBXtSbMPgubX3W_YL5Jkw-1; Thu, 03 Mar 2022 11:05:22 +0100 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR04MB3311.eurprd04.prod.outlook.com (2603:10a6:802:f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.25; Thu, 3 Mar 2022 10:05:20 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65%6]) with mapi id 15.20.5038.014; Thu, 3 Mar 2022 10:05:20 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 70ae4b13-9ad9-11ec-8eba-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1646301923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A25zh5BjjDRbl+SbPOMZedHC8tdiYgioJS38R9kRtSE=; b=Ma7CvuTUnH1TWKgYSajr8Weznh8m23GDGeLmoHyvZJSSqF2B5sRhYPjJkP7srjBo6IjR69 D5CF99rMzMT1ds2T8L70NpwR4/J8kjiF0/AZygZSUS8lbF9FISdHFDrnKS0+LG/DHjmCt4 Utw6kDSOe2PJC8ottYqEtM5Ws0hz/Mg= X-MC-Unique: lVBXtSbMPgubX3W_YL5Jkw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BFbfilM322kOSYz/nQ7WXY94r11oTuVP/kEs0dxhSFUov+pxwEU9/v4Ov287wRfSX5j0pd5qu923K5ZlxjXN2l8KuuQrcfXMzHQ9dLQxEEMKmXX6cI3SfZc8Evg9McapynvozQu3144xxKioKZWGvI59983CaGdychJY9V4i8xYgoPe7/Oa1Lr8mtOzZ8yMtYwBcXF1sZbDCSN5GxHMhWjDC0vSHsBxXxFscvAgHJUstfcek2R7qC6UPrhXRg8dUSYc8n+aIn6UvbAy+HelGjFNrHEORCoQuI2C59w/zcXe/6ovby29ru+jJNgSGo3I0zF0F8vFYiopKHP4dubDZpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=A25zh5BjjDRbl+SbPOMZedHC8tdiYgioJS38R9kRtSE=; b=JleOcDtZ6i8zfGK82DZSp/Kh+JZin+gliWqD4zGavMJ4e2uirvd6yRmJ/jSYFwakY4+rBDEmwE4t/A5U6zwsw381I09FgSZGqa0drxEVHLiA+2ourk8Q7dfTPD7U7C1A3Py85x9aiCFwEJxCkRfSE4m1YvBsOSAXtFbv909NvBO0Kkjv2bDTv79Ep/WSbiy/W+8ZHuJW5AP90mGMrG+ut1gssFu6b8fudE+R08H2TUysqUL+w1nMl+gk12PijS+UsWu6gCbEDvghpwyvXMZStkHxuhp3/L3MEUhzbjOPU5L/o/K2v0WO14U/+GrNrAe1lry4Rui+tjBXl1bipPXjNg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <96b6ce72-9c64-1ca7-56fb-63a30cd8591b@suse.com> Date: Thu, 3 Mar 2022 11:05:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: [PATCH v3 2/7] xz: fix XZ_DYNALLOC to avoid useless memory reallocations Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu References: In-Reply-To: X-ClientProxiedBy: AS8PR07CA0046.eurprd07.prod.outlook.com (2603:10a6:20b:459::18) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9a39c6b9-221a-49c2-9392-08d9fcfd531a X-MS-TrafficTypeDiagnostic: VI1PR04MB3311:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4cBCAVLdWfc/iqTj21zyN6NN7PNMjUjHYmmzb0N/K2N5RimRvbG9TSK83OkExGpUSFoUK5N+bbIiM93cfFIVJyPjJ/FUDBmijoMEVv/Eyao+RIHfBWz4pvs0g9Y4lApnsFXhbgR4adD6k7sm0RZqiZ7fFzI3FNxAK6THJSeiOA2ulgbXLj7zL0RoOcMrZK2OiZZEEHkDQjKo+Yi9plArlP2InB6gI/qqUu/a8FyfgyXis+p1QA3I3ArJH9vnHrl2ZwFCxYWbjrWVkItqrKqV400MC1wibj396hrogqIt2VBMnXAT8e80oJ9FuoMnfW8JkyIiPH7bjsAil0DSxnAPyWfz6/NShYWd7qZPmw+HW4Ov3mbQ2GUm3xBfxdv5MufKY4rDMK79v/IAVw7ubE5YHNSvztbBuegPHRooH2UsMvb0Q7D6bP7FeXDN8oBvsKQQmdIJbAf2IIezy4rUT8gakYO23vvGmBQQztsj9LWnaOAuC+8J7gUaXN+IsNx0C/O2aEznb5Sj3rHPw+ZfY6MuZ0qVLz1TUO/fqYEUXptuYNkr3oicjg2nlS4u6OaJxyiLnTY5Qn1ue8h2HsBhhickqbJ5rDXn5C0VALBvkviRr/R3AuynIV+hDdT5PGVEdhcIuArnjPhA42xPJ5HujLtI8wSZr8GTo0lcWogMSafiDm7l/E9Ze7+btOZ5OKZXze0FF/smquKjUcBZzqPXQBKWekSBXlPFyLd5Eig5nn8pXUYH9ZrrzZ5AoKHLOcjJQOF5urlQPRwP0PQO86WDsp9yuxIUad/ZtfkWD507yuYlnvhPMnDhNSOSferJGQ9FR+r7RET6ycxR80dYLgmtQAqCWA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(38100700002)(5660300002)(6916009)(54906003)(966005)(66556008)(8676002)(4326008)(66476007)(66946007)(8936002)(316002)(6486002)(2616005)(186003)(26005)(508600001)(2906002)(6512007)(6506007)(6666004)(31686004)(31696002)(36756003)(86362001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?rSFEt0BGsCuIkiCojppZ3/S4u6U+?= =?utf-8?q?F31LJBaPcDlVMb7oUPcpqXvuK+7DR8IXoHwJIPWVSAXnCkHsdiVLpUkv9jk1McH1Y?= =?utf-8?q?vRVHycxiLnWHYFhiflcBkRsJqpCTDRqz0RElCkTrNM1nWzdMeKj4U91oxMJDkjWVe?= =?utf-8?q?j+8+3+WIb63XyjzpPiegaxg9DIRQJtwb4wpo0E1jkv1zJZVWEdAzsfJy0i9qwkHk+?= =?utf-8?q?Ysew+1dMmoH/ErCjICV3dmkbwWVlTFvO7WTXc8KOmdunUv4lcA0gx9vbBqz5/S87a?= =?utf-8?q?NfBR1xuDmrYY+iZOUie1oFGi+ng8HV69xZk92O7GcZ7cvRVVNy6NGphev9nkl0YZw?= =?utf-8?q?/Hxbw5FrUGNKQPDdKemHsEAws4VwC+1GE7jP5/sTnKppYR5hxe+zQ4GEnsChzaTJH?= =?utf-8?q?rpxQzayA05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HuuuU+V6V9ka6IDB3afUpssAmBRb43coK2fKpSV9QnsisTsK?= =?utf-8?q?5tBrdyAF313xo1jIYIMkT/W0ApeK+N3+3aBhuTZvElz6/YLNu97qNw1wDR1lF0P3x?= =?utf-8?q?buFN+/oOFopAUz+0JDZxFpfaklGqOHzuujkfu+gM1792s3Z7Ei55eOfyWHipe7LT0?= =?utf-8?q?cB8A5+v6G0C9G24eDB2xaUMBqVCX/ZXmHcoPTFHRDsVOGG8yoUUHHIseIwz6NE2i2?= =?utf-8?q?qCQ3nBnx7RNOI5xQuGkswMM53xVqatG3mcCigTwdN61BHlimLIT23Ek=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a39c6b9-221a-49c2-9392-08d9fcfd531a X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2022 10:05:20.2530 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: r2pVIqO0g/cJMcHQCC8gGNWYht9VLAGr33eqv9lyKMBsgeHThgKnhYsrHq7Hw6/xnzFTlrm49uIuk3c2HkPSPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3311 From: Lasse Collin s->dict.allocated was initialized to 0 but never set after a successful allocation, thus the code always thought that the dictionary buffer has to be reallocated. Link: http://lkml.kernel.org/r/20191104185107.3b6330df@tukaani.org Reported-by: Yu Sun Signed-off-by: Lasse Collin Acked-by: Daniel Walker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit: 8e20ba2e53fc6198cbfbcc700e9f884157052a8d] Signed-off-by: Jan Beulich Reviewed-by: Luca Fancellu --- v3: Retain all Linux side S-o-b, as per 5e326b61693c. --- a/xen/common/xz/dec_lzma2.c +++ b/xen/common/xz/dec_lzma2.c @@ -1146,6 +1146,7 @@ XZ_EXTERN enum xz_ret __init xz_dec_lzma if (DEC_IS_DYNALLOC(s->dict.mode)) { if (s->dict.allocated < s->dict.size) { + s->dict.allocated = s->dict.size; large_free(s->dict.buf); s->dict.buf = large_malloc(s->dict.size); if (s->dict.buf == NULL) { From patchwork Thu Mar 3 10:05:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12767280 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E893C433F5 for ; Thu, 3 Mar 2022 10:06:07 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.282905.481752 (Exim 4.92) (envelope-from ) id 1nPiLJ-0001sY-Rd; Thu, 03 Mar 2022 10:05:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 282905.481752; Thu, 03 Mar 2022 10:05:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiLJ-0001sP-OE; Thu, 03 Mar 2022 10:05:53 +0000 Received: by outflank-mailman (input) for mailman id 282905; Thu, 03 Mar 2022 10:05:52 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiLI-0001Ia-CD for xen-devel@lists.xenproject.org; Thu, 03 Mar 2022 10:05:52 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8011eb29-9ad9-11ec-8eba-a37418f5ba1a; Thu, 03 Mar 2022 11:05:49 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2057.outbound.protection.outlook.com [104.47.0.57]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-4-8CtoAN92OBCwP41myE49Rw-1; Thu, 03 Mar 2022 11:05:47 +0100 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR04MB3311.eurprd04.prod.outlook.com (2603:10a6:802:f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.25; Thu, 3 Mar 2022 10:05:46 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65%6]) with mapi id 15.20.5038.014; Thu, 3 Mar 2022 10:05:46 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8011eb29-9ad9-11ec-8eba-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1646301948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=czqxhntDmPvVjF13ScNMIxw0RdrjFUc3x6QkChagSno=; b=Mgsg8p9rLiOMzE26mWS+WGjsPEjMJftPkkt1owSwN07Y5fhtTiu/KBL+TJRpx6PaGwiSFe txe7kKnE/Hj6WpcNbIaL/ZlIKVA3RggaTxAxHY45KonXWA9q9fEsdd704fpfh1Khm5Ud3X TsGLt8y5yQcTifFqL+j5Rk5xzI8RprE= X-MC-Unique: 8CtoAN92OBCwP41myE49Rw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mWgN3gEVs+Go2tXmB/MTgSsMTUWg4xmwH0Y1dFLeb/0AcRpKTpEbBiIFgkSx6tlR99FwjEOY0/8YJYORIu+xxoHyGrFzYF6uxdybCDbkdxewtHiviGYdPsgKCUfnDe5STk/FSnOM0LjI6z6A1ttLFQ3C4sMEe0bYqcXnb5fC3wd0nOZL1JbXSNCal8Q3FuDkTPA6zQIYjSbyqvfT9P4ZN5i1PPg+bRWePaTN/TnIVIKnauW73Yx+xZlMV3vYzpkVx2jOvsRi7kt22frpsN3bunqXFVeKGncCHS4s3GbdtT0MofiBL0C0EkpckGvy60G2mZSrc+YEHebP2RE1SFexXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=czqxhntDmPvVjF13ScNMIxw0RdrjFUc3x6QkChagSno=; b=kOMm8N+JttOmqIzFUyB1KWcvLpkdRi1V77Z6TbZan5U/rBsZR/BZlmgqDj4uNOm+ZndTDoR1Z0xM7YDy/QDABtNriPMup6v0EYuwP0kOFUyIheGIGQdFBZZrcm4Jwft9hpm+DAItUv6uKcZl1N5yI2RGbjTFjuLHmivi+V4s5sjezRL5QpeqUhHNy2srhkXi9rlGLlUP7itCeoHt2C/f+SstAgGkXcdY0F+AgMDogylXSK7J87Xw9Bo12F8scNso79DzadgoZJ+FTk2SG7ln4el5jPDFKIUTcVsQU30ZKXMo5NKQpdIe1ugPpvwxHPIwm+72d1wY7QDUo4qfWEWkWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <6f81b2aa-cd27-d83e-790d-b80c41619c11@suse.com> Date: Thu, 3 Mar 2022 11:05:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: [PATCH v3 3/7] decompressors: fix spelling mistakes Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu References: In-Reply-To: X-ClientProxiedBy: AS9PR06CA0354.eurprd06.prod.outlook.com (2603:10a6:20b:466::9) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d4766f35-6c31-451f-3a1e-08d9fcfd6297 X-MS-TrafficTypeDiagnostic: VI1PR04MB3311:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XcrSoDsQZBnE0/lr6ZUQtVQH1HazpTZsUbJavvj57ebP9Vs5XXAen1sf491Y8ToIANH1G483N9rPNL55je/bvDvSdLYhqiC6yrdoFjm9iDedzJ7WkvsCoN9sRgBQlLeXHniEOH9cyDz2Dqd2smezMvxDapu/J+ZSYOsntWp/WMRMHo0u+IzelfaajS8XJXMuZL+XE0C42Und9bXbMvB8XLdyJQvIc/pEp+wq7ZlFqEOcswWjVBrNK0yF2kq6wt5NYBDZ7GwmFDrXgZWuaNsKRRk3e9wmmmIE2kCqB1foS1uvBoI4r+CNzNXZr5lqIIpAgDT2M8jKjrSTh+8mqrripnPzv6RPjnCXPBcoSEY3i+0yEQ1gfwaO0Z24MmFypM9wfFC8OLNPokzTravzsK1mJtz72TL8rm9pCiREo9SU4xwhYwe8LZLkH3oUmSZES223YgckrhODD+SKUY/JjSnkbQbxFJoQ+1GkerhFVwWHxWoKrl4hjMnYSB9/n0GGMzV2x+bK9No2L8UqqQ8ciGp99z7sHoQWfswaR4B5w1ZFuNj42WIAeV9ePJfqsWc7RBbtObQEhZdw/0vRme7VSXCqhHvt8CO2JI5/C04iz6TT3CK8ca5kOYSt2R9DcovNWJRQZwZjYvx9Gx0k30LV1BmGcq9bKRyEgMxpc/dOKU3dws/EOaWVBCv72wT6m2D9FuiylMp+iyMGk341v1xNXiHRDubAHKsqnro4llT96RGd9YXwSUrEf3O7KmE2PPrwuPoVh6a6UgG8dWsMAxsJeH7JU/d9ETLoGxT8cnRHJEfwwIAuWU1FmyUqHe3wXnhvUIQU3/E81RdkMMYluJlMPZebLw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(83380400001)(38100700002)(5660300002)(6916009)(54906003)(966005)(66556008)(8676002)(4326008)(66476007)(66946007)(8936002)(316002)(6486002)(2616005)(186003)(26005)(508600001)(2906002)(6512007)(6506007)(31686004)(31696002)(36756003)(86362001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?PQRDx1xvAKIUFXR9+ogq47YGE49q?= =?utf-8?q?NT9UEd8rHwOulAAAYOVaffa/68C08tD7WEOVp+k1ZpMwHj8MdtUGL0i/mAMQRvLSh?= =?utf-8?q?yyi+hZ5m1FhGyLigljaM2Ie910CO9KbAjLa83EQFQ64HOtmanZjmQppSEHYYkio0H?= =?utf-8?q?C+qlAy2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CLNRl8kK/foS3Ybr1Lm7919yz2AYh4+KOqOB6l2s5192TdpgqTbBydJ4pkICo7o?= =?utf-8?q?/rWR/6TrX3AC0YfNWc0MZI8v9Sx2zlnlSH2Hg0DLo1Bm6g5mWG73F4RKWfTfBUH1e?= =?utf-8?q?7gvJnAfG9iqq7yd9a1swNru9yoQmq/bRLEuWmGt7JNJSmi7lXlqSirRO2I2bVgTTD?= =?utf-8?q?Nl1xPZwvHcAUrb+hlL4SuHZFYTn92B2y2s3woxfINV6ZaTJryDaOnOB2mx1M2WVsz?= =?utf-8?q?YQIc7nqzJeyP9yyUmZzKOClzNrPu3fMPjlemnPnvC2eIkFfZJh4QdEo3ITEpj37ws?= =?utf-8?q?AeCzGfFL5qiD10EoPyczFyg81HkiUEMkrBrkgXFUQHd3/mwwxsgUJ3aLupspgKJML?= =?utf-8?q?okF/kobZldgLLsTGdSzWGBqgC6IdWD9pPzBFNCtj0n1jCJ/CU6dUfQ3msuxThzX5w?= =?utf-8?q?m0SrKLdYnCzzAstge3tTqpSxQ+AMLsBeUckNXEdQ4aLWNSrNAe+f4g0eEzmoRVBI6?= =?utf-8?q?g/OiZDeNtdJg48v85Upag3mDMgL0Zv7fPYoweQctqqXg1CFq7i/kO/A=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4766f35-6c31-451f-3a1e-08d9fcfd6297 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2022 10:05:46.2045 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fOngXPT+0olejHMQW+UB/y9caSKV33OF4nOYTLQWBIPgee1jdbu4/rQLAC0TYVGVo3dhzQN7f6i8W1LaBJvOGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3311 From: Zhen Lei Fix some spelling mistakes in comments: sentinal ==> sentinel compresed ==> compressed immediatelly ==> immediately dervied ==> derived splitted ==> split nore ==> not independed ==> independent asumed ==> assumed Link: https://lkml.kernel.org/r/20210604085656.12257-1-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit: 05911c5d964956442d17fe21db239de5a1dace4a] Signed-off-by: Jan Beulich Reviewed-by: Luca Fancellu --- v3: Retain all Linux side S-o-b, as per 5e326b61693c. --- a/xen/common/bunzip2.c +++ b/xen/common/bunzip2.c @@ -73,7 +73,7 @@ /* This is what we know about each Huffman coding group */ struct group_data { - /* We have an extra slot at the end of limit[] for a sentinal value. */ + /* We have an extra slot at the end of limit[] for a sentinel value. */ int limit[MAX_HUFCODE_BITS+1]; int base[MAX_HUFCODE_BITS]; int permute[MAX_SYMBOLS]; @@ -326,7 +326,7 @@ static int __init get_next_block(struct pp <<= 1; base[i+1] = pp-(t += temp[i]); } - limit[maxLen+1] = INT_MAX; /* Sentinal value for + limit[maxLen+1] = INT_MAX; /* Sentinel value for * reading next sym. */ limit[maxLen] = pp+temp[maxLen]-1; base[minLen] = 0; --- a/xen/common/unxz.c +++ b/xen/common/unxz.c @@ -23,7 +23,7 @@ * uncompressible. Thus, we must look for worst-case expansion when the * compressor is encoding uncompressible data. * - * The structure of the .xz file in case of a compresed kernel is as follows. + * The structure of the .xz file in case of a compressed kernel is as follows. * Sizes (as bytes) of the fields are in parenthesis. * * Stream Header (12) --- a/xen/common/unzstd.c +++ b/xen/common/unzstd.c @@ -16,7 +16,7 @@ * uncompressible. Thus, we must look for worst-case expansion when the * compressor is encoding uncompressible data. * - * The structure of the .zst file in case of a compresed kernel is as follows. + * The structure of the .zst file in case of a compressed kernel is as follows. * Maximum sizes (as bytes) of the fields are in parenthesis. * * Frame Header: (18) --- a/xen/common/xz/dec_bcj.c +++ b/xen/common/xz/dec_bcj.c @@ -422,7 +422,7 @@ XZ_EXTERN enum xz_ret __init xz_dec_bcj_ /* * Flush pending already filtered data to the output buffer. Return - * immediatelly if we couldn't flush everything, or if the next + * immediately if we couldn't flush everything, or if the next * filter in the chain had already returned XZ_STREAM_END. */ if (s->temp.filtered > 0) { --- a/xen/common/xz/dec_lzma2.c +++ b/xen/common/xz/dec_lzma2.c @@ -147,8 +147,8 @@ struct lzma_dec { /* * LZMA properties or related bit masks (number of literal - * context bits, a mask dervied from the number of literal - * position bits, and a mask dervied from the number + * context bits, a mask derived from the number of literal + * position bits, and a mask derived from the number * position bits) */ uint32_t lc; @@ -484,7 +484,7 @@ static always_inline void rc_normalize(s } /* - * Decode one bit. In some versions, this function has been splitted in three + * Decode one bit. In some versions, this function has been split in three * functions so that the compiler is supposed to be able to more easily avoid * an extra branch. In this particular version of the LZMA decoder, this * doesn't seem to be a good idea (tested with GCC 3.3.6, 3.4.6, and 4.3.3 @@ -761,7 +761,7 @@ static bool_t __init lzma_main(struct xz } /* - * Reset the LZMA decoder and range decoder state. Dictionary is nore reset + * Reset the LZMA decoder and range decoder state. Dictionary is not reset * here, because LZMA state may be reset without resetting the dictionary. */ static void __init lzma_reset(struct xz_dec_lzma2 *s) --- a/xen/common/zstd/huf.h +++ b/xen/common/zstd/huf.h @@ -131,7 +131,7 @@ typedef enum { HUF_repeat_none, /**< Cannot use the previous table */ HUF_repeat_check, /**< Can use the previous table but it must be checked. Note : The previous table must have been constructed by HUF_compress{1, 4}X_repeat */ - HUF_repeat_valid /**< Can use the previous table and it is asumed to be valid */ + HUF_repeat_valid /**< Can use the previous table and it is assumed to be valid */ } HUF_repeat; /** HUF_compress4X_repeat() : * Same as HUF_compress4X_wksp(), but considers using hufTable if *repeat != HUF_repeat_none. From patchwork Thu Mar 3 10:06:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12767281 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 905E1C433F5 for ; Thu, 3 Mar 2022 10:06:29 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.282911.481774 (Exim 4.92) (envelope-from ) id 1nPiLi-0002wk-HG; Thu, 03 Mar 2022 10:06:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 282911.481774; Thu, 03 Mar 2022 10:06:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiLi-0002wZ-DF; Thu, 03 Mar 2022 10:06:18 +0000 Received: by outflank-mailman (input) for mailman id 282911; Thu, 03 Mar 2022 10:06:16 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiLg-0001Ia-Md for xen-devel@lists.xenproject.org; Thu, 03 Mar 2022 10:06:16 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8ff7ac00-9ad9-11ec-8eba-a37418f5ba1a; Thu, 03 Mar 2022 11:06:15 +0100 (CET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2056.outbound.protection.outlook.com [104.47.13.56]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-6-Y0uCy6dQPaWPXR-MYMKb2Q-1; Thu, 03 Mar 2022 11:06:14 +0100 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by DBAPR04MB7256.eurprd04.prod.outlook.com (2603:10a6:10:1a3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Thu, 3 Mar 2022 10:06:12 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65%6]) with mapi id 15.20.5038.014; Thu, 3 Mar 2022 10:06:12 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8ff7ac00-9ad9-11ec-8eba-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1646301975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dWQiEscHMitckPtyowVTpPJHsuAivRldTvGBRFOefis=; b=EWvubYFjPAFE3G12+Ya8iogmoE4A8iMhERuFpHP55DJ+Ad9CIhnL1uET6ixxclFnHG72Tu nyxa21ioGaFQhKOqUohwKtnCQDwzeUbMWLER7HvxZv2SVne6aOsq2oIN/er0wPHmyWXkts AI0UtCmukBZ+Y7ytRRwKfrJ/LQav4g0= X-MC-Unique: Y0uCy6dQPaWPXR-MYMKb2Q-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iZSHlQYFNNgv9wilX+mNqihXLn1O31wR1A0IuQjoNCjHM41bRt+md6SuVAggjT3Mhp5DC/sTQoU8NgqEkrbb59nH8mBBx6d2YO19lbT18vOTqmTtkgGI/o6ttMNk/s2T+Ix5Tek0rAxrjE5nGg76GcNEJOHMU/AHdkqEZJpO083BI5N2TUNtbN4LhsfQrsdIPJljiO65qthntZdD9UUBwwxipuVNc09+Nhzvmoc5+OY2CoSoLbAWC54nP98mruniZwaTXlpEPJvr43H2X+LAEPXW7PWAxHaVfOeJVc2+F/bAVFzFe3lQeAnp6/RtciYH2Ej0fi7AN9ST3596QzHPnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dWQiEscHMitckPtyowVTpPJHsuAivRldTvGBRFOefis=; b=TDUFvB2C+Os5lzooH53pJ66m4lpwWupxyLZtyb74dvcSAwtP6So5w9kESvI5G7lKnZQurhzR9wqlu7MEb6UssDHUod2aHllHny5u4xveFwyByBfL7cXmtDqhgCbp1g1tibZb4PnpuYd8Vb1qEWh2LVhFKH/coV5uy2xweFwJmBVKpkJPGvP8JmleAcdCz22ybtqb9nxJFe+AG5CxrdOImWZ9bcTuq29ab/GGdVdaDGtp4A2RTciS11U7rVEfpTBBFZVSQtShr60D9S8I2tRcVZXQrk50lacOcivybVyym+COjOJS6r7uCawJ8AJYDswOb38FE+aozhYcq9bZQSm/Rw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: Date: Thu, 3 Mar 2022 11:06:09 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: [PATCH v3 4/7] xz: avoid overlapping memcpy() with invalid input with in-place decompression Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu References: In-Reply-To: X-ClientProxiedBy: AM6P191CA0060.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::37) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 96213b40-a0e5-4bb5-9307-08d9fcfd7205 X-MS-TrafficTypeDiagnostic: DBAPR04MB7256:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0SOUlTGlz3Fs5jlVf2tHPG0E7/j20G37gvGrKhnTzubEr/AB2KkBhqnN6DyCY3mLD6P6U4Fq/fjk9yMHWsfLe4NmoxvJ7oytgdTFM8oscFYzKUzDxEpyxpWXUM7jjp9LNsn/LovL6y8JK24ZkQsaZHDhKfrJLbkNFQsPx78xtTLBo0C+Ndbq9au+v0FTxhIFaB16JPF8m8tDSQjQuSCjfsz2FVHLIJMNDbj34bxu1E06/v5mL3i/j38lXmvwqh9HQtu21848MKd9D7tP8aNvrDfd4zC0M3nIA9Bkyt6RJGpt/8z63h2x/bEsgiqU5iK12e52ABr5lINdDW/7BXcSdFRug/4sAMssqUoO72RR6lAZCpn4VPpVd83QbsA5vC5ZYxIMD7KApvJnWcBY9W19y5D3LTlNuwi5uQ2uiHgBJmnfhbpA1m9QqgYS/K2iWUK9movRlHZ7Q9L2mcB7W6s5sV/32GFvSzutb9PdNP7NBN3HeBoIDp1ckBk6i+fWP9NxpH5Vcqfh9Eo0N9cEpNy8j4DIsP7UHMbKwpHf94w5yUxpad2v2cEOT0p4KUkyE87anuRu6EXUI7ykoNEAA1tPcPqiFW4w3E44YJQ7gY4+XuBbXkup9Ya71tk3YNozo6qcimZctxqS0tGcU4nXh1d+3M9y5zOqJ6DSV0n6iHEIUYwFU9Ajh99sB7mOGDhR89Lb6I/E08wsQ6NyapNmhs/AOkUUrGAyl6kZM0nctxC4vL5I4H1+g4+rvIz2ujZXsb5/D7DSzUaRQvEzazGPVmPd5Q209WSyrYQwmOcB3jkRkJegSx9L9CXvZ/ygu3HJezqtFlpgoDlUzmyAa2Ygnr7YMw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(186003)(5660300002)(26005)(8936002)(508600001)(54906003)(6512007)(6916009)(38100700002)(6506007)(6666004)(966005)(6486002)(86362001)(2616005)(66556008)(31696002)(4326008)(66476007)(8676002)(316002)(31686004)(2906002)(36756003)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ZUh6hFkawkysqhWN3z1OGZSL5MV+?= =?utf-8?q?H2WBWCi5/vGmiyqn5BGrF69e0POtpGMSkblalVNVnaHxVbzGDdRs+1eUnhEIDJMBh?= =?utf-8?q?b7WNMHQtm1tzsELjI35qd23JZyPSBHKyj0dB4wV7yk5Q6uKFrO95jm6qR4MSkcj6i?= =?utf-8?q?IXbcrUe19KcXqg96nZVoJStlrANvehJuZb+7GZMKKOrJwbqPW5kkopIByNlhek+yx?= =?utf-8?q?DKnHPQOzYZKSamumIPtqTnrmX5a6pqxcMl2GD8ovgJCiHQBK2CE7D3O6P/r2hgCuJ?= =?utf-8?q?M7KdMQRI2upRaj4aYrWRJ5E7cr2M/6RA98oZ48XEXbrCaJWGPIt8LbpwEZ5wts75w?= =?utf-8?q?LHYFk1mMepB9tyn1gdLXzc+uscnpfcw5sfgz+QZ0JaysBsLhkibjHRC3O+QQ3FWUS?= =?utf-8?q?dw9RSuNwKISoYWwYhWXqN/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uTK9Xc3yAP+8RHfDSMu27K6KYRf?= =?utf-8?q?VGlrPQ1Y7GCbUQgfyfNk0ll2iLA28tMZ/hFH1rjag1G+1LExw1DJNkYGmglKz5M/W?= =?utf-8?q?UMIjikgHp8Rbz54I0lG5bunPk623el4mzxcLc2HA1ht/DV4H9mLNYa2Nvxwba6Vcg?= =?utf-8?q?z/LgbyrxOD/a9YcuoJqd2rsF+eZqeNGmr3RrXH63xExgPiTlUZvKfU1l6oC7lV/tD?= =?utf-8?q?BdTeJ5N2VCogKKBI8ZBi7cQDX4XVd42hIoPPvXvQsl+kWXSb58tBRb4=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96213b40-a0e5-4bb5-9307-08d9fcfd7205 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2022 10:06:12.2029 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QUETtAAQP1SRkl8Y3f23rZCG+2FUSK+c1L1V3bMixyF+8fl64AvV2KXX3u34MkW8u5S6RH6j3GmMhWsi0FBkww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7256 From: Lasse Collin With valid files, the safety margin described in lib/decompress_unxz.c ensures that these buffers cannot overlap. But if the uncompressed size of the input is larger than the caller thought, which is possible when the input file is invalid/corrupt, the buffers can overlap. Obviously the result will then be garbage (and usually the decoder will return an error too) but no other harm will happen when such an over-run occurs. This change only affects uncompressed LZMA2 chunks and so this should have no effect on performance. Link: https://lore.kernel.org/r/20211010213145.17462-2-xiang@kernel.org Signed-off-by: Lasse Collin Signed-off-by: Gao Xiang [Linux commit: 83d3c4f22a36d005b55f44628f46cc0d319a75e8] Signed-off-by: Jan Beulich Reviewed-by: Luca Fancellu --- v2: Retain one more S-o-b. --- a/xen/common/unxz.c +++ b/xen/common/unxz.c @@ -127,7 +127,7 @@ * memeq and memzero are not used much and any remotely sane implementation * is fast enough. memcpy/memmove speed matters in multi-call mode, but * the kernel image is decompressed in single-call mode, in which only - * memcpy speed can matter and only if there is a lot of uncompressible data + * memmove speed can matter and only if there is a lot of uncompressible data * (LZMA2 stores uncompressible chunks in uncompressed form). Thus, the * functions below should just be kept small; it's probably not worth * optimizing for speed. --- a/xen/common/xz/dec_lzma2.c +++ b/xen/common/xz/dec_lzma2.c @@ -387,7 +387,14 @@ static void __init dict_uncompressed(str *left -= copy_size; - memcpy(dict->buf + dict->pos, b->in + b->in_pos, copy_size); + /* + * If doing in-place decompression in single-call mode and the + * uncompressed size of the file is larger than the caller + * thought (i.e. it is invalid input!), the buffers below may + * overlap and cause undefined behavior with memcpy(). + * With valid inputs memcpy() would be fine here. + */ + memmove(dict->buf + dict->pos, b->in + b->in_pos, copy_size); dict->pos += copy_size; if (dict->full < dict->pos) @@ -397,7 +404,11 @@ static void __init dict_uncompressed(str if (dict->pos == dict->end) dict->pos = 0; - memcpy(b->out + b->out_pos, b->in + b->in_pos, + /* + * Like above but for multi-call mode: use memmove() + * to avoid undefined behavior with invalid input. + */ + memmove(b->out + b->out_pos, b->in + b->in_pos, copy_size); } @@ -421,6 +432,12 @@ static uint32_t __init dict_flush(struct if (dict->pos == dict->end) dict->pos = 0; + /* + * These buffers cannot overlap even if doing in-place + * decompression because in multi-call mode dict->buf + * has been allocated by us in this file; it's not + * provided by the caller like in single-call mode. + */ memcpy(b->out + b->out_pos, dict->buf + dict->start, copy_size); } From patchwork Thu Mar 3 10:06:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12767282 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 437DEC433EF for ; Thu, 3 Mar 2022 10:06:51 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.282920.481785 (Exim 4.92) (envelope-from ) id 1nPiM2-0003hY-Rh; Thu, 03 Mar 2022 10:06:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 282920.481785; Thu, 03 Mar 2022 10:06:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiM2-0003hR-NX; Thu, 03 Mar 2022 10:06:38 +0000 Received: by outflank-mailman (input) for mailman id 282920; Thu, 03 Mar 2022 10:06:37 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiM1-0002Fn-02 for xen-devel@lists.xenproject.org; Thu, 03 Mar 2022 10:06:37 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9c358b94-9ad9-11ec-8539-5f4723681683; Thu, 03 Mar 2022 11:06:36 +0100 (CET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2052.outbound.protection.outlook.com [104.47.13.52]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-7-8DiBiTeRNsOnBDitWgBfww-1; Thu, 03 Mar 2022 11:06:35 +0100 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by DBAPR04MB7256.eurprd04.prod.outlook.com (2603:10a6:10:1a3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Thu, 3 Mar 2022 10:06:33 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65%6]) with mapi id 15.20.5038.014; Thu, 3 Mar 2022 10:06:33 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9c358b94-9ad9-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1646301996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rp6zR0202WWrjoyuiwHgeOxRqJmRNX0SFCkPJp8UDMs=; b=BrGodMW3v/UOmA/pptgwpGHOr68hqPVxIDbSQakWDDPbCeUZF8fIfb6e2dDufz9KYUmOGZ 84KgZ+aOaQBdBDDqY6sYAQw/70f8n6+tGBiEKTT9nvAEb5xvm8wlbsTYa9qsKqJl2uGCfO WSzeulrofHNuYANAOTZabUKELfB5Isk= X-MC-Unique: 8DiBiTeRNsOnBDitWgBfww-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bcbsGsINUwnjpexYhsB6kfOFZPzKjy/psg6sGui8MTOkVx/7Gggvc4/M3EJgjt+QbiiqVHUp7GGnTxJLVkEbw4+ilZDoG0mzn4ioj30T1HuePOixBBtkfgkGsQ+CekAar90cFKoLxe0pwlgg6loza1vMb9LFTKuSzlhDH3ljubjEfFuLR4sf46CSF/UU49kIfFyd40j+Jzl80/u69ktcrGYnPfsuMWmLj/XSx4qdlr4d02/YtkaleK6MsnN7nMgrRBh+KKM/SYDIm0a/0RnOQv8wWTaTbrgY4sxA2Lgcnj3qVEH5KsuKthMT0QEEC4CVIdvmF2Qi4lTh+/S2qSt/Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rp6zR0202WWrjoyuiwHgeOxRqJmRNX0SFCkPJp8UDMs=; b=UQkA7AkkHXvHbJd9bl9ftagDzlQ6qVK7IjRoUS16KzuCuSTtXhEHpvJmDim8zMjUK/Mfr6oFtpd2dIS/dm+T/6vcgQI1Mx+088/HlMolFZgb5rSol6AaN3pfvdB00tuT6fpHiFs9hx1nEDTyDJxZvM4VFK60NTP1h6aURFfjYXMjYTTacHKEwoU4dnhGsHbhBl8bP3QvM7XQXkHLqmO8hkyfUAWKby32nj89BgkFNegdJVStjcFoEnz3rx0sjaCTTJii7JEVry5BgTWGG75uSz/tM4+GsN5ALqRLkNmHMDarOP32dgX9aT24MsJBrqExKsMagoMzlwJCtIN15Ch0lw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <72cb83c2-ba5c-2ac0-a5eb-dc04f6b938b3@suse.com> Date: Thu, 3 Mar 2022 11:06:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: [PATCH v3 5/7] xz: validate the value before assigning it to an enum variable Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu References: In-Reply-To: X-ClientProxiedBy: AM6P191CA0048.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::25) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 85888903-d64a-4979-dac7-08d9fcfd7ece X-MS-TrafficTypeDiagnostic: DBAPR04MB7256:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5Xhpd0da39dg0s48+yAks48BDbJ8npeIiwEm2xeemgDeLQ9JmNtSBlrQzQTZai69Nf4giEklMjYRda+PtGkodbCtD7xql/zjRaOP9PXgLWpb2ttoE9wNEojhOjPomD2LRB8sAzkEwAnW2iT+onUC62NN2JNb2Wk3P76FaPqCvylRnmVFYbbcp+XSQWEBq7J1xN0txi8J+rviYfUhRGI1bqX1dszzjDOIDrUJh3k0crbQzpu/J1mH0TeI1Xtn6c/nvlqBhuiQhFnKjKJ5cxdbhlvphbvbG8Z7+nle78EkYqe6Q9u20YDeXTZyWuG9WRSPE+jJYXflnZmTOn30x7pBsr4+lcDO1jQ/1p3CfTXl2s/GxFgtArxJ0gOZah/MI8hli28vHgPXbRIHZg+ucbEXpSRn/vKeOANFt2tO4sBY8vK7hwil52SI3+DJsn/vux4YR54mY5MjMUvgq/NfHmC1wmi+dkSCvTpwZGBqXWARc4o11IcwSa3kZwQaK0nhDIp9dP/r1TGuyTD7kAgSuCzvjPJ/nxY6Q6IjkhwNzzVzDnWeXNKWb1Qs+Jg4COqW7PvEJI+Iat/zUM95lZawB/LfE//3L+Nyw4AYtN/pg31al97BlgQF3HNpHQPN3/bX+jsXsMnPYxaT4+EERmqNXIqH/+IhhH1fZ04tO7C0AZNl9XmKWg764U/7odYLLiPe3Q1l2QzwGOIn/cM9KrG7714ghcZgDHbeA6tQiOTTLCt+ETNJ+EX3e7SmDg3AilQPT4pidpfynbzp9HdIF8hnYOuA3d9KpJLnHpU/JtvFUa0qKf4GoVsPHJlu+SkxKNeL7ypS0zw89EyWqIPpeU6bXA2Nfw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(186003)(5660300002)(15650500001)(26005)(8936002)(508600001)(54906003)(6512007)(6916009)(38100700002)(6506007)(966005)(6486002)(86362001)(83380400001)(2616005)(66556008)(31696002)(4326008)(66476007)(8676002)(316002)(31686004)(2906002)(36756003)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?adcnhOy7iKZNx6/DQuHx93KnNB/G?= =?utf-8?q?YzFA313g8ZsKD1LcSgyiwobJfkGR215PLxi98XLF9PIIzT3tjDAOHR0O9ae2rQLwe?= =?utf-8?q?KSCY1IzdwDDmaA0m/2iMs0gpAwpVu6tbL11XSgIMpLjowI359P36aHG58s68fzeEU?= =?utf-8?q?PoBlRbFefxZde6gzJ8J544q1L2CIEgQIINaugEWakLP4HrZrG8Z0PuC1MIeePhGhd?= =?utf-8?q?iiWfQ/YYStV21ZJnycZf/MxUweZCdXMNZVDkrx/GsexkCaK3SbZvWzV50Y3BYqHsS?= =?utf-8?q?4DnptiVJ6lDcuotNyMSfkadOyAtdq7w5stMHfLTvcjWlVEbYSYwDNMUFSSDvXF9lA?= =?utf-8?q?GLqt4yPou/FzvNs64g5C7L0zNbcR/jzFTZ5RR9imGU8bMcmDovLQkP0ypxwiK8F0Q?= =?utf-8?q?Q5E6JDhyAq2o6mAK6hMWUmFJDZkLGOovaHlrzpZjMx1+YLK0fs7ghVthnZ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utf-8?q?E2Jg8SDxyDCv4NCPCAJY3sZHjsCSpEbi7tylMtENbv7BTBPOszPHvBOEJlCnDUXJp?= =?utf-8?q?TJLxHxsokuFyDkS6atiyfPNlRY9LF1bvwf6Y6jG37SgxEeQYRwqG1W9KmZr6fhn1q?= =?utf-8?q?o59tIBeZToR0lXdthMD7XcFwp4gL36zpCZoElOkR/sDAExsLBKYzz7sncriFGL5gP?= =?utf-8?q?4eWwfItVcesxnC5TxEQy03J3nuEnsFZXPcojXPz5ARD92/xhWmRdy2Y=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 85888903-d64a-4979-dac7-08d9fcfd7ece X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2022 10:06:33.5453 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5s8C20y/V//BlaHDKEWpdM7EpW+IaiD20CrndJpEMeB9ADET1WVStfB9TTOoL/NhhqwXBl+mD8ZKCkb2Tvytlw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7256 From: Lasse Collin This might matter, for example, if the underlying type of enum xz_check was a signed char. In such a case the validation wouldn't have caught an unsupported header. I don't know if this problem can occur in the kernel on any arch but it's still good to fix it because some people might copy the XZ code to their own projects from Linux instead of the upstream XZ Embedded repository. This change may increase the code size by a few bytes. An alternative would have been to use an unsigned int instead of enum xz_check but using an enumeration looks cleaner. Link: https://lore.kernel.org/r/20211010213145.17462-3-xiang@kernel.org Signed-off-by: Lasse Collin Signed-off-by: Gao Xiang [Linux commit: 4f8d7abaa413c34da9d751289849dbfb7c977d05] Signed-off-by: Jan Beulich Reviewed-by: Luca Fancellu --- v2: Retain one more S-o-b. --- a/xen/common/xz/dec_stream.c +++ b/xen/common/xz/dec_stream.c @@ -402,12 +402,12 @@ static enum xz_ret __init dec_stream_hea * we will accept other check types too, but then the check won't * be verified and a warning (XZ_UNSUPPORTED_CHECK) will be given. */ + if (s->temp.buf[HEADER_MAGIC_SIZE + 1] > XZ_CHECK_MAX) + return XZ_OPTIONS_ERROR; + s->check_type = s->temp.buf[HEADER_MAGIC_SIZE + 1]; #ifdef XZ_DEC_ANY_CHECK - if (s->check_type > XZ_CHECK_MAX) - return XZ_OPTIONS_ERROR; - if (s->check_type > XZ_CHECK_CRC32) return XZ_UNSUPPORTED_CHECK; #else From patchwork Thu Mar 3 10:06:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12767283 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B32FAC433F5 for ; Thu, 3 Mar 2022 10:07:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.282928.481796 (Exim 4.92) (envelope-from ) id 1nPiMT-0004N1-5i; Thu, 03 Mar 2022 10:07:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 282928.481796; Thu, 03 Mar 2022 10:07:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiMT-0004Mu-1y; Thu, 03 Mar 2022 10:07:05 +0000 Received: by outflank-mailman (input) for mailman id 282928; Thu, 03 Mar 2022 10:07:03 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiMR-0002Fn-NV for xen-devel@lists.xenproject.org; Thu, 03 Mar 2022 10:07:03 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ac268b65-9ad9-11ec-8539-5f4723681683; Thu, 03 Mar 2022 11:07:03 +0100 (CET) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-ve1eur03lp2051.outbound.protection.outlook.com [104.47.9.51]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-11-x9RipL0rNwSbs3GBe4ORyw-1; Thu, 03 Mar 2022 11:07:01 +0100 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by DBAPR04MB7256.eurprd04.prod.outlook.com (2603:10a6:10:1a3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Thu, 3 Mar 2022 10:07:00 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65%6]) with mapi id 15.20.5038.014; Thu, 3 Mar 2022 10:07:00 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ac268b65-9ad9-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1646302022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0H0YRL04KECEnhSZHc0txOpsgQMjHkGgxeFv8W2+jqE=; b=NuJbbU0IMlhvAsnZdTALkoe5HCXfygXXg02tKC5tkeFXfRPQOnca4QS32EFLYB7VB16noY vYwWkTFUy2l8NcuM4Xsvxy+xWflofx3krfx6NdX/EJ7/dVK5lO0BvZhkZ/fTCITtHiOow2 30Kr4WBB3UAKssdnLT64DTQ/xV3EzGc= X-MC-Unique: x9RipL0rNwSbs3GBe4ORyw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j6SgIZsTvZXCcIpSDIrmBMtd5W6kDDHZ0YiUuDOFr5CntfUP41C28cqFxZ7QDTO1hPX32ojBvY1g1Y21aY1kADusU3S/oPorvP9kOwm5VItzNvN6UyLU6ZyuyvzVID93kbNp/Xo9PJQ0s062KEuG597o9U1+vj/OoOOKIvvRyqyk3nQYvXglMNcVcA4LViIERW2js14sKPbmE/accPYfzGMqGPkLqfr7ddJE9jW/acU164DcCXqw/wOEB1OUMhe8YGnL8IOkknM/0ILdxS1oXR2fIpOu8Hkeuvzz7WkaPxoil+cYkbf1rPj09WjcBraW6rt8/07o+VxQbv8oUz6mSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0H0YRL04KECEnhSZHc0txOpsgQMjHkGgxeFv8W2+jqE=; b=DjkSOgdZ9TDmZeuR6EdqyvLJ79AYTZSnUHFvXHWanLZV1a5ZdJNBGXrJqcfitEJQ5r68Ri14Ri3MFF9wDYjZEWOMq4KgiVaZ/LY4l4rJyIDLCEx4wXhZSswNnyuuhmapCTn1+9F9ynr46dOyUde+l8NvLW8aBUd1vUsCNE6/oQgsrV2eRZzkO/Qf5e7inHwfY82F06wEaMvBnoeQ8YRrxqsKoJyMB9dKP1uE7p+FNfLMl4oAO+wdHLAWGY6OrKtHDdwaoth/jK7Q4aWIvab572bq0Lv443z4trdOBfySvvU7bsrjEK1QJvFodBSqXc+0kR4tb463IwJyHFydFywboQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <4daa52f3-2fbe-c218-a8b8-a43c1b23f803@suse.com> Date: Thu, 3 Mar 2022 11:06:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: [PATCH v3 6/7] xz: move s->lzma.len = 0 initialization to lzma_reset() Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu References: In-Reply-To: X-ClientProxiedBy: AM6P194CA0002.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:90::15) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2cf04b77-d9f3-4fd7-c9aa-08d9fcfd8eb6 X-MS-TrafficTypeDiagnostic: DBAPR04MB7256:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o6StS2Kb+UZgIr3Oxh3XP6GTSNqPQ8FTCb6mMsvm8csGmiBbMLMkkik0F1ILe+QQWOPqpP74zJ4w2JS15Wf4NcVRX35fvnVccCC+uQibt7aZsRYpaLJjb2SKYHaGBNEtf+ZZCWv5ZHz/s5AOispz0wwt8TfC99a9akCKvRaA+Gi1EwMhl95jUm0DF+uF4QflIJ6PwZpp4aoh+5kbyrMFFKz7xxq+F17qUuyCkUBsWt3pzzXqVnTB76o+uNWr61kQMWyjhG37XN1DjjxJaVcy5KtZRoYb9nAryUmCIJ0nCxlS3L8jPLVw/EkqEqYkZsoyDMZvb0rIbPryeXx4UciSguDmt2A3tr20dCL2nXoLRRmDPJ6CMEOYQcTTlrQRKQFSHpDru0ghNY7g+adfK5uGoAdXwIqOYMO4qPG6OJntV6qQBZs4BCxFoZhY6al4jg17nLM4h5Z6dtxVhNK2HgKW4E5jwVD/W2bxT2mEbvDuwJISrGV2SikJEK/Z4/Cbc+jlfIWILfKURNF4hIt4OLx2naXdOCD1KUBBpLILBSEjyPci5uNuxzF8efRGePEvYERf/3/5eJrfc+OuW1wbc43LNIwOmptD0zNt6XXf9CUPG7okwaM/LMDefbCTBEcP+RVjXC5ezQ/oAdZPjPsrV0nOE+7CsZe2hsvF0B08k2STwCTAa++tBhp3/LW5S2Us4+5m0wiU6Yz4/T9YbFMgZD/N7ixn536tU+QM8Jl7bZkO9VXECldtVnN7svHNQ6kUIe+4ltXKpGqWiI6T0NOYY+R0k7ZrgWD60ShcOGBov2MIEiClizZbaKMPiwt8qlkZUrhMImJU0l1audur9E33VQsJ5w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(186003)(5660300002)(26005)(8936002)(508600001)(54906003)(6512007)(6916009)(38100700002)(6506007)(966005)(6486002)(86362001)(2616005)(66556008)(31696002)(4326008)(66476007)(8676002)(316002)(31686004)(2906002)(36756003)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?fMrnAdjCbVSFjo0EeVv2k+JD9JnJ?= =?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?utf-8?q?cREpry/Nk7qnJQYeanGAKnIGIFv7KnQzdxJpmeeqMjcisBpLBg5xMlhKQyBxrzcwv?= =?utf-8?q?/bEBvCHT3Ere4hz3mdbTZl68Z1uZxkialzyg/+7/ysBx2w2kKdnKltAAxCy8tI3Gu?= =?utf-8?q?Fxsca8/jjttdCSss6Y3mW7UCci8HOCnx2MA459Muc3ze+MP2Dt2OvAJpZK/kpDw7X?= =?utf-8?q?4uMen+PCTmTc/OWTeHISJ069FuR7x8ucMSsayIV/oFUMU4zNcRWi8ICMa6w5ZXRA9?= =?utf-8?q?RVYQ1ssiiX2zbkDzKVaBFwHIeGKj/b7VBMm3tiYiwwWdRgQx57lHPpyjZ42keCjsF?= =?utf-8?q?5F6reZio4zAATJYFduKhzJ1f8esIOj/sJfGVNqJbsmIxFF4poBfz+4DMaoYec9NTa?= =?utf-8?q?VpcCArkbGAi5i4/IT4Kbi9o5pfQ1Anwv5Q4wM5/qAQcEaujZF6R3Sk1nUAUK04rj8?= =?utf-8?q?IiyPCRyRzroEpSA8Guc8IOGvoT5GnzNWzeQuKHayvtXbvnRe6r7J2K5sp1nhJTsAU?= =?utf-8?q?+kxCfHTS5hnPCcQ3hOeCtR6yzDdcKLKnTUwIpzmb1JpNhszbNrmHAO0LHiIIiwGjz?= =?utf-8?q?rSs/mpT7dvGGxeu8/03fI6s5kOBJ3cA1OciPvLhAz3ts/J+Uy7mOswb11JzrA/+k4?= =?utf-8?q?an0QHyqk0zQiOiY8DR6qBJ6m3HB9mFDqQhQot1DctxbE+n8InwI6Hrg=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2cf04b77-d9f3-4fd7-c9aa-08d9fcfd8eb6 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2022 10:07:00.2467 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gejgE7lqimsycoa2V9GYU63g0/EbFS/7GS/zAWm3JzH3I11wZBRJiGzH6agFx0RkbCL3lrslEIR5nQYMskdwOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7256 From: Lasse Collin It's a more logical place even if the resetting needs to be done only once per LZMA2 stream (if lzma_reset() called in the middle of an LZMA2 stream, .len will already be 0). Link: https://lore.kernel.org/r/20211010213145.17462-4-xiang@kernel.org Signed-off-by: Lasse Collin Signed-off-by: Gao Xiang [Linux commit: a98a25408b0e9b0264abcc3dabfafd9ff2ea1046] Signed-off-by: Jan Beulich Reviewed-by: Luca Fancellu --- v2: Retain one more S-o-b. --- a/xen/common/xz/dec_lzma2.c +++ b/xen/common/xz/dec_lzma2.c @@ -791,6 +791,7 @@ static void __init lzma_reset(struct xz_ s->lzma.rep1 = 0; s->lzma.rep2 = 0; s->lzma.rep3 = 0; + s->lzma.len = 0; /* * All probabilities are initialized to the same value. This hack @@ -1174,8 +1175,6 @@ XZ_EXTERN enum xz_ret __init xz_dec_lzma } } - s->lzma.len = 0; - s->lzma2.sequence = SEQ_CONTROL; s->lzma2.need_dict_reset = true; From patchwork Thu Mar 3 10:07:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12767284 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56A06C433F5 for ; Thu, 3 Mar 2022 10:07:45 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.282937.481807 (Exim 4.92) (envelope-from ) id 1nPiMv-00054P-Iq; Thu, 03 Mar 2022 10:07:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 282937.481807; Thu, 03 Mar 2022 10:07:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiMv-00054I-En; Thu, 03 Mar 2022 10:07:33 +0000 Received: by outflank-mailman (input) for mailman id 282937; Thu, 03 Mar 2022 10:07:32 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nPiMu-00053r-0i for xen-devel@lists.xenproject.org; Thu, 03 Mar 2022 10:07:32 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bcad49c7-9ad9-11ec-8eba-a37418f5ba1a; Thu, 03 Mar 2022 11:07:30 +0100 (CET) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-ve1eur03lp2051.outbound.protection.outlook.com [104.47.9.51]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-2-lFUJprtaPsKH9rlJTkrhfg-1; Thu, 03 Mar 2022 11:07:29 +0100 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by DBAPR04MB7256.eurprd04.prod.outlook.com (2603:10a6:10:1a3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Thu, 3 Mar 2022 10:07:28 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65%6]) with mapi id 15.20.5038.014; Thu, 3 Mar 2022 10:07:28 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: bcad49c7-9ad9-11ec-8eba-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1646302050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oa6iC2T5QUROEVeYq1WfshK6wYPb0g27s45ej1AfY/A=; b=ZKMcAs6C+kx+5r2oWgyiPVpAjySJVM8MYDqlziVb15vF6sY34jZXL/Y2j9dDvNVtS3+JSv eRHKb32y0JjWf4+xdqPhmCeRdf1qHjMLqMzdfYcbTYOVih8sDbZiRP+nnXmVYTOgpimc8x BcjhEDLzqsaIdzYfFDwSkdqHm4J91Ik= X-MC-Unique: lFUJprtaPsKH9rlJTkrhfg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JwH6BLAHiHFDQYzqP1Gsim6/Z5fIL+pCEF0bNJhQlqBzaaO/Bbjfar/nFwTPaLkiBSCTec20KnF5VB6AWpC3eNVbtliecg2pqqpy+WFgHCtAUp54F6Dnpw/kg6Ti2d+CJOE7QOp3O5/gjbuubDbC5JmkoDykKA5EZm4LQMcTjZWdScgwz+KAUbGKF8yFmT08QFt4NdyXa1HY/Zy6c4gKOtQB974emSO+QjF4mw4NXHelLir027PEDa15s5dLWnjz19FiW9WImbwg82bE7IL1pD92QFUUSKChcVcBPDgw3hu4WO+rcDchbOMdROom6Ol5brfI24/66b+xva3kGyu0PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oa6iC2T5QUROEVeYq1WfshK6wYPb0g27s45ej1AfY/A=; b=cC+jTSUI30HxG6k1gSUcIJIQK6xfpVcWNMB0RTbWKPcGhjavjDq4StIRZ15lneM+jlhcGW9NDJTC360DjdFt40oNq+i4jK1RvVmQ6I8yL7PlvAK3n0gIlxVXgMJzAnFWHdj2HYpMsS77Mgwz4K6HOKoM3wdlRqmISNiuq8h/MHONzcWfwpirKDjPBmv7aVNfGI91g2FAER1pLGk4CRHjY9RQop9rqapm98jAsEsnwnVYf3Zqfp5Ku5PUkmn8k3U3YoxAwxp04ZaOaEn/WGnOBoCfU3FLyqNi1FA7G40hQaUcYQDOh6Y+5BRB9AnePji6ics1/B2UBa2Yf0MXBPqR+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <202440c9-f515-bde5-ea87-ca06a7f11dab@suse.com> Date: Thu, 3 Mar 2022 11:07:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: [PATCH v3 7/7] xz: fix spelling in comments Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu References: In-Reply-To: X-ClientProxiedBy: AM7PR02CA0010.eurprd02.prod.outlook.com (2603:10a6:20b:100::20) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: facd8390-c249-4aa3-7189-08d9fcfd9f5d X-MS-TrafficTypeDiagnostic: DBAPR04MB7256:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T4U+Ty+wpnWKIzlvJIg2wkORj31DwH/szd4d7F5nabp4bAlr1YVafPHjZJK1lKV7FcShMeMTq1ZT28pYlVo6rY3YEH6oYSmJXe3JspamdNt5PGX3PcGS5dF0FxHLmDCJjImHwzsMRm7W4MXJcUkNZOGgfXWXCkuowTZuflIPyyT7RGF7zM1By90QTudb1W9jHTnT1gm6SEvSqNaWQDL35Q7q8K5yZZc4YzyXk0700ijgH/XTlT9T98C+oR38tX3+zDG49O6d7/RpHGGNhkxEsC4C/iyH/qIyfNK6F7K/KdSzOc7nzczJAz3DyvpaGv1aESuys1uyyMXyzXCHp3afHowjdfxdQJEk0F84sSpzMGzm+xd8Hdv9Q+xPHZMRpqLTmU1bdTAK7FCZ5jEzqHrhRAINX85oUcwmUhKtVBkotpIsAoX+prFeneuU78Cm5OVCys6tVy0jNJHRrzzGZkw5DMN1XEkHvQh0XqXIUKRzECsIi6kFuqzLeFfVCkLWeQ3K1rFtUSam/B8yDvi8zGpzFNneDoKVNRGcAnimVd3Gg7VSYr5bw2j5GSn1z+OaJCzszCgbs2itlQPiyp2ZO6XmWM2MLP/ms9pa35iS/+S4HYPuCXJdaPArqtFhwVyzZm+oz7OpkC2WYiC93qCe/U5ooMjWhpVDj84AKbhFUf//8M3kW0xrvhaJ0lKuGY4z+ZUxsqBPfcysq8iZ/qlc1wsPNkyGEkf3l5ADpnLD1CFQzxu0hD59dQNKEAFFI0PcBYZhkaP6uovN0ZibZ7RYczAefAp/l4N5vsRqO5I2R+zREum2Ez6qLuGP5DVEYdqDZ+Wd X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(186003)(5660300002)(26005)(8936002)(508600001)(54906003)(6512007)(6916009)(38100700002)(6506007)(6666004)(966005)(6486002)(86362001)(2616005)(66556008)(31696002)(4326008)(66476007)(8676002)(316002)(31686004)(2906002)(36756003)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ptq8duEkjAHnbhdkt9pwnjmHSFpR?= =?utf-8?q?5fds+8UqqkMOi9v1x7fEw4tLfBfj6VSk6bpzJWj5g2ddimFu9TbrlM37xgnaTbQrX?= =?utf-8?q?rKEpSYtGv3Y9QnXcOirowkigGo777oAq9FYzGIqDyEWtz2fRNByL64l1zA/bx+9Fb?= =?utf-8?q?5aWN6jQLWlgIS6q5tI4FfCWaxYMexz308/yJtfw9cUGgtp17Ok/eVfQJJjBhqAdD2?= =?utf-8?q?X3ZUSKTndHQ4V5my8rtYUIT3CfCKZQjXTeZRg/Wd/XXPObBX+fbilV/HSxivk2ywA?= =?utf-8?q?nDqFol/1vi9tP8ILlYV+dlkGFCWzjxG9oyuNHUUYdC30jZdpTbIALTVcIoHXgYtah?= =?utf-8?q?wxk+pkTftg7zcVVyKUY9X5/e8BnzIqe+4k1nF80wDh5KyaoLqcO+A+tlv2hEWH72d?= =?utf-8?q?m/GmUyBhLIdOTbNux6PJFRQ+WUdiiKyiaVvUgtjP6tAtBiRGlEz1eMs7PRZoNAcSD?= =?utf-8?q?C1z8BxjhgURFRoOXlQsEt0uawa8KQ6RyENzPykwXeE4sP9LvYqAMNzIau49y2Y4O2?= =?utf-8?q?i0R/jMPUDZ9h05FhHouc1CZSRmzQQnGdVD8oM02yuuSUtZh3zcTxXyxjwBH7NBSKZ?= =?utf-8?q?YtvNxo/6s3Cqu4awll4MIqkQJmkkqET+OWucTPwzKdJvCgEM8V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PFFnkE/VprAZiG7mT3Ra3p4o+WmcjrT6A?= =?utf-8?q?nb/QkBvKi1Mb0hxIApJGBLjZ15RS8TT/rtdbDdMKfgpAzf6ZhXAm7Qc=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: facd8390-c249-4aa3-7189-08d9fcfd9f5d X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2022 10:07:28.1356 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: azu/V+EkVKUi1oXpLJU16o44iV4V7mvqZLwdCiGKvbrvsWAWsIsybObzyHwNV3pOliMTU/b8vyWz2CE9jnR8+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7256 From: Lasse Collin uncompressible -> incompressible non-splitted -> non-split Link: https://lore.kernel.org/r/20211010213145.17462-6-xiang@kernel.org Signed-off-by: Lasse Collin Signed-off-by: Gao Xiang [Linux commit: 0a434e0a2c9f4395e4560aac22677ef25ab4afd9] Signed-off-by: Jan Beulich Reviewed-by: Luca Fancellu --- v2: Retain one more S-o-b. --- a/xen/common/unxz.c +++ b/xen/common/unxz.c @@ -20,8 +20,8 @@ * * The worst case for in-place decompression is that the beginning of * the file is compressed extremely well, and the rest of the file is - * uncompressible. Thus, we must look for worst-case expansion when the - * compressor is encoding uncompressible data. + * incompressible. Thus, we must look for worst-case expansion when the + * compressor is encoding incompressible data. * * The structure of the .xz file in case of a compressed kernel is as follows. * Sizes (as bytes) of the fields are in parenthesis. @@ -58,7 +58,7 @@ * uncompressed size of the payload is in practice never less than the * payload size itself. The LZMA2 format would allow uncompressed size * to be less than the payload size, but no sane compressor creates such - * files. LZMA2 supports storing uncompressible data in uncompressed form, + * files. LZMA2 supports storing incompressible data in uncompressed form, * so there's never a need to create payloads whose uncompressed size is * smaller than the compressed size. * @@ -127,8 +127,8 @@ * memeq and memzero are not used much and any remotely sane implementation * is fast enough. memcpy/memmove speed matters in multi-call mode, but * the kernel image is decompressed in single-call mode, in which only - * memmove speed can matter and only if there is a lot of uncompressible data - * (LZMA2 stores uncompressible chunks in uncompressed form). Thus, the + * memmove speed can matter and only if there is a lot of incompressible data + * (LZMA2 stores incompressible chunks in uncompressed form). Thus, the * functions below should just be kept small; it's probably not worth * optimizing for speed. */ --- a/xen/common/xz/dec_lzma2.c +++ b/xen/common/xz/dec_lzma2.c @@ -505,7 +505,7 @@ static always_inline void rc_normalize(s * functions so that the compiler is supposed to be able to more easily avoid * an extra branch. In this particular version of the LZMA decoder, this * doesn't seem to be a good idea (tested with GCC 3.3.6, 3.4.6, and 4.3.3 - * on x86). Using a non-splitted version results in nicer looking code too. + * on x86). Using a non-split version results in nicer looking code too. * * NOTE: This must return an int. Do not make it return a bool or the speed * of the code generated by GCC 3.x decreases 10-15 %. (GCC 4.3 doesn't care,