From patchwork Mon Dec 16 09:28:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Brodsky X-Patchwork-Id: 13909450 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5765BE7717F for ; Mon, 16 Dec 2024 09:29:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C96996B007B; Mon, 16 Dec 2024 04:29:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C462E6B0082; Mon, 16 Dec 2024 04:29:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B0DE96B0085; Mon, 16 Dec 2024 04:29:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 9360A6B007B for ; Mon, 16 Dec 2024 04:29:18 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 374C1C0A86 for ; Mon, 16 Dec 2024 09:29:18 +0000 (UTC) X-FDA: 82900297872.30.AA2CF92 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf02.hostedemail.com (Postfix) with ESMTP id B01E280008 for ; Mon, 16 Dec 2024 09:28:20 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; spf=pass (imf02.hostedemail.com: domain of kevin.brodsky@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=kevin.brodsky@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734341329; a=rsa-sha256; cv=none; b=LgQ19h9rNzkbsFVBcKw4IMFiq6kGdV/ahNGLZFAc5Fs9xnDqzD+7/psgTwuPmsHxEsNBVB Cwn/dT8vXJLlDXg0Bf4kGTtmYYXcmlsKoQVBx37CBRE9QB35F2OCbmqUSEHwafFnh2DG2d ErInpGK/jDdZp1v2Dsrpc4xrSsGSJxM= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; spf=pass (imf02.hostedemail.com: domain of kevin.brodsky@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=kevin.brodsky@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734341329; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cfgH/xHLCW0nyrATLYlYPNlcx7mYw3lH5wjltUMjs+I=; b=cdgHGIqoo9vuXMt1b1zow7N/SRZ4dr0UbkgH87r20/qj7AXrIl5iqGl64unXr84Sw7eYJ2 O5x6iH5TQ/qnV9rc/yAuzqbGaws8BMQ9BIDVDM9my5Y3QqO3b3F3LcwnWyPmrA9eic8zfO v1gpK81IpqI1r7i03Oh2jJGuF+deBVs= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 46E1A113E; Mon, 16 Dec 2024 01:29:43 -0800 (PST) Received: from e123572-lin.arm.com (e123572-lin.cambridge.arm.com [10.1.194.54]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E73313F720; Mon, 16 Dec 2024 01:29:12 -0800 (PST) From: Kevin Brodsky To: Alexander Gordeev , Andrew Morton Cc: linux-kernel@vger.kernel.org, Kevin Brodsky , aruna.ramakrishna@oracle.com, catalin.marinas@arm.com, dave.hansen@linux.intel.com, joey.gouly@arm.com, keith.lucas@oracle.com, ryan.roberts@arm.com, shuah@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, linux-s390@vger.kernel.org Subject: [PATCH] selftests/mm: fix dependency on pkey_util.c Date: Mon, 16 Dec 2024 09:28:49 +0000 Message-ID: <20241216092849.2140850-1-kevin.brodsky@arm.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: B01E280008 X-Stat-Signature: hrcxsi4j8ybw7qxh5mmbhpm3u5kpm1t1 X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1734341300-352970 X-HE-Meta: U2FsdGVkX18Cspn3eJmXqL3Jra8DQAiZeQxbRTz02LA2nhhEk2qa/Vqy+mQ/z7yU1tzpToPXGG5lzEm16pP9cNJV0m8JQ0CGNtNSEjOgOj3aXomAmSXZHaG/Fl3Ue6k7w11SNjh+WkY7sjVLLWOax96S0J07ATD/T8F3tcoLtpfp8SGwp1R8DBRD4DHxr9VHix5UnZBRl7bl+kKoGC5v2LIGR0AIFItlvBG1QTJFcAyrYCD0Gt8aISNpkk8VZ0WDcPY/ZHjEW0WSnIoQ4ZlZ766RuIUf3R2D975F+mB4BIJ9IpSq+8718o9vcCLnsNGHTfP0zfUgiWg7vsiTSi6vw1bOUIQBAunMDqZ5yMkZj85E7alB04OHPmmqCDRpWvSmDaOf2JaG9xmh4ER0hmj4n3n+z4Ul10DhCx3eEO8ua/e+xrPmMeoxYRKvNwSm4xt6pkWjw3EICsnTVBH/nmBxd4d0SXmjJqEe7UP7LVC/azdb8byg5uzNdxbsRh/v+fKZvAsgFa+qRg6eHaBYUbk51ME4EQawHkGdxpxVGdm3ZfUsbvu4MH8ktNd+aslHR/6csRJYyA30uBaB0SL39aqH0AcD5Fgis7rZqkF81bw890689EuxQRJlv5rnVYMMHIb7Kj3N7AIY7jI7N4tdS816Ea6cqfU/D9tM+T7wCJzWOd756ofIJS4nlOtCDuFMC9g7QEDFD2CKqBthiX/9mi6O0UG6FaYS1aTsyBB92jtiQJdwCybqZAWkL9mkMNGZzJyY41fi7SsD2T2pWnAiv0tQ8TkmiZIeZZx7NuU/e4W26avgI7DqFNlDHglxaIm8U7VHtF1IklP3bayHsBXndCV0pk+YLDgKIDrS0mWcyO1AuVQ/Cjsu/3C86hnU2w16VsFnQDGLAq/EYIz8c+vYvFO+ngJJAM3YGtA3UPxTgQoz6OYUAWw3nXqbaFXFmDR0KL2j0JJ8sHtYU7ppBpMbKZV JY/HMoyb vPf190fClRZB+uw2G6Lfy/Yy6s3HFHYdcfMx+0fkzo/5whfGvsa3M4U+s5qW3crVb1Xk//daSb/ZpewpzYI2QZ38SJrB+2j15a0cmX1qyDnuABtp7GJNz5A+0AzJBze+lt+JlvJB7fFUb31+aKrZ+bpONLNa4uz3u0BKx5BGTYSNn/8yPDkRsl+MMNFazPhWtY8ajM1uMBv8GjWeYB4Ozl62BI7o3X4z87l9mGoJWe4L8evTE833Mdr+lHwajlScqYXbXB5VgYF5pFf0OWuve/sHEHsaGA5SXoGDQNdgIXQI8UwmG+sZKQRGitmjyKhKsLtgP6rtgwg7mU32BebBI+1PQEwxhlVG9gFn4F3+ppx1t7zD9S25BZn1sasv7yaQY1oRGgWyALIcQrK7ZV8KwujqEeCVBCy0cbkWa8ECC00i0KbQgWXpBpa8/kj6ZbRxxRyA4HHLqwJZcQwKjyQFVHaLYJP6oDzGdAPHFrXFlQQpc3R9UXruMMKj1yguLhdQUCWbub0uRz9wYSIpZlQ+zYCtB+VWJuqxT/rLmpEF7k6rmLFO9aQjK9fQ5r5pHnBosXwhQ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The pkey* files can only be built on architectures that support pkeys (pkey-helpers.h #error's otherwise). Adding pkey_util.c as dependency to all $(TEST_GEN_FILES) is therefore a bad idea. Make it a dependency of the pkeys tests only. Those tests are built in 32/64-bit variants on x86_64 so we need to add an explicit dependency there as well. Signed-off-by: Kevin Brodsky --- Hi Alexander, Thank you for the bug report, that patch indeed breaks all architectures that don't support pkeys, I should have realised that! This patch should fix it. Andrew, it would make sense to squash this patch into the original ("selftests/mm: Use sys_pkey helpers consistently"). Cheers, - Kevin Cc: akpm@linux-foundation.org Cc: aruna.ramakrishna@oracle.com Cc: catalin.marinas@arm.com Cc: dave.hansen@linux.intel.com Cc: joey.gouly@arm.com Cc: keith.lucas@oracle.com Cc: ryan.roberts@arm.com Cc: shuah@kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kselftest@vger.kernel.org Cc: linux-mm@kvack.org Cc: x86@kernel.org Cc: linux-s390@vger.kernel.org --- tools/testing/selftests/mm/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile index 1f0743d9459d..18041de1aebf 100644 --- a/tools/testing/selftests/mm/Makefile +++ b/tools/testing/selftests/mm/Makefile @@ -147,16 +147,20 @@ TEST_FILES += write_hugetlb_memory.sh include ../lib.mk -$(TEST_GEN_PROGS): vm_util.c thp_settings.c pkey_util.c -$(TEST_GEN_FILES): vm_util.c thp_settings.c pkey_util.c +$(TEST_GEN_PROGS): vm_util.c thp_settings.c +$(TEST_GEN_FILES): vm_util.c thp_settings.c $(OUTPUT)/uffd-stress: uffd-common.c $(OUTPUT)/uffd-unit-tests: uffd-common.c +$(OUTPUT)/protection_keys: pkey_util.c +$(OUTPUT)/pkey_sighandler_tests: pkey_util.c ifeq ($(ARCH),x86_64) BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32)) BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64)) +$(BINARIES_32) $(BINARIES_64): pkey_util.c + define gen-target-rule-32 $(1) $(1)_32: $(OUTPUT)/$(1)_32 .PHONY: $(1) $(1)_32