Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4778652rwb; Tue, 17 Jan 2023 05:31:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXt55z2VNvVKDRFPKQ3yU+tVtqvCKTO4B6eP8gn5Dl3RCuB0gofeAQwD0wmjoAALrqJupHZV X-Received: by 2002:aa7:df18:0:b0:47d:ca3a:3b32 with SMTP id c24-20020aa7df18000000b0047dca3a3b32mr3132706edy.9.1673962278733; Tue, 17 Jan 2023 05:31:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673962278; cv=none; d=google.com; s=arc-20160816; b=YjnCvQQniq7GSP4ms4P9QLDw8D5psh7nLLaXf4qmKQpQvmP/5jQYgE0hdsQqhUMsxl UuallvhHBhWuNNShA8ymFRh30LjXyuDIxbQIhPcQ15HdPBH0Lew1pVX82par4Om5KwBf tgLVdBR8khXV2qRtE9wnaACNvWFVMWYLzwrQ8nM05hX0Scu01gdbXR+RIcX/gmE5uCbB bTETrXExjqK4gveFUHJx4N8gfoStFkHT6NCFD0kmx1odW2FMNJRFijO1lSH/1VgfylwH IfpCYnoDS7b85/z08toWl7holSXj96VVlt+FbIX5H8T4i6k5dNNRmxTNbHgz///oVfLh MDrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=wKyj3SyZUxuQn4XOEJDt11kFepEr+pr7ukFfk3Cei40=; b=CRmTe8PRPLz8OyzjUKBCNOTKlE4MiNDX8kkouPdu2HhXHMReqHqEdDKoHV8Abn7SEt 6AGRlq2YEEC3tCBh0te6qDHqqSbV+ZSbJU6ZNKkMoWa9TJkLUfDA8XztFOchvR1JIW0x XcRAfeGZNOA3N2fqRmUQQV9T+vHkQ8qZ7XElX4f3AkBmR6n2grJoNHqNZ1jgCJ90Zp9y SbO96watlXLKAJzqxcm5X2AoTT3eUp4RioDWkuz8lNNGpEiMd/YlR4XdPwNc8i4YvsWO gPb2TKF0yqJ8W2E94ws0ZYUhxin5mAZNvIglmQaSO2+PkmMxPhRS1Qu49eQnNKI/zut4 riew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@t-8ch.de header.s=mail header.b=b6JM5KZK; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm20-20020a05640222d400b00461f44d7bfcsi30621728edb.573.2023.01.17.05.30.59; Tue, 17 Jan 2023 05:31:18 -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=fail header.i=@t-8ch.de header.s=mail header.b=b6JM5KZK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236775AbjAQNT0 (ORCPT + 50 others); Tue, 17 Jan 2023 08:19:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235653AbjAQNTZ (ORCPT ); Tue, 17 Jan 2023 08:19:25 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B98838EAD; Tue, 17 Jan 2023 05:19:24 -0800 (PST) Date: Tue, 17 Jan 2023 13:19:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=t-8ch.de; s=mail; t=1673961562; bh=pZa+dtTdSMjanJ9Lbe1aX8Frcq6MgE+SaT/yIDljxS0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b6JM5KZKuej1lrKNVnqFhfw7VDRd32K69KLc8fG49arUzQ/O4nPfmcTYqjgs/iYGD RrVnSPlJNlc8axsI1XrDoE0S4/l5AMuD/lyQDDuAhpIVIBl5TomQYmrQs8nBGb/lG5 1/Z8EHz5ib5ZzMfyTS4P3RMO3D0YRz7BoNcnoHRw= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= , Masahiro Yamada , linux-kbuild@vger.kernel.org, Amy Parker Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] kheaders: explicitly validate existence of cpio command Message-ID: <20230117131919.3ywkaptian2y242d@t-8ch.de> References: <20230117-kernel-kheaders-cpio-v1-1-058d3e1c8621@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 09:46:02AM +0100, Nicolas Schier wrote: > On Tue, Jan 17, 2023 at 05:30:43AM +0000, Thomas Wei?schuh 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 issue: > > > > 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