Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4445610pxb; Mon, 21 Feb 2022 21:52:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxxHBlu/9i4IQvRi851qX8OaNXLDKvHvcNLwNs4IlosRmhpUftsekoXdAuc/3sQFd89ZQF X-Received: by 2002:a17:903:234f:b0:14f:ba1e:c062 with SMTP id c15-20020a170903234f00b0014fba1ec062mr7825448plh.71.1645509133971; Mon, 21 Feb 2022 21:52:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645509133; cv=none; d=google.com; s=arc-20160816; b=nlfn88YLyORPaJkhh8dBBYC/tX7/BklhCwnwgtv2kf1vFcQoj6DQbxV1Vf72FpRKJl KCDlhbqvoRDbTbB+cu0pSn7AzsKx5yLt/xN+WMzaoTK1UHEiUn1Ifz73HAUotBGTKLTc o2pL092fPSM+XITWs3VVS7hY48TOQN88SUS4/F7s+LTjVW490xAYGvv+peCdpFxvcm0t 9+ao3hh6GE+JcHClp2Qym3JW6cl679C53H+EtJL+6UBmQKfZY7j/WvGgQB7fcdnAReLP KCwnZcSw6Um8YZ3jc9ClVzVG6z+6z+P9PE1HR33H2l/nFFpKtD7QrZfe6amW7I7/jx8c jJhw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cp38BRkDSH/VFAWSbC9LeXkoD/JUjMq1ZG2fo+KvXTA=; b=KaS5ygwrRpGi0OW6DgsWFzyIMdUKB5yo0T3aHf4tMdPJn8FpG33n50VT8XXwWl8NAy BWpnMhnnbe/A5UdxWtH6QrQuCkoBWdVeLtWKUyqCI72SouHyu4fYBF+ZbtN3YUmQHuXe jkmgwnEmSsbxrEQzjJBkUaxusvRmUaAdGTPD4fZJ/oU5eMNg94yjFFnW7GTvz4suK4xC 4X8I58MGoPjk5zirxSYTTOiJ8xKsx6cDjxgfURmloWumd+F556RZJ1j0guAElJ8B3SOv Ssxd8lbeGki2WIqn+6AYkBCx2kVOydMkKgsSDx+Pz17a8O8UvxkaRPfnmAiB4COuyhy4 EAOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="VUcwi/LW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s14si19763540pgq.585.2022.02.21.21.52.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:52:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="VUcwi/LW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 311D6E6843; Mon, 21 Feb 2022 21:15:28 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353016AbiBUKJV (ORCPT + 99 others); Mon, 21 Feb 2022 05:09:21 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353552AbiBUJ5c (ORCPT ); Mon, 21 Feb 2022 04:57:32 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D90410FF6; Mon, 21 Feb 2022 01:26:48 -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 ams.source.kernel.org (Postfix) with ESMTPS id E26C2B80EB8; Mon, 21 Feb 2022 09:26:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B0A4C340E9; Mon, 21 Feb 2022 09:26:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645435605; bh=mlCVfXCI/MPFLPPvRfg1e5hONyIiSJQMvH37hKzLE5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VUcwi/LW5pFRT9MyBBVDxwSblD+ZkirQuVrNAyuWBzDelLFfVPwdzWWYd8F5p4RWa NBOzIRhVKbXq6elo9py05UR6vlX3LDH5GyCWMYQheJe8kcE7zugldem9J/lCx2wHv4 m+cDxytqcIBpnQ9qqf9+b/cl78UTKC6if4Nahh8k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brenda Streiff , Masahiro Yamada , Sasha Levin Subject: [PATCH 5.16 215/227] kconfig: let shell return enough output for deep path names Date: Mon, 21 Feb 2022 09:50:34 +0100 Message-Id: <20220221084941.962293917@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084934.836145070@linuxfoundation.org> References: <20220221084934.836145070@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Brenda Streiff [ Upstream commit 8a4c5b2a6d8ea079fa36034e8167de87ab6f8880 ] The 'shell' built-in only returns the first 256 bytes of the command's output. In some cases, 'shell' is used to return a path; by bumping up the buffer size to 4096 this lets us capture up to PATH_MAX. The specific case where I ran into this was due to commit 1e860048c53e ("gcc-plugins: simplify GCC plugin-dev capability test"). After this change, we now use `$(shell,$(CC) -print-file-name=plugin)` to return a path; if the gcc path is particularly long, then the path ends up truncated at the 256 byte mark, which makes the HAVE_GCC_PLUGINS depends test always fail. Signed-off-by: Brenda Streiff Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/kconfig/preprocess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c index 0590f86df6e40..748da578b418c 100644 --- a/scripts/kconfig/preprocess.c +++ b/scripts/kconfig/preprocess.c @@ -141,7 +141,7 @@ static char *do_lineno(int argc, char *argv[]) static char *do_shell(int argc, char *argv[]) { FILE *p; - char buf[256]; + char buf[4096]; char *cmd; size_t nread; int i; -- 2.34.1