linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aqib Faruqui <aqibaf@amazon.com>
To: Christian Brauner <brauner@kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <nh-open-source@amazon.com>, <aqibaf@amazon.com>
Subject: [PATCH v2 0/7] Add compatibility fixes for KVM selftests with non-glibc C libraries
Date: Tue, 2 Sep 2025 17:01:37 +0000	[thread overview]
Message-ID: <20250902170147.55583-1-aqibaf@amazon.com> (raw)

This patch series adds compatibility fixes for building and running KVM selftests with musl 
and other non-glibc implementations. The changes address missing function definitions, syscall 
numbers, macros, type definitions, and runtime compatibility issues that are otherwise handled 
by glibc.

The series includes both build-time compatibility fixes (missing definitions, type mismatches) 
and runtime fixes (stdbuf compatibility in mixed libc environments) to ensure KVM selftests 
work correctly across different C library implementations.

Changes in v2:
- Split pidfd patch into two separate commits
- Dropped PAGE_SIZE redefinition patch - will root cause warning separately
- Dropped __packed fallback patch - tools infrastructure already handles this correctly
- Dropped pthread_attr_setaffinity_np patch - maintainer provided solution


Aqib Faruqui (7):
  selftests/pidfd: Add architecture-specific fallback definitions for
    pidfd_open
  selftests: harness: Include pidfd.h to get syscall definitions from
    tools/
  selftests: kselftest: Add memfd_create syscall compatibility
  KVM: selftests: Add backtrace fallback
  rseq: selftests: Add non-glibc compatibility fixes
  selftests: Fix stdbuf compatibility in mixed libc environments
  selftests: kselftest: Add ulong typedef for non-glibc compatibility

 tools/testing/selftests/kselftest.h                    | 24 ++++++++++++++++++++++++
 tools/testing/selftests/kselftest/runner.sh            |  2 +-
 tools/testing/selftests/kselftest_harness.h            |  1 +
 tools/testing/selftests/kvm/lib/assert.c               | 10 +++++++++-
 tools/testing/selftests/kvm/lib/kvm_util.c             |  1 +
 tools/testing/selftests/pidfd/pidfd.h                  |  4 ++++
 tools/testing/selftests/rseq/rseq-x86-thread-pointer.h | 14 ++++++++++++++
 tools/testing/selftests/rseq/rseq.c                    |  8 ++++++++
 8 files changed, 62 insertions(+), 2 deletions(-)

-- 
2.47.3


             reply	other threads:[~2025-09-02 17:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 17:01 Aqib Faruqui [this message]
2025-09-02 17:01 ` [PATCH v2 1/7] selftests/pidfd: Add architecture-specific fallback definitions for pidfd_open Aqib Faruqui
2025-09-02 17:01 ` [PATCH v2 2/7] selftests: harness: Include pidfd.h to get syscall definitions from tools/ Aqib Faruqui
2025-09-02 17:01 ` [PATCH v2 3/7] selftests: kselftest: Add memfd_create syscall compatibility Aqib Faruqui
2025-09-02 17:01 ` [PATCH v2 4/7] KVM: selftests: Add backtrace fallback Aqib Faruqui
2025-09-02 17:01 ` [PATCH v2 5/7] rseq: selftests: Add non-glibc compatibility fixes Aqib Faruqui
2025-09-02 17:01 ` [PATCH v2 6/7] selftests: Fix stdbuf compatibility in mixed libc environments Aqib Faruqui
2025-09-02 17:01 ` [PATCH v2 7/7] selftests: kselftest: Add ulong typedef for non-glibc compatibility Aqib Faruqui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250902170147.55583-1-aqibaf@amazon.com \
    --to=aqibaf@amazon.com \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nh-open-source@amazon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).