Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp639286pxb; Tue, 5 Apr 2022 16:56:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH/8oCaKVvr+U9NvkZWuTskhfk0/0cWmp1kRhycy8eqkONE8huPJpmNXBLXAbxrx/m783f X-Received: by 2002:a17:90a:f2c4:b0:1ca:a43b:90c9 with SMTP id gt4-20020a17090af2c400b001caa43b90c9mr6767417pjb.136.1649202964502; Tue, 05 Apr 2022 16:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649202964; cv=none; d=google.com; s=arc-20160816; b=bTj1s9W1/RZDDSTjwnljuxwc6TRzFbW23MzrI0t/lCrCSSTq5cCNxvmyVUMaBi0usT 2Ozd0Jw34pFP8J+n3/4TloFZ3a3/KHAO+4ERDwmxRMkz71eg5fhOuA3MwNBzLWWRP7MU sVdqYer/ay+rJOUmHMUJEKcz+FEOWbO/PkVIQ6pwtPpq2ocRij1d22q88XlUfcJekVHd Tv4ZMOF0aeUEhiRaKbY7sgOE07PA7Qi01vjuSnrBgN6yMEYUXlNq4lDmNgN12DxW+F1a a08OmEmemkIsZlrDpz+eejFatKvqI7K1yoPHbAUr06nXfyYdsR0oUApWxFdlaQHtFhiE Gg9A== 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=o7xvVm7GvmbXDd5g5ZJ1p43PLYlyCHAfeTUegg3ixrk=; b=VY/W3jsAElyDR3ypFbSyX51w5VyPf5ew3hMae41MhahxLS8/XzooK5yaWEGCYmRQOb 3Xjp1CxLSgpTr55/MozgdqmXsN6I5XVq5m+8dtDp8gKY7aOgVbQYrHbsZLnaU2rfeXV4 djxTiEi9plU6IIGWGa7F47UF56K+VUn9tokHWJQ/U5Mp51Ibx2/O/H9AQAH6Z38vAGfj Jlpqeqw/x0BjFHUnDttwG0vFfg9wl4MG3tE21aLtFwZZY7H4xt99+zbNxTDg1lunZD63 Kh5JnXg4TU5JGXFxl/AZ51Eo6Qp21hsO2fCVq5y92XYEEojVbaMImC0L45cryQTMXnaV U8rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Eeb+Mq9t; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id il4-20020a17090b164400b001c6a671b0adsi3487894pjb.113.2022.04.05.16.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:56:04 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Eeb+Mq9t; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 9BE581DBA81; Tue, 5 Apr 2022 16:41:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380542AbiDEMNS (ORCPT + 99 others); Tue, 5 Apr 2022 08:13:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244755AbiDEIwh (ORCPT ); Tue, 5 Apr 2022 04:52:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D44511DA47; Tue, 5 Apr 2022 01:43:28 -0700 (PDT) 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 6E6C2614E4; Tue, 5 Apr 2022 08:43:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5729EC385A1; Tue, 5 Apr 2022 08:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148207; bh=PLJgfYpKDlA2T43Zuce5R0J0Mw2MAn5KvOTzShVlfyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eeb+Mq9ty1/YXbeXAZmxtHFHuQvfwMOlXCpJL3BIm+zr6YUQAnKM4RdgdnqfJeymW TQj/4/EjWFGPAnxUM1YX7PQzXrDpPxSSo7OvmzehRGkXH0+f2UxWjjnnAgdsNZ4s44 viJ5oYCUTQ2arxWeqA/68I4E6+f6jgvN/14/nC5I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guillaume Tucker , "kernelci.org bot" , Guenter Roeck , Shuah Khan , Borislav Petkov , Dave Hansen , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 5.16 0274/1017] selftests, x86: fix how check_cc.sh is being invoked Date: Tue, 5 Apr 2022 09:19:47 +0200 Message-Id: <20220405070402.399769843@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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: Guillaume Tucker [ Upstream commit ef696f93ed9778d570bd5ac58414421cdd4f1aab ] The $(CC) variable used in Makefiles could contain several arguments such as "ccache gcc". These need to be passed as a single string to check_cc.sh, otherwise only the first argument will be used as the compiler command. Without quotes, the $(CC) variable is passed as distinct arguments which causes the script to fail to build trivial programs. Fix this by adding quotes around $(CC) when calling check_cc.sh to pass the whole string as a single argument to the script even if it has several words such as "ccache gcc". Link: https://lkml.kernel.org/r/d0d460d7be0107a69e3c52477761a6fe694c1840.1646991629.git.guillaume.tucker@collabora.com Fixes: e9886ace222e ("selftests, x86: Rework x86 target architecture detection") Signed-off-by: Guillaume Tucker Tested-by: "kernelci.org bot" Reviewed-by: Guenter Roeck Cc: Shuah Khan Cc: Borislav Petkov Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- tools/testing/selftests/vm/Makefile | 6 +++--- tools/testing/selftests/x86/Makefile | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile index a14b5b800897..1530c3e0242e 100644 --- a/tools/testing/selftests/vm/Makefile +++ b/tools/testing/selftests/vm/Makefile @@ -51,9 +51,9 @@ TEST_GEN_FILES += split_huge_page_test TEST_GEN_FILES += ksm_tests ifeq ($(MACHINE),x86_64) -CAN_BUILD_I386 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_32bit_program.c -m32) -CAN_BUILD_X86_64 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_64bit_program.c) -CAN_BUILD_WITH_NOPIE := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_program.c -no-pie) +CAN_BUILD_I386 := $(shell ./../x86/check_cc.sh "$(CC)" ../x86/trivial_32bit_program.c -m32) +CAN_BUILD_X86_64 := $(shell ./../x86/check_cc.sh "$(CC)" ../x86/trivial_64bit_program.c) +CAN_BUILD_WITH_NOPIE := $(shell ./../x86/check_cc.sh "$(CC)" ../x86/trivial_program.c -no-pie) TARGETS := protection_keys BINARIES_32 := $(TARGETS:%=%_32) diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile index 8a1f62ab3c8e..53df7d3893d3 100644 --- a/tools/testing/selftests/x86/Makefile +++ b/tools/testing/selftests/x86/Makefile @@ -6,9 +6,9 @@ include ../lib.mk .PHONY: all all_32 all_64 warn_32bit_failure clean UNAME_M := $(shell uname -m) -CAN_BUILD_I386 := $(shell ./check_cc.sh $(CC) trivial_32bit_program.c -m32) -CAN_BUILD_X86_64 := $(shell ./check_cc.sh $(CC) trivial_64bit_program.c) -CAN_BUILD_WITH_NOPIE := $(shell ./check_cc.sh $(CC) trivial_program.c -no-pie) +CAN_BUILD_I386 := $(shell ./check_cc.sh "$(CC)" trivial_32bit_program.c -m32) +CAN_BUILD_X86_64 := $(shell ./check_cc.sh "$(CC)" trivial_64bit_program.c) +CAN_BUILD_WITH_NOPIE := $(shell ./check_cc.sh "$(CC)" trivial_program.c -no-pie) TARGETS_C_BOTHBITS := single_step_syscall sysret_ss_attrs syscall_nt test_mremap_vdso \ check_initial_reg_state sigreturn iopl ioperm \ -- 2.34.1