Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4726726pxf; Tue, 30 Mar 2021 15:47:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4ntFj88YDRap/V2jznTarT5gc+CXYeQbCkIs79K1o1M/jfdSQr5986E545kU3o0XI6A7n X-Received: by 2002:a17:906:8a65:: with SMTP id hy5mr466960ejc.250.1617144464362; Tue, 30 Mar 2021 15:47:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617144464; cv=none; d=google.com; s=arc-20160816; b=LgEKeKzECiWW0Fcd5OTMJxbM9d8DXKZPLvDOZXY1+f6/w1OtTnNM7vwZ/zkOjLnyMZ MyF6GrYEsM5p4unSZthn+dQADXkbQvKd8jCR/YbDmejrbfXn7TW6Tx6tUVRs5SFC5EO9 qEDvhhL8LBdvPT4ELNpMHm5Ww1UdM5KGPoAH2H86k15VSMkmVVWg0NEmqodVzh8ptvWy F8MXm7aVqW+vAQ06CbM+Tqa7XIxH+1hPg13uR5MgG62GVmniPenmRd8RmTh9hKh5Qh3I 3VqhX8fpNkQUMLOhxK+xe7XbCk0Rljmogv5vj0nMJF4sF2wEb/cfEHr7G+u2wHfCwbFJ rcFQ== 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=JXAaMKABaV2jajtKsKxGYYT+hHSjapVgGR5gnAv4wPY=; b=XmYNc/sm+/nHimK6cl4rYjmINh0JXqjr79ZtYljg2bLwnYuGZVbSpr+GUkgVHQkane CFIzqeIsJBBJrc+4lztrZLjyvWiQYeXc1AgLDOC+QZvaCnSSjCXef3L06sZ3Fe8CUsfB yAzQzQQt087wpAnyL98yogtRGnaTPOUpUFDSYy7fZJlFT4djbm4pChnS2gpa3aXIwfAs SEyHaFGL8DJd6dfYWvWX0oFXzME3rBs10akvwBMyiVBIWcj6PboDMS0SpOwMu3GkByat MvxVDzOFHdjZdozxWojM4T9epD3MKobp6uoHiX04UIM7ocwc7PVk8mDLMyTEIWzLpUAZ R4+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rpG4RHEU; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si306610edv.308.2021.03.30.15.47.20; Tue, 30 Mar 2021 15:47:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rpG4RHEU; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232883AbhC3Wqs (ORCPT + 99 others); Tue, 30 Mar 2021 18:46:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233093AbhC3WqS (ORCPT ); Tue, 30 Mar 2021 18:46:18 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6299AC061574; Tue, 30 Mar 2021 15:46:18 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id cl21-20020a17090af695b02900c61ac0f0e9so2004390pjb.1; Tue, 30 Mar 2021 15:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JXAaMKABaV2jajtKsKxGYYT+hHSjapVgGR5gnAv4wPY=; b=rpG4RHEUrKUL6vWLsoj95XHwN2l0nQLe4AAc8HhYTS8iauHIrun2MGyTAmgQbOhmJC WZWrL/YFsAL6U1Gc7+PrZOfsRKKkkygUbOsLM0pChao5wo9Oy1r9tOQzPkVu4Rv9Rtnk oABxDCZz+2hIQYOhZdZdVKFyOzGFLrDJ2dJMMkYryx6WBzGiXxbO6/2RYlHOF7UyRq8E u1LZWOjVtmS9EZA6/onhpk99mJUYA1VCu0PYRjCaClpn5fDxNGDlDUO5PgNILTG/5gfY xsz4T5W4nMnY2aX9NzMwdy5edsXDfOF6Xsc8tJH4mkkbxrzQWJrCLMARlM0HvIxgb64O lGcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JXAaMKABaV2jajtKsKxGYYT+hHSjapVgGR5gnAv4wPY=; b=n8VPyHMhXbamZHBo5cOO3V8nrpQ4g8sLOQV23tkRExdgPw3ZnuWTjq4w5Sh438ySNl MgII9sDWCQkYg7/JRhv1F3vmB8wDTfLRQsbklPKWVkjDWxxRaGUJ9HAxuLyryUqG2FI7 D+cbdftxJgyhL0DQaaa4X8DAk8056/0tliWHTOUIWhQvrZzNqtzfE9mBEkJkTUFu8g/o tDG7SklfWlrksPffCb7/w0lJ3/icFgHRssNwXNNqFVoW/VP2vR69IlWYEUxrq67ZDDCP 7CTvozfIlN0D7H+l5mUgvQV/ihsFnWS1x5AYm/It6DdULHwWaq2PUBqi2Pc4vIKLjhBb plaQ== X-Gm-Message-State: AOAM531PGwvtqVtMJepbTMVhK8UUAFUEg9R1m+4bZ7Qn8knBd2NE+puJ DD2uEwKa8/4VXEQt7W+S2U8= X-Received: by 2002:a17:902:8685:b029:e6:5ff6:f7df with SMTP id g5-20020a1709028685b02900e65ff6f7dfmr517568plo.40.1617144377869; Tue, 30 Mar 2021 15:46:17 -0700 (PDT) Received: from nickserv.localdomain (c-98-33-101-203.hsd1.ca.comcast.net. [98.33.101.203]) by smtp.gmail.com with ESMTPSA id t12sm227780pga.85.2021.03.30.15.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 15:46:17 -0700 (PDT) From: Nick Terrell To: Herbert Xu Cc: linux-crypto@vger.kernel.org, linux-btrfs@vger.kernel.org, squashfs-devel@lists.sourceforge.net, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Kernel Team , Nick Terrell , Nick Terrell , Chris Mason , Petr Malat , Johannes Weiner , Niket Agarwal , Yann Collet , Christoph Hellwig , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , David Sterba , Oleksandr Natalenko Subject: [PATCH v9 2/3] lib: zstd: Add decompress_sources.h for decompress_unzstd Date: Tue, 30 Mar 2021 15:51:11 -0700 Message-Id: <20210330225112.496213-3-nickrterrell@gmail.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210330225112.496213-1-nickrterrell@gmail.com> References: <20210330225112.496213-1-nickrterrell@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Nick Terrell Adds decompress_sources.h which includes every .c file necessary for zstd decompression. This is used in decompress_unzstd.c so the internal structure of the library isn't exposed. This allows us to upgrade the zstd library version without modifying any callers. Instead we just need to update decompress_sources.h. Signed-off-by: Nick Terrell --- lib/decompress_unzstd.c | 6 +----- lib/zstd/decompress_sources.h | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 lib/zstd/decompress_sources.h diff --git a/lib/decompress_unzstd.c b/lib/decompress_unzstd.c index c88aad49e996..6e5ecfba0a8d 100644 --- a/lib/decompress_unzstd.c +++ b/lib/decompress_unzstd.c @@ -68,11 +68,7 @@ #ifdef STATIC # define UNZSTD_PREBOOT # include "xxhash.c" -# include "zstd/entropy_common.c" -# include "zstd/fse_decompress.c" -# include "zstd/huf_decompress.c" -# include "zstd/zstd_common.c" -# include "zstd/decompress.c" +# include "zstd/decompress_sources.h" #endif #include diff --git a/lib/zstd/decompress_sources.h b/lib/zstd/decompress_sources.h new file mode 100644 index 000000000000..d82cea4316f5 --- /dev/null +++ b/lib/zstd/decompress_sources.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* + * This file includes every .c file needed for decompression. + * It is used by lib/decompress_unzstd.c to include the decompression + * source into the translation-unit, so it can be used for kernel + * decompression. + */ + +#include "entropy_common.c" +#include "fse_decompress.c" +#include "huf_decompress.c" +#include "zstd_common.c" +#include "decompress.c" -- 2.31.0