Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4120221pxb; Mon, 21 Feb 2022 12:38:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDxEDzuu/Gi3VIgSa39JZaQQYnDd1fYD3D6iNEI2Godw+LBN6lHd6LTGWWbVvvScPvuNmK X-Received: by 2002:a65:6d85:0:b0:373:79c6:9f15 with SMTP id bc5-20020a656d85000000b0037379c69f15mr17474776pgb.335.1645475882100; Mon, 21 Feb 2022 12:38:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645475882; cv=none; d=google.com; s=arc-20160816; b=mWxsyyev2/JMQNclkAJGOXpc0YI0hRkbsAOSRhtwT3CvttALCOr14Jnzk+KAyVIMln di1JtXhkyEleW5BYElay2I/7Yr54StDh/ihAWKHp5ndMPbQ8GvgOE5p84O/afi6VYK4n 1umfijndBVTIwr0e3QWmDIm5gp/e07uFiiWonXrSN3ssWDc0q6FfXmiccHEbvoMMeVw7 ARyi3PwRok9jgvjfkb+bJIBc/9dhMKOyHhW5zgLbMzEAfcB1uO+ZUd0OZjimLru6HYEz Tw6FlcHx3nlZafwDIn8lzDNniko2D+6sdLwWVgu8gcuT6zVyy7ROIrH9CdB5ztvL5Gkt ryyw== 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=v3RRUt/tGHuycwJsEb7vVCrEy//82IWZDKGiaOug+7iRcClTfwEDAEQ14I5hvTcBvC 1yQKkZM4fY0q4ICv2O9Vr61G0rV05jX4unWKNgnWLoOHnB7+46gnnc99hIJBjv9/cQEL QwxAaD24usFHaGbPGaurN/ZxeSu4NxsYv+3Uq0Ano7qlSKd7/CxcIa/nCDsyizyv7q5K lIN0BP+LUe2XKCt16FuDnVU1SI5uwaDhuIJDybMOchBzCzvcab6lsQRTUTHfn44LcZk6 P1yn13inlCFsbBmmfYYofetDrIti0lgW1/5oD1psQoz3z2AwpvkC9wQHGpZZhHnuXIo5 Y3sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qW75GoQ4; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r11si15990185pls.252.2022.02.21.12.37.45; Mon, 21 Feb 2022 12:38:02 -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=@linuxfoundation.org header.s=korg header.b=qW75GoQ4; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349735AbiBUJMw (ORCPT + 99 others); Mon, 21 Feb 2022 04:12:52 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237527AbiBUJIz (ORCPT ); Mon, 21 Feb 2022 04:08:55 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D97726AFB; Mon, 21 Feb 2022 01:00:49 -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 E6F95B80E72; Mon, 21 Feb 2022 09:00:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31C05C340E9; Mon, 21 Feb 2022 09:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645434046; bh=mlCVfXCI/MPFLPPvRfg1e5hONyIiSJQMvH37hKzLE5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qW75GoQ4YPEG9COf3cn1Oo+ci85bC6p43qrVlcFIBF4fXMoB86wl8Upr7EV9Zo2qt kjlnYinzxYFjkLSaEb/+p+DmPJjj4OSN2L7kSW29ERJvxLuyU0M99WygL24EqcvsoB tcceI8aGSwUWkmtcW4csmmhMmr74nrbWCEBJaW1w= 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.4 74/80] kconfig: let shell return enough output for deep path names Date: Mon, 21 Feb 2022 09:49:54 +0100 Message-Id: <20220221084918.001380263@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084915.554151737@linuxfoundation.org> References: <20220221084915.554151737@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=-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,T_SCC_BODY_TEXT_LINE 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 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