Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1127709rwe; Sat, 27 Aug 2022 01:04:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR4HsguluSUfBFdkgCrxu5GAxJk7dpCVniB9JVwHjJDXSQT5UmOH3nAGsXwvp+j+c7puBiRa X-Received: by 2002:a17:907:8687:b0:730:7c7b:b9ce with SMTP id qa7-20020a170907868700b007307c7bb9cemr7412791ejc.656.1661587448410; Sat, 27 Aug 2022 01:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661587448; cv=none; d=google.com; s=arc-20160816; b=BbLoNw/axUwclQkafFsYzlvkEfIE7WHp5SZD8aEuW/pFj50TiFr9rk2Nb+cGVekIGN JhlSZHWFQk3WO+KJmnD2dHB/CLHIko+tLrkDZGHOaQEnbdTEbdk4q9AKH6nisjnPd+U+ W2ZnFSwI7nqK4ZAxWX3gHAITIdPRlv2K5nbHa1FChkqzy7ufJUcyA1bjJLDW40lTnqZ0 AR69LrrzSwP7N2xF80ie7ANUcD4dzBWIWeXLQiBBMAPaXK8qv4PWdIvZv5xnmYA/0pB6 2n+aqbQRbPzG2/Kt1qtR6Y6Fy+6jCNf02k7F2Rc0luQc3K7a8m3lmtLe3NNb1XvuktZt F8sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=9aJASg3DbmlcvW4GqcDsy2Ha1OLvo6SjlyAb3ozLG2I=; b=dVAIjr751s3G33W0vJndTy4593J3Xc4QvqV80azj4mfTQBxDI2ih0Y65wF8SQ35Z+s uJniVLRwTAVPHRhUOcvUY3cyhjp2u/01motD34Ry6bh/Ni/SJrq+RtypSPKpv3fiYPey pQrupkcYSWZhf2DqLg2Yizf+k92OJNrDZjqm+NpqMEcQCF7SPrCN8YmlYoYd9OXZ8LpZ WrvO8FCd6bpKt1A7WpHfjmmtBpRHL99AGoP+ziCBdsoFzKEMiX0Bnc67PcB6VEBrHqkR 5aI4kK9ft75MisDbWtXZYwtjyBDgyQoNUoXY2x47g7hWHAS6/putd8OBs7Tuvp556N/n YSDQ== ARC-Authentication-Results: i=1; mx.google.com; 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 hz1-20020a1709072ce100b007309e3ce06csi2573438ejc.647.2022.08.27.01.03.43; Sat, 27 Aug 2022 01:04:08 -0700 (PDT) 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; 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 S232646AbiH0HvR (ORCPT + 99 others); Sat, 27 Aug 2022 03:51:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbiH0HvO (ORCPT ); Sat, 27 Aug 2022 03:51:14 -0400 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A39D425C40; Sat, 27 Aug 2022 00:51:12 -0700 (PDT) Received: by mail-ed1-f44.google.com with SMTP id b44so4515099edf.9; Sat, 27 Aug 2022 00:51:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=9aJASg3DbmlcvW4GqcDsy2Ha1OLvo6SjlyAb3ozLG2I=; b=SbvmZXc38Uck8opcapveH9Z0A7q2Y0XlhfUVPCOc7rTvCVDD9jIK/12mbjL2kknzQ/ zePMZ1XhOzKzQD5nbcwQJo+Bhhh4eCeongFizUvzXbEahkXMEq+ClqeqFu1EyCnI/gxC KoWNBFKi9S4McxFSpBeGzVbS7r8C04foUz8gj5qPyqXwh/ungGyL+taRuIDgXLsrkHBZ FoQNCN4RhXI50zx4sXzcwFDLEiZYzw//vydpxTGW83cxk05HwzTj2fZmtQc6QRUGc0o0 qTK5NZCmeJMI1LaIA59g4K5nyVh8gUwPoU66FdohVrU0lcM6FpzGA1m7JK4Atxgq3eZ4 yeMg== X-Gm-Message-State: ACgBeo1Xj2HEsO7YfNdnp0LpbXUcD18kJGSb61UyPKQLiDv5vvH9Djke ePTN+8jHj1v2tVdsBzn/DGXMeEPFfEs= X-Received: by 2002:aa7:ca46:0:b0:447:af0a:be68 with SMTP id j6-20020aa7ca46000000b00447af0abe68mr8898417edt.327.1661586671021; Sat, 27 Aug 2022 00:51:11 -0700 (PDT) Received: from ?IPV6:2a0b:e7c0:0:107::49? ([2a0b:e7c0:0:107::49]) by smtp.gmail.com with ESMTPSA id a8-20020aa7cf08000000b0044604ad8b41sm2380616edy.23.2022.08.27.00.51.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 00:51:10 -0700 (PDT) Message-ID: <9996285f-5a50-e56a-eb1c-645598381a20@kernel.org> Date: Sat, 27 Aug 2022 09:51:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH 5.19 145/365] kbuild: dummy-tools: avoid tmpdir leak in dummy gcc To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Ondrej Mosnacek , Masahiro Yamada References: <20220823080118.128342613@linuxfoundation.org> <20220823080124.294570326@linuxfoundation.org> Content-Language: en-US From: Jiri Slaby In-Reply-To: <20220823080124.294570326@linuxfoundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,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 On 23. 08. 22, 10:00, Greg Kroah-Hartman wrote: > From: Ondrej Mosnacek > > commit aac289653fa5adf9e9985e4912c1d24a3e8cbab2 upstream. > > When passed -print-file-name=plugin, the dummy gcc script creates a > temporary directory that is never cleaned up. To avoid cluttering > $TMPDIR, instead use a static directory included in the source tree. This breaks our (SUSE) use of dummy tools (GCC_PLUGINS became =n). I will investigate whether this is stable-only and the root cause later. > Fixes: 76426e238834 ("kbuild: add dummy toolchains to enable all cc-option etc. in Kconfig") > Signed-off-by: Ondrej Mosnacek > Signed-off-by: Masahiro Yamada > Signed-off-by: Greg Kroah-Hartman > --- > .../dummy-tools/dummy-plugin-dir/include/plugin-version.h | 0 > scripts/dummy-tools/gcc | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > create mode 100644 scripts/dummy-tools/dummy-plugin-dir/include/plugin-version.h > > --- a/scripts/dummy-tools/gcc > +++ b/scripts/dummy-tools/gcc > @@ -96,12 +96,8 @@ fi > > # To set GCC_PLUGINS > if arg_contain -print-file-name=plugin "$@"; then > - plugin_dir=$(mktemp -d) > - > - mkdir -p $plugin_dir/include > - touch $plugin_dir/include/plugin-version.h > - > - echo $plugin_dir > + # Use $0 to find the in-tree dummy directory > + echo "$(dirname "$(readlink -f "$0")")/dummy-plugin-dir" > exit 0 > fi > > > -- js suse labs