Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2040416pja; Thu, 26 Mar 2020 08:46:35 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtcfEW7QtOKbDjWfS1jn1bCEf3gf3DjDt9LPG4YCg3DguPR6+AhRC7zLGlhZaidxNHm3t9C X-Received: by 2002:a4a:cb02:: with SMTP id r2mr5679550ooq.28.1585237595151; Thu, 26 Mar 2020 08:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585237595; cv=none; d=google.com; s=arc-20160816; b=s0Q/v70+kQPt4yptePxvO2buIW62I8qrkzlRxYZtFP69g6XixCUU7PyNILr+KjpBip iuZf4inPr7OkowocxVCyKXDE3UNY21vIOHgou6L2S7XIbOgIq4IIxHfisgJj+g2g8QIV V5S7i5JdGbiECwxIuATpI1+FqBif5fIDu5l4mQnZHiIkDDKAEX7Y5dkr/DMvWgmvkya1 5HuocRjdk5+9dJ6zoE1VfrkAO0YIEWpJHyQLug4PpIvbq4VEgZdvJfZ0WXDA9c1tLdML hhMezEQZPWDTjU8dzpXvm9CmZxYcrKE0ZdfqATZcpSY+gLt2PlKT6t50T9xxnbKK2qpe SYRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XEACa47R1YYA9qHdOiFfEkBUAM/n215wAmRNcBN8QwY=; b=tV+xwnTTKHNnGRULkCLeOXmDv31VoNqL40Zg7QvdylZFPOzZRWfsL6jH5O0tMI0Lf8 j6PIcUHQQGIEF9OoUGFNPjc0xDEoc9k8ZX8Rzdpli/bPf8gSx/TwXyBSe5R0aGHVP3GH TBhXsTPRuLAas5AVvHBxjM60+5KU4AN1n7JuxYQQHUg+T2OI4pAQN76EoHICpQN9Tfoc qztwUmj3bqigdn5svGOOTuFx1unNByzcU9dxGNSsWpQK6+2fSm9CU7raAcEzDuxEZCv3 /uxsEHPqzwlCu42O9o5s/M/x8k2xcMhLSQQU4G/41ZbyBL9cVRk5tmRWg7OrCarrVA54 XrWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@malat-biz.20150623.gappssmtp.com header.s=20150623 header.b=Fdjop2Y7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l13si1212547otb.102.2020.03.26.08.46.20; Thu, 26 Mar 2020 08:46:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@malat-biz.20150623.gappssmtp.com header.s=20150623 header.b=Fdjop2Y7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728392AbgCZPkv (ORCPT + 99 others); Thu, 26 Mar 2020 11:40:51 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40949 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727495AbgCZPkv (ORCPT ); Thu, 26 Mar 2020 11:40:51 -0400 Received: by mail-wr1-f68.google.com with SMTP id u10so8360484wro.7 for ; Thu, 26 Mar 2020 08:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=malat-biz.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XEACa47R1YYA9qHdOiFfEkBUAM/n215wAmRNcBN8QwY=; b=Fdjop2Y7+L6YPRRq3UV/wtGW2NHguQSXMW9DdVOKRM4FI1a8TVD6RUBb0p2AL+YVLY 86uf2MCprux6gKpqMXQDyPrhgzrLd0BGo6ylK+XeCEcD/nguONB71GyxnKzUwL32llKH 8RRO+S/3awfwIojE86vdypyUtHq0HjV23+eovqI+vKi0BSfl190styxTnAoFZI4r/JtM ZO2oYik9u03NDJGJ0jvgTAA8EF02O1EKG7Kt0n5Sp9xanFHBJcPXt/8+u4VVoJzlY17e 6MdsWQVcPMDqCqpsd8LwzihzaT70AI/h4QYoAVotXdBQjFaSPnDZDj11WzNtDEga5WnW 8jJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XEACa47R1YYA9qHdOiFfEkBUAM/n215wAmRNcBN8QwY=; b=swLgcgmo/CgBz0I8S1rkexFRHSHAXxkHX1IaFrzjk8yJgiJ0PD3YCxbCdlkCoUOlce t7l00GKimyyhrPx3h2+2vF86lmp68yI0ZcEsY3GAk8EQAy7TYnf8+Qe6P3/7xyTDQaBW M2XFMxfQAmA966y2JRow9lzmL2iMXATXgFBBtN6DRvrA49HJx4vUyWlYgivk8BbRbAxv k+6U8HvXRvWeYB1oSiEYNP68a5J60Z+fTO8h+5EmCUJdLU/j/8xBY8rRYGQ303wfMJ6X cEFcy6gLldeFjGKd7DXiOWnYyLrmQfmFM5kolXOCndiEx3F36CtLiAq2pv4x9bJrEdWr 9PVw== X-Gm-Message-State: ANhLgQ0jrFSbN9lBIQmCBubszdieQdMDVEWyoZK3X6c5bnJEl5H/0w/L IlGlCel4mcfWht/3/ePeseZHrA== X-Received: by 2002:a05:6000:370:: with SMTP id f16mr10335036wrf.9.1585237249033; Thu, 26 Mar 2020 08:40:49 -0700 (PDT) Received: from ntb.petris.klfree.czf (p5B36386E.dip0.t-ipconnect.de. [91.54.56.110]) by smtp.gmail.com with ESMTPSA id c5sm11522353wma.3.2020.03.26.08.40.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 08:40:47 -0700 (PDT) Date: Thu, 26 Mar 2020 16:40:38 +0100 From: Petr Malat To: Nick Terrell Cc: Nick Terrell , linux-kernel@vger.kernel.org, Chris Mason , linux-kbuild@vger.kernel.org, x86@kernel.org, gregkh@linuxfoundation.org, Kees Cook , Kernel Team , Adam Borowski , Patrick Williams , rmikey@fb.com, mingo@kernel.org, Patrick Williams Subject: Re: [PATCH v3 1/8] lib: prepare zstd for preboot environment Message-ID: <20200326154038.GA21231@ntb.petris.klfree.czf> References: <20200325195849.407900-1-nickrterrell@gmail.com> <20200325195849.407900-2-nickrterrell@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200325195849.407900-2-nickrterrell@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nick, I finally got some time to review your patch, here are my comments: On Wed, Mar 25, 2020 at 12:58:42PM -0700, Nick Terrell wrote: > * Don't export symbols if ZSTD_PREBOOT is defined. I'm not sure if this is needed. When I worked on my patch, I have found that all exporting and modinfo macros generate symbols in modinfo and discard.ksym sections, which are then dropped by the vmlinux linker script, thus one will get the same binary independently if he puts this change in or not. I'm not sure if this is intentional as there is also __DISABLE_EXPORTS define, which should be used by a decompressor (according to comments in export.h). > * Remove a double definition of the CHECK_F macro when the zstd > library is amalgamated. > * Switch ZSTD_copy8() to __builtin_memcpy(), because in the preboot > environment on x86 gcc can't inline `memcpy()` otherwise. > * Limit the gcc hack in ZSTD_wildcopy() to the broken gcc version. See > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81388. No comments to the rest. Petr