From patchwork Tue Oct 8 13:23:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 833576 Delivered-To: patch@linaro.org Received: by 2002:adf:a1d9:0:b0:367:895a:4699 with SMTP id v25csp290143wrv; Tue, 8 Oct 2024 06:27:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIp14eDfabSbL64thFLfEDJjLOf9Z+uTOXjS+SWcfHhgfziSlCiDO1oCThRwWJOvDMSJoafw==@linaro.org X-Google-Smtp-Source: AGHT+IH0A6MGxlxLE/Hwx/7aprTX7j95tE+/d3xeY4QqtPFyzjfE+dBbqhjIrBO/9WpjQ6ca9om7 X-Received: by 2002:a05:622a:64a:b0:45d:7416:1636 with SMTP id d75a77b69052e-45dc229b4eamr54007761cf.2.1728394039800; Tue, 08 Oct 2024 06:27:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728394039; cv=pass; d=google.com; s=arc-20240605; b=KFbQU8tY7CtTyLcxzWQrrQ1Y1T/9ZjGn7vDFasEosfeirHgIY61Iw6HrLI7Isv17in 5XWse4P6VkCPTKlpdx9u7EEJHCM3fC37QQL+/IpH8PVOrZtdk8kHAVdPI9hMLKTRwtWo C47bK06zRh8Vlv8wpVZkFwv7OexjhKSkIkEPXhhAJ3JuEP1Q8avXBxsOsCA1ior6sAvE PlK/ewzND/0LeZ8VY9NSzryS7M250hxvxNMcg9v4gLd+LtTVh4r6tgu6r1PYfnmvn5LF cPTc4A/W+Unqcmhmc9Aw9GMm/lWPX5hBOFleMLEoK5UHqgMIvIdRjpXytSFvxEL7MNh2 RaDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=pIfDF5IYzNqpy2LocItfhplNquXy0LOTR387eukWeuo=; fh=dHLBnA+MhGtNtN2B2JMAELi4oD+gmgMg7DL8H0jYbkI=; b=QbmNzNMkLpAhlRkAeVhCTzkczmPJij7PuEQYNdsQeJDbit2wbgFE/Oi4nwahNyvTEs zudRG9A/PFhGaE+604DYI4KKZ9v4fz1Q6NfZpPk+n8DdulnGUaJfdP/AG9tMETVT0+5V 8fkzJhK2PanAN/nIZGFpj0LtlFbkHucjdkH88LpwnV1lfI0OfI7AKzlBZmqZp3HWWrMN MGDeHiGR/KvDc7R06qEhrODBcF+FR5yqgHvOfeDS36QSHGPgUWXqJvPvkp+1dcL0wsbg NVpS0mkIj+d4DmkW39raBTVsBHzI+xRzr5Zv0+Ox4RafkBueglPrAzotaOCtrqjC1/eW UrjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J5Zgc0Gk; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 6a1803df08f44-6cba475a62fsi86571346d6.224.2024.10.08.06.27.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 06:27:19 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J5Zgc0Gk; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6148E386182B for ; Tue, 8 Oct 2024 13:27:19 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id D8D7F386183C for ; Tue, 8 Oct 2024 13:24:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D8D7F386183C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D8D7F386183C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::531 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728393891; cv=none; b=okVrms24SZXIHQRoB8U+SawfIEzGvSo6Ibm+X/AihCFI1vgH7avacXrTtVxqnn3wqbzUN/HbZF5nnR1s1x1bxTotu7hxnqwQJuAlcvKjKvW9Xn6ZFoejuJFLenrul5t5NRLrehx1KLmXI5fofym+Vu1UQ4ZuqVkCR5IdBfQ39WM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728393891; c=relaxed/simple; bh=8zS3JnIflNr7nxtYcvVvptL9klXXFKQrZY/NSxgjUGs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=fqz1cbvqsQ5XE+ErXqjRIrACxHptkUDnIvjWCHYHB3DV6GuWjuE4pJjf44Y77wXbY42SGf6Nv/VUAzlnd4HSxf6LA4PxMF6MK0qYw9mJAtepbOv28I0OFEzcA54myGLceCU6qTAzpl+9hXxII5lo+dSQpdgjsCUS9fZSgHAYfJE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-7db90a28cf6so4438602a12.0 for ; Tue, 08 Oct 2024 06:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728393888; x=1728998688; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=pIfDF5IYzNqpy2LocItfhplNquXy0LOTR387eukWeuo=; b=J5Zgc0GkkbpG76R+YAyyfPUcnCUIemz8DxfXIgKW6i6gWMaKBcEFVR4sddRry561K/ 0EFO74Z/Hg6ydQhX3zkWGEfY6ZPXG4upsCgKoX3oT9PP+ENAFgY7rdqC+iowwEpsBGwG eWV5gbtHs747pPvtkxLTrhylXFGduMgAvWq5/zz7nkuzfYyNUTj8CTWIQdgkvLzqlYcj DRuGrytKP4QKd7XjnZxq3MLxGvSMMzS90TmSGEuRqgBfJiKmFUtQC+iIJL7ixgEBijox YnXw0UNjfuqw6wZBEhfzOq37MpW7RUFHo32ZNPd8vYy5/3SHVQ75H8Vs+r9PGVaHpsoC B1sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728393888; x=1728998688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pIfDF5IYzNqpy2LocItfhplNquXy0LOTR387eukWeuo=; b=w4gkpzLn0d04aiuj+m4tvOjSc6AXOidQEbcAmtyTZnQop3B8e7g5zLmX644W6/lmza Jk19z/74Av8RqVjVx0GM5GdfPM0+FZx+ZMDg+KwI473XA4vdmOJ2jxfJictqpJHXyFwl vnSL064iRJJ7cSB7jrz0Ot1aLcW0qM3fE6sopiMi67sqI9ZqXwhm2VyRXmzWd1E9b/DH qEuVPStjW0LThl+h6u9r8O3714aeLTA4AnGeRgS5h4A/FW/ZdWYi3KKsx8lP1L1bIZVH F7ro2fhwIJRrCoU4sUtt/q5MYAAhrGz0vPxb2u+DwMjxjkLXyC8G9I1BTTzhPGWPg1TN IWtA== X-Gm-Message-State: AOJu0YzLsYmlLI+B5bS7UmvEVQOLdsBMkuRN17dwxK64Cv2wUkBDkdRc Z96ifiM4xbngcMtNmEbVivHcvtu2Q5abc8+bZvUCzwQf0lQXBy4VYxX82vvTHCzzOokWgxl93iF Dn2atmA== X-Received: by 2002:a17:90a:e795:b0:2c9:5a71:1500 with SMTP id 98e67ed59e1d1-2e297832a64mr201840a91.0.1728393888526; Tue, 08 Oct 2024 06:24:48 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:68d6:61bb:ff14:bcb3:8ace]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e20ae7177esm7597909a91.3.2024.10.08.06.24.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 06:24:48 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 3/6] Update PIDFD_* constants for Linux 6.11 Date: Tue, 8 Oct 2024 10:23:43 -0300 Message-ID: <20241008132440.722309-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241008132440.722309-1-adhemerval.zanella@linaro.org> References: <20241008132440.722309-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org Linux 6.11 adds some more PIDFD_* constants for 'pidfs: allow retrieval of namespace file descriptors' (5b08bd408534bfb3a7cf5778da5b27d4e4fffe12). Tested with build-many-glibcs.py. --- sysdeps/unix/sysv/linux/sys/pidfd.h | 14 ++++++++++++++ sysdeps/unix/sysv/linux/tst-pidfd-consts.py | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/sys/pidfd.h b/sysdeps/unix/sysv/linux/sys/pidfd.h index 9f88d297e8..85d976939b 100644 --- a/sysdeps/unix/sysv/linux/sys/pidfd.h +++ b/sysdeps/unix/sysv/linux/sys/pidfd.h @@ -20,6 +20,7 @@ #include #include +#include #define PIDFD_NONBLOCK O_NONBLOCK #define PIDFD_THREAD O_EXCL @@ -28,6 +29,19 @@ #define PIDFD_SIGNAL_THREAD_GROUP (1UL << 1) #define PIDFD_SIGNAL_PROCESS_GROUP (1UL << 2) +#define PIDFS_IOCTL_MAGIC 0xFF + +#define PIDFD_GET_CGROUP_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 1) +#define PIDFD_GET_IPC_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 2) +#define PIDFD_GET_MNT_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 3) +#define PIDFD_GET_NET_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 4) +#define PIDFD_GET_PID_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 5) +#define PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 6) +#define PIDFD_GET_TIME_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 7) +#define PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 8) +#define PIDFD_GET_USER_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 9) +#define PIDFD_GET_UTS_NAMESPACE _IO(PIDFS_IOCTL_MAGIC, 10) + /* Returns a file descriptor that refers to the process PID. The close-on-exec is set on the file descriptor. */ extern int pidfd_open (__pid_t __pid, unsigned int __flags) __THROW; diff --git a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py index 9824fd214d..9d53102cbd 100644 --- a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py +++ b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py @@ -39,7 +39,7 @@ def main(): sys.exit (77) linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc) - linux_version_glibc = (6, 10) + linux_version_glibc = (6, 11) sys.exit(glibcextract.compare_macro_consts( '#include \n', '#include \n'