From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5901DC0502C for ; Sat, 27 Aug 2022 07:51:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232940AbiH0HvS (ORCPT ); Sat, 27 Aug 2022 03:51:18 -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-Google-Smtp-Source: AA6agR47VKAWPvE5G/lnfjA1jqUxY7uPHYKkjKqYUsGzraZ5F2Rark6IIDKsFOShSY8nS9YwNx7r7A== 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 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