Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6066835rwb; Wed, 18 Jan 2023 00:14:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXuJdNvI1cyAhZlrquatg7bnyTwf7mzPjkpPOdNHK+8/Acv72sXjSmH3ukvYcguHIMHSkcKn X-Received: by 2002:a17:906:6c8b:b0:867:f167:43be with SMTP id s11-20020a1709066c8b00b00867f16743bemr5303206ejr.77.1674029690629; Wed, 18 Jan 2023 00:14:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674029690; cv=none; d=google.com; s=arc-20160816; b=I9C70jkQuzgC2BIaQYhd/lxXOINyotlEMRyt6ccBRDIU1fo+Yb7KZZfQkvp65E1Mrs O4q43kf0gPJrg/IljJWtbcDxQXmggzTRmUTwCllSHu/g9YR6DYfXUwfnZD5gn68iGXuy GyBGhKdT2GhJCHB3CH/Gz3T7StC54QcC8C3L0MszHsgaAIaMfHIFzSp9+4VuPFeoQXK6 LuJXZIl1mFEfnldWlBDWMSTsoO1HiCtz88XNEpZ7zNJErOT067B4+CX/3BUUigSRnDDb Kz5aj1j5KGDE5a1043JTq65ihf7poP1yIgTsMc4hivQ3PCgawHmSCzBv45HvkOZ93Usp Pmxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=BmDuPiZTnXYbOIzD2jNp0kJvb9bvYiWgOUmK4imfuUs=; b=savIXr+cKpdV+dCfW2ctVmTQMe+4vTP8yOH0rmfTc9ufFVQbepGqfzdVPWoknsaQCQ 5dCBZ0DdCDTTej6AkDrI0tdNJuCisR2dXqs6gbOTXrezyWHc/bROqJqbErG/ZAw0R41u TIaawQOCFYi7OhtXR9HGWuVl9wOMSMlVjBBVnAW4Y5TV+b4UlGaCcnMgCsNow4iYQB6Y ExhJxbUnWNLMDPM6eoLEkCiwEU0AMajbXvNYqCSZVDIQ/+myDzNTLxbHxSLZl8IpBKeQ sDh9haV4d/mbFgm7/3Z1knrARSagijQeFsO/uD/UHTV2uEwR7M8KU2/uRM2SegglmYKz BoKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GHARI1gd; 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 hb44-20020a170907162c00b0084d4707b50bsi33638932ejc.698.2023.01.18.00.14.39; Wed, 18 Jan 2023 00:14:50 -0800 (PST) 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=GHARI1gd; 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 S229654AbjARHt1 (ORCPT + 46 others); Wed, 18 Jan 2023 02:49:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbjARHr2 (ORCPT ); Wed, 18 Jan 2023 02:47:28 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 531AD45236; Tue, 17 Jan 2023 23:16:56 -0800 (PST) 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 CDD95616C6; Wed, 18 Jan 2023 07:16:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 414EFC433D2; Wed, 18 Jan 2023 07:16:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674026215; bh=fMdiTni2gMvcsKxUoV8Xq96M3e8d2FKt/Z2+Ho2gGYQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GHARI1gdwPtbgorOO7XpOh6wzyb0pqbkfxntZx/n8ts+D93dWmq9wAl7q7m1UTimX nbnClMbTijjFUwfoGaZ7x+zin/HON9yHZ2RY7dheYfvb5gEqWTrJp6jltkdaSYI9og e1bKLIZr/R1HcwzBLxSuwUmKMPiKGVDMfAB16J1HhJQWXmyOUXyBD/+I/KQy+J6Ht0 ccJwdGaoNMbsupEi89SFHdda/5GIhq0KUiHh+7QEZVIyKV4c6LT8QNn4K71LxgCzcG pRqq/xKxlZjMCWP6WII2akAQewH13/EwZ2bXdqheimpY2Mc6Zi0FVFvH2dU6aYhOns YMcxRmk4HLH2w== Received: by mail-ot1-f41.google.com with SMTP id v15-20020a9d69cf000000b006709b5a534aso19181668oto.11; Tue, 17 Jan 2023 23:16:55 -0800 (PST) X-Gm-Message-State: AFqh2krEEkbuQJI7dPo5qhMTtc1nltB2oV4Cs5V84dGumfV2lw28OLW3 +u2pzDu79e6ElqBcdEEtFgPuqvMTWMC2pCqseYE= X-Received: by 2002:a9d:1984:0:b0:684:c0c2:59c6 with SMTP id k4-20020a9d1984000000b00684c0c259c6mr319508otk.343.1674026214533; Tue, 17 Jan 2023 23:16:54 -0800 (PST) MIME-Version: 1.0 References: <20230117-kernel-kheaders-cpio-v1-1-058d3e1c8621@weissschuh.net> <20230117131919.3ywkaptian2y242d@t-8ch.de> In-Reply-To: <20230117131919.3ywkaptian2y242d@t-8ch.de> From: Masahiro Yamada Date: Wed, 18 Jan 2023 16:16:18 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kheaders: explicitly validate existence of cpio command To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= Cc: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , linux-kbuild@vger.kernel.org, Amy Parker , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Tue, Jan 17, 2023 at 10:19 PM Thomas Wei=C3=9Fschuh wr= ote: > > On Tue, Jan 17, 2023 at 09:46:02AM +0100, Nicolas Schier wrote: > > On Tue, Jan 17, 2023 at 05:30:43AM +0000, Thomas Wei=C3=9Fschuh wrote: > > > If the cpio command is not available the error emitted by > > > gen_kheaders.so is not clear as all output of the call to cpio is > > > discarded: > > > > > > GNU make 4.4: > > > > > > GEN kernel/kheaders_data.tar.xz > > > find: 'standard output': Broken pipe > > > find: write error > > > make[2]: *** [kernel/Makefile:157: kernel/kheaders_data.tar.xz] Error= 127 > > > make[1]: *** [scripts/Makefile.build:504: kernel] Error 2 > > > > > > GNU make < 4.4: > > > > > > GEN kernel/kheaders_data.tar.xz > > > make[2]: *** [kernel/Makefile:157: kernel/kheaders_data.tar.xz] Error= 127 > > > make[2]: *** Waiting for unfinished jobs.... > > > make[1]: *** [scripts/Makefile.build:504: kernel] Error 2 > > > > > > Add an explicit check that will trigger a clear message about the iss= ue: > > > > > > CHK kernel/kheaders_data.tar.xz > > > ./kernel/gen_kheaders.sh: line 17: type: cpio: not found > > > > Thanks for the patch! What would you think about an even more verbose > > message? Perhaps something like: > > > > echo >&2 ' *** "cpio" is required for "CONFIG_IKHEADERS". >&2 > > Wouldn't hurt obviously. > The other scripts used by the kernel don't seem to try to provide this > kind of explicit message either, though. > Having a line number, some sort of "not found" and the name of the > command are enough, in my opinion. > > > Reviewed-by: Nicolas Schier > > Thanks! > > Thomas Applied to linux-kbuild. Thanks. --=20 Best Regards Masahiro Yamada