Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2583771rwd; Mon, 22 May 2023 00:44:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6IrDZNbOVa0ar+RXRztT3Arfqd5liC7WijqgaUuAGNk300v54BqGlIw/dcsAzkFm8AZlmt X-Received: by 2002:a17:903:1112:b0:1ae:10b3:61e9 with SMTP id n18-20020a170903111200b001ae10b361e9mr10658143plh.65.1684741463995; Mon, 22 May 2023 00:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684741463; cv=none; d=google.com; s=arc-20160816; b=tmFbz8QpP3QvQ46FCbJPh8CsqedmnA+IqAI7rqiMQj5aWJXQnvM2E/7nnSJ8+GQ5HG pnSuN+1gwGA4S8X+IVG2F4tScyte9knHv61Rumm8f/xoexTU4/gUzQsAhu5a2fBqDdxn 6xxnCTmtUETdtWAwPT8+zAWnSXkh6uwNpx+zQ9Ea6HLpMYG6XFHBkSWSEodXEkYMekhP 8O/V/92t5ewo6c7lEjAxJLj4l+Q1cq7cmmAKGtdirRwxwaBwRpnZwpQNP9Qqnn7777A1 2mb7gvyZVtqziK9RsSjV0NC/noHmi87FpswcYl1cdmMYLk00u3I7MQUQ0ViHZq29Z8vq eQMw== 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 Return-Path: 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.44.11; Mon, 22 May 2023 00:44:23 -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 S232450AbjEVHQ6 (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 Content-Transfer-Encoding: 8bit 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 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; -- 2.39.2