From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6FA2275612 for ; Wed, 26 Feb 2025 21:19:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740604744; cv=none; b=dRFr1s9n9216AiXYQFRrTM2UxundsXGjFuFUCGErW0mw4ZYeHULg/QD9m5YRVhVWCPk2FRENeEx4h+l3Ln/x2UVpMvWxbxUo0jVCobzt92LazD8CP36tme1Qc5NjxIThKOSgkUhfcr46fNAUDrCFIgC3xCv59WBJir6sUYtzDOI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740604744; c=relaxed/simple; bh=ETF+TZfWOwr2E7TzI3GDXoo/fBu+FHHrLxMs/U5ICQc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=i+BShk18DeNvW08/wv6Ddwne8wFqN8YjuPQei7Y7PHgC74qYe6BdOTSNcCy9aUamRv6ll0g87wFT/6zIMVA+B9lTb8VxP9koUes/CnvKHcTj+8Wxg7NYeH5rSVD+dGZs9UUxssy45+9cssvZuBjQOlnoyrNSsOs9Zkvb4RBrxEY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HKHJVnXQ; arc=none smtp.client-ip=209.85.166.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="HKHJVnXQ" Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-8553e7d9459so7829139f.2 for ; Wed, 26 Feb 2025 13:19:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1740604741; x=1741209541; darn=lists.linux.dev; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=1ZbQT0VE61svKMbdd+Gr8k060Ven1mqK+4ryvXWXDro=; b=HKHJVnXQ/2rIG4BT7GTP0tncA2Q+S3XAjEbAqfW0xh6n8yn6C41ioYspoGi6bFC6Cs zEPDC4CuIrnZ/u00D60Kfy2xD5Z3PmWHzsFl7QLSum4Gud1J8JWH/b/JPIVgMvS9HKUG 8XCgljBwcXHo3euKcoCXfJKlVYMUACAeg3w0w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740604741; x=1741209541; 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:subject:date:message-id:reply-to; bh=1ZbQT0VE61svKMbdd+Gr8k060Ven1mqK+4ryvXWXDro=; b=LJ+nnD8LiJzJ4FKAIJJnZw60Buyr8iOiniInSb0UH+mMpAF1YIefdWrzhpPvD81EcT NztFwNiofKyHxxNO9cv7qNzMgFahimZBkwJU9T9p/2Ij8dNowo2YXi7RaVZhfGy5QKAv IrjJNnl4OoqqcnAGMMHTO9Tkap/k3D49eikga0OItkDK7lRYvmWxV+0+5cQSg7wsm08t yTxeW3TCGanVq2HlG1ttkH9FxWdRPFHjkwFQPuEesdXbdYrnSPXSsrQ2euf/Hh2uzg9q OaEkPgOsM19hWHRZGFIEEyMIKBS9zl0MXV9uZgVJ3TlCqCGs7FYuNubde7CSogLaWW4L lzpw== X-Forwarded-Encrypted: i=1; AJvYcCXxsikjOSyYKd8o5NJKKX2hGUcSr8GYZRebRzPIutfxhfr1LMypJjyIbKgolZ4AA5J+oHqr@lists.linux.dev X-Gm-Message-State: AOJu0YwHyHaYxPzevbAfWnQEtwgrhtRuX0NYDihgsEcPNCp1HlnqSQw9 de6lhh6IHno0UoRcgVefoLkQ1OadssxcNp25uQXyFZ8PTMhkYbIn8s2di2gA04k= X-Gm-Gg: ASbGncuNpfLQ4XPCZlBMgPGddzcJXUR6M33DwoM7J60xHExHzu2RJnAhX2Me1punroQ VFGYcjTmtGs4fPDXvb+Xds90Y9c7s8r+OGcClSEB7iG0Ri6PGWpmEmQvh3p0SQQkKwfLN+S9CSJ 5iI02E8nUSrhCn07ecz+HP42b5EAux3kDbYK7MrPt/5ViwfUAR3wVweNEHVovdtHyTFQZN6Zb4N 0CtNf7FT4Grun7j6TthGNKJCAdHSoDP4MPd80kXyWgkIh9q4rm0aP8pFnyv4Xn7GFeJn/V1gF8i /QrRXJL050PK7yeZjE+4OVs2pdEFZvYbMzsp X-Google-Smtp-Source: AGHT+IHg/BsbrgiJltrFchrlWBr0v+eZMH3MictkWOtFDu7d/SE6nIbG1gWpAIgUIS6K/fYcfLTKKQ== X-Received: by 2002:a05:6602:13d4:b0:855:9c88:7894 with SMTP id ca18e2360f4ac-857c18025c7mr464165939f.11.1740604740789; Wed, 26 Feb 2025 13:19:00 -0800 (PST) Received: from [192.168.1.14] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4f061c550a7sm33193173.48.2025.02.26.13.18.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Feb 2025 13:19:00 -0800 (PST) Message-ID: <51fc3603-bad8-4ff7-9e72-88858812e3cc@linuxfoundation.org> Date: Wed, 26 Feb 2025 14:18:59 -0700 Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 00/16] selftests: vDSO: parse_vdso: Make compatible with nolibc To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Kees Cook , Eric Biederman , Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Willy Tarreau , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= Cc: "Jason A. Donenfeld" , Christophe Leroy , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev, Shuah Khan References: <20250226-parse_vdso-nolibc-v2-0-28e14e031ed8@linutronix.de> Content-Language: en-US From: Shuah Khan In-Reply-To: <20250226-parse_vdso-nolibc-v2-0-28e14e031ed8@linutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2/26/25 04:44, Thomas Weißschuh wrote: > For testing the functionality of the vDSO, it is necessary to build > userspace programs for multiple different architectures. > It is additional work to acquire matching userspace cross-compilers with > full C libraries and then building root images out of those. > The kernel tree already contains nolibc, a small, header-only C library. > By using it, it is possible to build userspace programs without any > additional dependencies. > For example the kernel.org crosstools or multi-target clang can be used > to build test programs for a multitude of architectures. > While nolibc is very limited, it is enough for many selftests. > With some minor adjustments it is possible to make parse_vdso.c > compatible with nolibc. > As an example, vdso_standalone_test_x86 is now built from the same C > code as the regular vdso_test_gettimeofday, while still being completely > standalone. > Also drop the dependency of parse_vdso.c on the elf.h header from libc and only > use the one from the kernel's UAPI. > > While this series is useful on its own now, it will also integrate with the > kunit UAPI framework currently under development: > https://lore.kernel.org/lkml/20250217-kunit-kselftests-v1-0-42b4524c3b0a@linutronix.de/ > > Signed-off-by: Thomas Weißschuh > --- > Changes in v2: > - Provide a limits.h header in nolibc > - Pick up Reviewed-by tags from Kees > - Link to v1: https://lore.kernel.org/r/20250203-parse_vdso-nolibc-v1-0-9cb6268d77be@linutronix.de > > --- > Thomas Weißschuh (16): > MAINTAINERS: Add vDSO selftests > elf, uapi: Add definition for STN_UNDEF > elf, uapi: Add definition for DT_GNU_HASH > elf, uapi: Add definitions for VER_FLG_BASE and VER_FLG_WEAK > elf, uapi: Add type ElfXX_Versym > elf, uapi: Add types ElfXX_Verdef and ElfXX_Veraux > tools/include: Add uapi/linux/elf.h > selftests: Add headers target > tools/nolibc: add limits.h shim header > selftests: vDSO: vdso_standalone_test_x86: Use vdso_init_form_sysinfo_ehdr > selftests: vDSO: parse_vdso: Drop vdso_init_from_auxv() > selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers > selftests: vDSO: parse_vdso: Test __SIZEOF_LONG__ instead of ULONG_MAX > selftests: vDSO: vdso_test_gettimeofday: Clean up includes > selftests: vDSO: vdso_test_gettimeofday: Make compatible with nolibc > selftests: vDSO: vdso_standalone_test_x86: Switch to nolibc > > MAINTAINERS | 1 + > include/uapi/linux/elf.h | 38 ++ > tools/include/nolibc/Makefile | 1 + > tools/include/nolibc/limits.h | 7 + > tools/include/uapi/linux/elf.h | 524 +++++++++++++++++++++ > tools/testing/selftests/lib.mk | 5 +- > tools/testing/selftests/vDSO/Makefile | 11 +- > tools/testing/selftests/vDSO/parse_vdso.c | 19 +- > tools/testing/selftests/vDSO/parse_vdso.h | 1 - > .../selftests/vDSO/vdso_standalone_test_x86.c | 143 +----- > .../selftests/vDSO/vdso_test_gettimeofday.c | 4 +- > 11 files changed, 590 insertions(+), 164 deletions(-) > --- > base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b > change-id: 20241017-parse_vdso-nolibc-e069baa7ff48 > > Best regards, Here is my Ack for this series to go through vDSO or x86 tree Acked-by: Shuah Khan thanks, -- Shuah