Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2955986lqz; Wed, 3 Apr 2024 13:33:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUhvw13Lm+i05IpqLxfo46mf4L4PQOtTsPbsjP2RD2Cy/THpWvVteGXM+9sMmpqqgyTZ59C6/8iows8t4sqo5ukO3FvSgC/pA+hcDyiKg== X-Google-Smtp-Source: AGHT+IEJP5U9ECQev8RsWJRa4X56LXgrSgpqIWVW3cRM6tGbkqmAg6q/CdkhTZ0hAzmByplqcYxA X-Received: by 2002:a05:6a00:10d0:b0:6ea:c4e5:a0b2 with SMTP id d16-20020a056a0010d000b006eac4e5a0b2mr689772pfu.13.1712176420814; Wed, 03 Apr 2024 13:33:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712176420; cv=pass; d=google.com; s=arc-20160816; b=cwsMvATXZrnfeIBE0hfd5Efu8Q9Q+oX1+giCqacjBe1jbOCI85DHT5c4M4nD2xiuVa rIYK6y8pi731y/Wwz9M5eZiEhcUE+IFwsl6dQRs4AitwiJ1xYRwsS6OAEAwDxz4qC3gS 1Iws68mm6pewMWq2vkXC9e4eLJbzkUMdTN4Oc3Zk0iRoEu9uUmGJXYZgYcqq71b9Olve /bgxaqh98HjuAAjCC1XDXNkzQsyKtYhijym/sD30kddvKSFxFMUxvxjMbz+w1FOMg+MP 6EEphgwbfyKvcbZEUwQo2sxnEwJP8zxC2Zwv6MD1ogb96La5QOAXvSSaf7DqKamnJto7 hytw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=gQUdJmv3lZIcc6oAO9Ysb625zAIPWiPk7o3HfY8oKDk=; fh=TVXd0y5hQDQwEB4X/X/dXXr2z1HYoOu7MkWvvlf648s=; b=Gjt90ITLTamD3QTQsYW3DFAVWW5noW41+DL9lYNzV/rBdwguvSiO9/G7LAwA6yX5vF ztDMIphImVKXCCqyynpzx6Nu9h1yoPhMEBWKfLkONN1Yv77sGUATcg3ovAG5lzD4jfdw 8HCqfoO4NTdZgIWZMqM5tUrFHANYGYqZMyxrsH5HQRASxEvZI95v2OIjxy/6iAhUlpg5 05arYnMDfx/hykU+5mUuge97rQgc4KyhlBdc6iiB/Kj9qNIY/YF141V5stHEHTUYKzSd 8TCvjFoKr5X4sOnZ48A24NN0ys0yCh8vX3JFJK4H8ZJIILkaAYVCRsP+fR4hdoGpAvX6 w0yA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=tukaani.org); spf=pass (google.com: domain of linux-kernel+bounces-130530-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130530-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ls30-20020a056a00741e00b006eac25f3a21si13408633pfb.43.2024.04.03.13.33.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 13:33:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130530-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=tukaani.org); spf=pass (google.com: domain of linux-kernel+bounces-130530-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130530-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E73D0B29C85 for ; Wed, 3 Apr 2024 20:00:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 37202155A2A; Wed, 3 Apr 2024 19:59:16 +0000 (UTC) Received: from mailscanner01.zoner.fi (mailscanner01.zoner.fi [84.34.166.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADE961553A1 for ; Wed, 3 Apr 2024 19:59:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=84.34.166.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712174355; cv=none; b=WFJR/eS024rUnR0ZTJjSJj3Q1QqCmitOOsOY7hhrQ+uMtwDKMgMaDOEeHM6N+MYh+DOFEJttQDP3PgZke8EPum7SvED4PnrnfA+vzoBR8Ka3M1XQ7wC1N1IYACsFlPGaqUeWS9ReytyysTmnHWvMMZGM160PsR5VOMWAnWbBwwU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712174355; c=relaxed/simple; bh=KR9CdPgMOf6FrLUtHF73U+GXxBqurEfaGjwrIK7zXhc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DQ4bqg9o4fS4ZhPFuRhUEBAiLuw2tCgXoYcJ0teZRQeLjKndmqvB72GJrMAD6bZKVLannYUqH/Z0dHH3EGlKdmKqv4aRS6w1vPwUtKLNdBu5VSTVP2ysBzYzOR47BW/6/exea/U7SkCXLe+9/XoBY/Yy5W4XZT9FyyMcYMA6KMI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tukaani.org; spf=pass smtp.mailfrom=tukaani.org; arc=none smtp.client-ip=84.34.166.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tukaani.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tukaani.org Received: from www25.zoner.fi (www25.zoner.fi [84.34.147.45]) by mailscanner01.zoner.fi (Postfix) with ESMTPS id A88F342E21; Wed, 3 Apr 2024 22:59:04 +0300 (EEST) Received: from mail.zoner.fi ([84.34.147.244]) by www25.zoner.fi with esmtp (Exim 4.96.1-7-g79877b70e) (envelope-from ) id 1rs6lE-0006L7-1i; Wed, 03 Apr 2024 22:59:04 +0300 Date: Wed, 3 Apr 2024 22:59:03 +0300 From: Lasse Collin To: Cc: Andrew Morton , Jubin Zhong , linux-kernel@vger.kernel.org, vegard.nossum@oracle.com Subject: Re: [PATCH 11/11] xz: Adjust arch-specific options for better kernel compression Message-ID: <20240403225903.0773746d@kaneli> In-Reply-To: <27db456edeb6f72e7e229c2333c5d8449718c26e.camel@16bits.net> References: <20240320183846.19475-1-lasse.collin@tukaani.org> <20240320183846.19475-12-lasse.collin@tukaani.org> <27db456edeb6f72e7e229c2333c5d8449718c26e.camel@16bits.net> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On 2024-03-31 angel.lkml@16bits.net wrote: > Under the light of the recent xz backdoor, I should note that this > patch (patch 11) does: > > > +# Set XZ_VERSION (and LIBLZMA_VERSION). This is needed to disable > > features +# that aren't available in old XZ Utils versions. > > +eval "$($XZ --robot --version)" || exit The eval method has been on the xz man page for a very long time but I agree that due to the recent events the above method is not ideal. It can break also if XZ_OPT or XZ_DEFAULTS contains something that they usually shouldn't. For example, XZ_OPT=--help would make the above eval method run the output of $XZ --help. > So, in the spirit of keeping a fair amount of paranoia, and since it > doesn't do any harm, any such code should be failproofed to ensure it > can only import the expected shell variables with the right format[3]: > > eval "$($XZ --robot --version | grep '^\(XZ\|LIBLZMA\)_VERSION=[0-9]*$')" || exit I would rather get rid of eval. I committed the following to the upstream repository: XZ_VERSION=$($XZ --robot --version | sed -n 's/^XZ_VERSION=//p') || exit Thanks! -- Lasse Collin