From nobody Mon Sep 28 06:38:06 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D9C2442B3E for ; Tue, 25 Aug 2026 15:30:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787671808; cv=none; b=AtBjSMnz66hQr5LfNaBHit7CY/i9CzyrC/mZ1/JgKb5xmE7z2V2sr+ND0sXwnRMLBO2N+oIVFtqVvUzdNdWVYraF1NYYX+K6IbGuDHUbPXU+VvQP8UBINKDa0LfYxc3PO5ZIrPWkydVeUvw58zsIUJbhLJDhsDBaSjuEYQaUnUQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787671808; c=relaxed/simple; bh=p/JafXDtdLx/SHgvw3W02FhNXua0Pc23LDT+vElVt5U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Q245f+czJlVgTqifxo2pgB1+6O+dDZKQlygrsn38YE2hYFGnZTImM7PnbvL8hBFpifM4vE0VROelReSdasmskaqEXjV2j5IhTkDENm/EiqydKMSxbp056c4SJG2sFk1E7mE/NztLeCvRFT5oO9dWbJ79MvU+3c/ecBbn9Up44vw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44B8C1F000E9; Tue, 25 Aug 2026 15:30:03 +0000 (UTC) From: Geert Uytterhoeven To: David Airlie , Simona Vetter , Krzysztof Karas , Sebastian Brzezinka , Krzysztof Niemiec , Maarten Lankhorst , Andi Shyti Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2] gpu: GPU_BUDDY_KUNIT_TEST should not select GPU_BUDDY Date: Tue, 25 Aug 2026 17:29:59 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Enabling a (modular) test should not silently enable additional kernel functionality, as that may increase the attack vector for a product. Fix this by reverting the select to a dependency. Make sure the GPU buddy allocator can be tested without enabling another driver that uses DRM_BUDDY by making GPU_BUDDY visible if KUNIT is enabled. The page based buddy allocator for GPU memory is only used by DRM. Hence add a dependency on DRM to GPU_BUDDY, to prevent asking the user about this code when configuring a kernel without DRM support. Update drivers/gpu/tests/.kunitconfig accordingly. Fixes: 8fe3fc37564920ae ("gpu: Fix dependencies in CONFIG_GPU_BUDDY_KUNIT_T= EST") Signed-off-by: Geert Uytterhoeven Reviewed-by: Andi Shyti --- v2: - Update drivers/gpu/tests/.kunitconfig. --- drivers/gpu/Kconfig | 5 +++-- drivers/gpu/tests/.kunitconfig | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/Kconfig b/drivers/gpu/Kconfig index 3bcf08260d73a782..d881ab6f7a006a3b 100644 --- a/drivers/gpu/Kconfig +++ b/drivers/gpu/Kconfig @@ -1,14 +1,15 @@ # SPDX-License-Identifier: GPL-2.0 =20 config GPU_BUDDY - bool + bool "Page based buddy allocator for GPU memory" if KUNIT + depends on DRM || COMPILE_TEST help A page based buddy allocator for GPU memory. =20 config GPU_BUDDY_KUNIT_TEST tristate "KUnit tests for GPU buddy allocator" if !KUNIT_ALL_TESTS depends on KUNIT - select GPU_BUDDY + depends on GPU_BUDDY default KUNIT_ALL_TESTS help KUnit tests for the GPU buddy allocator. diff --git a/drivers/gpu/tests/.kunitconfig b/drivers/gpu/tests/.kunitconfig index fd611b3dfe09c4f6..c103afc02c9ede16 100644 --- a/drivers/gpu/tests/.kunitconfig +++ b/drivers/gpu/tests/.kunitconfig @@ -1,2 +1,4 @@ CONFIG_KUNIT=3Dy +CONFIG_COMPILE_TEST=3Dy +CONFIG_GPU_BUDDY=3Dy CONFIG_GPU_BUDDY_KUNIT_TEST=3Dy --=20 2.43.0