From patchwork Tue Jun 6 22:24:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 104121 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3709352vqr; Tue, 6 Jun 2023 15:30:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7KYt9/K6HWs52LeXjHg0GcOO8qJX/032NXxlkSnuyLCxAn0YxSMQ84rTcsz4VOxN2PO+sf X-Received: by 2002:ac8:7c48:0:b0:3f7:f73f:d31 with SMTP id o8-20020ac87c48000000b003f7f73f0d31mr1230099qtv.15.1686090600349; Tue, 06 Jun 2023 15:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686090600; cv=none; d=google.com; s=arc-20160816; b=gdZGP/NQntMXgovvx3ybojtx9GXKiQyU6sTbGeNOHQ0QW2hEkPs7/ovAptSJ+sWO2Q ULgUchgnVXJNq1qTPdHqeoMCU+/foNVrUX9V6jFDiL2cweF/Cnl5K7ndr5/oiXQ69AEv TshPkqYSOe48b6a43I1VKd/+dBdWVBIL97gN5+EXDlSUulX+jqvTqq3xZVU9YWmFkL9F gkEEQZRkmwyeD/rROTBOHEFMqvl4CKuWrS5iM6ZwdH/JAoDDhBjtfEYW4mAOjtoybIyO N5pXAPVr2rfoBVBj6kHYZE0EhYw5pg4fm4ZHaSC9ezRhVgbjZLYOXrO7oCwUQHE3tCqM rVyw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=kmYAsitdtMiuxTmfa+3Zf9OT+yKEDPZiNHHq5YozUWI=; b=pvoa9bv3i9qP9hVy71gx/LglcTaWZoaQMvVzo8+HYAu0274xaO5JIgeI5CMXLaodPe X6sOiAqc7GePkQFh28uY70BMjdlFd8v69QiRfvQ5A2QI/zdn0F7wsAv7Va3TuaVpqDiY ZCtq2bryNjdYfOzGUK9qyYfTC8LZ9D29j1DUSBr7TFzNOL+jzeLpp/RIhoxY6VbMUY1H 1Z51umdwExEvihI9Oe+4t0s4vieaiVrIZtxzmL3qKs/ixzyW+VvZ1wiwXgUFRrv5hqMJ 19I6lqD58jxmx5yGc9kjGz+vCVD6GQz9HSRvvKK/e8n1dPqQHexZrWyP98t7YfzZSPNb 2cmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ROVGk+6F; 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=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u22-20020a05622a199600b003f9abb41d6dsi2115513qtc.462.2023.06.06.15.29.36; Tue, 06 Jun 2023 15:30:00 -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; dkim=pass header.i=@chromium.org header.s=google header.b=ROVGk+6F; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239848AbjFFWYy (ORCPT + 99 others); Tue, 6 Jun 2023 18:24:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239846AbjFFWYu (ORCPT ); Tue, 6 Jun 2023 18:24:50 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1E331717 for ; Tue, 6 Jun 2023 15:24:49 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-256531ad335so5500947a91.0 for ; Tue, 06 Jun 2023 15:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686090289; x=1688682289; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kmYAsitdtMiuxTmfa+3Zf9OT+yKEDPZiNHHq5YozUWI=; b=ROVGk+6F+Jqwoek6VhTyqEeBcpsOecTn6Zn92661yUpP1HszcaLVvP3nhcHLfyDZE/ jtnAbjb2WSwGOUjNCZaNLx5EuhcMuYKFv7BXoD9kY7qguYSaS4fJpbLUU9ybovI8LKAh msStxmrKPdoBhGmM4yB1blT9H8kphUHuNtHH4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686090289; x=1688682289; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kmYAsitdtMiuxTmfa+3Zf9OT+yKEDPZiNHHq5YozUWI=; b=IWPSeNvll4LEKg304DcpBTjxllQsXU4T0PMBEXcpmFyGmbbXhMu/wRUnUDyKT19BaL KsEOMWjEkLSV+Xv+N/xv6TcJjtnTTUhiPMBpkZmvWuwqExSQZUlTq7+HXjfUr8w1Echn 4Nj5kwzdRGoaI/i8w1dhAeWTB7yYmLY3aJMGUruCZERvHtok/0g72zyhzbn9aZnGmI7l l+0hirvZ4SYPWD1VpPqUHrJqd3bPvZ8OP2AYwznjiNFx8HKip+0B/r1CoDgCU6y0+awH AbM5asndus8U7q69gvNQOqXDND+/2xJFOK5bCjUt3WcXAPxnvZBgHRYM2D/bWl4R/kzs UrHQ== X-Gm-Message-State: AC+VfDxTi25epgyPLVtquWKJfiMcSp1agkUpNk64C61jMTphqc/DPU6Z 3kSYVJBksKUMiLc1bkkydTYRWg== X-Received: by 2002:a17:90a:3e09:b0:252:75ed:eff5 with SMTP id j9-20020a17090a3e0900b0025275edeff5mr2928439pjc.30.1686090289275; Tue, 06 Jun 2023 15:24:49 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id 27-20020a17090a19db00b0024c1ac09394sm46493pjj.19.2023.06.06.15.24.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 15:24:48 -0700 (PDT) From: Kees Cook To: Richard Weinberger Cc: Kees Cook , Anton Ivanov , Johannes Berg , Azeem Shaikh , linux-um@lists.infradead.org, stable@vger.kernel.org, Al Viro , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: [PATCH] um: Use HOST_DIR for mrproper Date: Tue, 6 Jun 2023 15:24:45 -0700 Message-Id: <20230606222442.never.807-kees@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1350; h=from:subject:message-id; bh=ogdQalFf0y8pKF+gFHpZjTpG30jr8bbKm5s3B8PiBPc=; b=owEBbQKS/ZANAwAKAYly9N/cbcAmAcsmYgBkf7ItfCmLvYSeW8Q0gwGur9gz7W1IjcA39mfgRnT3 Y2VehlGJAjMEAAEKAB0WIQSlw/aPIp3WD3I+bhOJcvTf3G3AJgUCZH+yLQAKCRCJcvTf3G3AJpg0EA CojcAOCPQ4kzRxyVY2zE9OQL7dtTvYou3N2RGCBrrY6XKQMNwVof1zv1P2XR9bBnJSIIqotgDPPX9a aZ8XklK5ixysMuMgS45QPl32SnitUOCrARbo0/4DCDFd27VE3mlJvTAhXoRNKftEjdyXhpsDS3I9/H cmD37lTsNrro9oVy5xIO7DoOujmzYspW1oNtNGk/gDgjIiW0po7I8PO/n7Mqj3mKAfV2ljoWW0uvK/ pNQ+Zw4to8OaupHJaowdB3UtJ4zU7MgSG8xaZiWI/EY0QxcgIn6FmEeCJ0Md7ka8TviLNU4IXCk8Yx ReSSRAaVMHAg0hy+WEVNwpAQ2iWYf7gJk+EXMKZVgR9GYXiIbK8fMTzCdmtwg7xMCZpch0YItprXg5 aN875T/ca4liv+bOWM7IDM5ewm82F6RSLstr5xi2nLAHOKAo02TZ/0XH2LeJKEv5kWcXM8dmYILIQM X5PsdWPO9MHzP5MRwn+3fYyjRJPLzSCf6rFDlY2PbB3xYAq8QNXeGGSKJsqUKYtH3KY3WcgpitgeFq 8m7TPtzspglG6NewHGgkpx0PkMNe+eKOvZfArtuI7lWMTglwyBHgvnSqufzPWHsidotD7knjuTgFea vIrkaOavqki2VfIW/X986U8J3Ws6mrSVudV9sXnLm3j+CZ3aIJKxk4hIr3yw== X-Developer-Key: i=keescook@chromium.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767994137452163166?= X-GMAIL-MSGID: =?utf-8?q?1767994137452163166?= When HEADER_ARCH was introduced, the MRPROPER_FILES (then MRPROPER_DIRS) list wasn't adjusted, leaving SUBARCH as part of the path argument. This resulted in the "mrproper" target not cleaning up arch/x86/... when SUBARCH was specified. Since HOST_DIR is arch/$(HEADER_ARCH), use it instead to get the correct path. Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: Azeem Shaikh Cc: linux-um@lists.infradead.org Fixes: 7bbe7204e937 ("um: merge Makefile-{i386,x86_64}") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook --- arch/um/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/Makefile b/arch/um/Makefile index 8186d4761bda..da4d5256af2f 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -149,7 +149,7 @@ export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) $(CC_FLAGS_ # When cleaning we don't include .config, so we don't include # TT or skas makefiles and don't clean skas_ptregs.h. CLEAN_FILES += linux x.i gmon.out -MRPROPER_FILES += arch/$(SUBARCH)/include/generated +MRPROPER_FILES += $(HOST_DIR)/include/generated archclean: @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \