From patchwork Mon May 22 07:14:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 97126 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1272007vqo; Mon, 22 May 2023 00:44:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5qyrQl3wwyr4vdp79dkE6M904uNI+xfC03FhcEOUFW4Ec5auRm0IR4gtwhVnjU68a4qv1E X-Received: by 2002:a17:902:f682:b0:1a6:db0a:8005 with SMTP id l2-20020a170902f68200b001a6db0a8005mr10775997plg.68.1684741441863; Mon, 22 May 2023 00:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684741441; cv=none; d=google.com; s=arc-20160816; b=xEstC/mLogJinxPsQJF/9tKvq7cvgiKz8WzKT4DQlxPY+K3MhziuGHZT1cWBs5YqMA 45bFp+nqKbyaCbjdnSIMkeF9+imCma39p8k/y5fDvtFpMHTeW730OyNRAtRQGa27QRbq ZQpA1lewbw6pCfXrR72+D9vb6Nzg2WKDtF2LseBtnwcc0ReS1b1CGJ2niYfx86X1He9t H0u3e1EuoGHwNc8xk18WtnlMjfxwT/INW4NansDNeZ0aQ54Ru1dNSSFCab4052GJ+F9B OngOZ241Nk6C4h2N/SuWg0cwpGaD7PGVnnvDpaeQvfOe+ZsU5lslpYxdBl8Fjou8YNUG ZdHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DB8oL3jXiN9e2dZTst6BBU9MW8a+CwDXQ55OFaZVfRU=; b=OxS6TB1X8GHMnOq/fLR5Rc9yGgN9A3ejYVvs+W3Y0QJD2wDDWRptgD67aHUO2kNJvt bmXDFH7R/hU4EZRBvW3SZ/QVf152WGjtGGxxA1HPoik4enydsL+DroWm2S6D3B+nH4zQ soTAAiG5UG424PerQhX+sGfWTl7aG4aYi+P6YXZJjw8vXtz5C916DT5X16JLmdorBbSk VEI84usTaa09HpK4tHuMevCHOSdVl3vDxZ6YxjgWdOMz26XoRxmynpE2yqXgajad7Odz ZBiPRYK0JEKJhxRDGLljG/LNZ/qKkekIZnj8HeDu4Dz2yeGs1RlojZhJmbZfXlJKcDtj HG0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="X/k25RQr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 17-20020a170902ee5100b001a1a0db7f61si4161800plo.336.2023.05.22.00.43.32; Mon, 22 May 2023 00:44:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="X/k25RQr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232541AbjEVHQ6 (ORCPT + 99 others); Mon, 22 May 2023 03:16:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232505AbjEVHQR (ORCPT ); Mon, 22 May 2023 03:16:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B68C10F4; Mon, 22 May 2023 00:15:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EBB5961DF4; Mon, 22 May 2023 07:15:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A567FC433EF; Mon, 22 May 2023 07:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684739736; bh=TDhagb7/1BjVNI9fsBOdvguiTH1+pJKnlE7Km5AKGt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X/k25RQrwho388uZuEtlF6MSH2EBdQnJmyiy5r1iU9TgEL5+t4CYqaj50iQtt75+u Qbqr1HwaRmOIAA7tpZ2RXqLdwR+pmCgRoTpQ6XB2SI4yYXYOKyKS3ruIbT3aCYv9Gm BadBzyHNU71Cut4XjqHwR/oPZVBfQU9FQAGzoR6jxLozp44/PzAqiTLdjLjyhIXzDL 2pvV5pxM0B0NfsXs9YF5SA7j7oe3OPbaAxx/DGmNIG9Y0mefuXpPuEtREMYvLqBMIB 2AWA8HVb9mCkDTj6/ng8cl4nwinPhOagqzaeX5vF7+z8TPN4iSsGLek5JCSV3LQCaZ KMKC1JT1BxKsA== From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel , Evgeniy Baskov , Borislav Petkov , Andy Lutomirski , Dave Hansen , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Alexey Khoroshilov , Peter Jones , Gerd Hoffmann , Dave Young , Mario Limonciello , Kees Cook , Tom Lendacky , "Kirill A . Shutemov" , Linus Torvalds Subject: [PATCH v3 15/21] decompress: Use 8 byte alignment Date: Mon, 22 May 2023 09:14:09 +0200 Message-Id: <20230522071415.501717-16-ardb@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522071415.501717-1-ardb@kernel.org> References: <20230522071415.501717-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=737; i=ardb@kernel.org; h=from:subject; bh=TDhagb7/1BjVNI9fsBOdvguiTH1+pJKnlE7Km5AKGt0=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JISVbzN4x+Byz1Ywd4vxs4ZLqct3rK24U3ZBefYk5ou4gx 1T+gDsdpSwMYhwMsmKKLAKz/77beXqiVK3zLFmYOaxMIEMYuDgFYCJuFowMM8Uapp2MfjA5Yvqt yGfuB5VM3gd1rytn3aMTdf9rqf23n4wMH9Xfv3r8/8FEkdVGScfsb/9YxDCrYqv8iqazS94dmdj 5ghEA X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766579442090555125?= X-GMAIL-MSGID: =?utf-8?q?1766579442090555125?= The ZSTD decompressor requires malloc() allocations to be 8 byte aligned, so ensure that this the case. Signed-off-by: Ard Biesheuvel --- include/linux/decompress/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h index 9192986b1a731323..ac862422df158bef 100644 --- a/include/linux/decompress/mm.h +++ b/include/linux/decompress/mm.h @@ -48,7 +48,7 @@ MALLOC_VISIBLE void *malloc(int size) if (!malloc_ptr) malloc_ptr = free_mem_ptr; - malloc_ptr = (malloc_ptr + 3) & ~3; /* Align */ + malloc_ptr = (malloc_ptr + 7) & ~7; /* Align */ p = (void *)malloc_ptr; malloc_ptr += size;