From patchwork Tue Oct 8 18:45:25 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: 833602 Delivered-To: patch@linaro.org Received: by 2002:adf:a1d9:0:b0:367:895a:4699 with SMTP id v25csp447902wrv; Tue, 8 Oct 2024 11:47:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCURooeND3VqxKizSkCx0DoNziNqZpK+mepBnR2Qfz3b73z6+jpr4KDqqV2sdXUBG1NMgZK+JA==@linaro.org X-Google-Smtp-Source: AGHT+IEPPeRYM7gbB6SZF3yWP7Caao5yzqzSUIrhtcH80sFGtU7b65yeGaa5Xmh7dsxCOAok6zKH X-Received: by 2002:a05:620a:424d:b0:7ae:6097:37ce with SMTP id af79cd13be357-7ae6f48e1e2mr2800750085a.45.1728413222243; Tue, 08 Oct 2024 11:47:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728413222; cv=pass; d=google.com; s=arc-20240605; b=NifL6JQ1x0380WbfKDx6cEzQ75Pk3nYSNjndN+ROgjevegfoza6sYcHm9JyopVbSdU IkVtgD/MUP7Vt1e/9jKflj+qwmSY9ddF+8j2VWaNi5JF7MD70S+Q9phcYe+k3pKVQE0W 1OMPL37A35iYvtotgOO/1vJbkTRYkCiB4+SicV0V5AhQEvJaaiOkrf5AgAD1LYOr4i+l rJ+C40UusXfGTtEyiPEWdG6pSP54ctzqIVapiNwOX94WToNezrHJ4WCVBPrPRUxvLLx3 SY2+J12X/YWX4S8tZa79Q70dddzXAaoHxhp46SWMVdldLN+GcG5dy+6ZZmgBzwx8KbYq pQYA== 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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=pIfDF5IYzNqpy2LocItfhplNquXy0LOTR387eukWeuo=; fh=y8c+zjefmHK4fStUusN64Sx8n6mpTt8O9P1WOVzrReM=; b=QOYnP5ft7H9kKu5B74hHIk2AHWAD3wqQ5+Wn7R+x9Bw1p1+xfQjBjL0kJJPxfAkDaQ 9AzUpfmhA5A5O6b5T75gLq82VZ/DPu2NonLdgHbg+WiRWGJtmsrESsuJW8QPM7TGuoJD g1xglKl9drZMqg+kXgI+66etrliNNeGz4a5zAZEHmenr0jarAOZeP65fnKJxhmOjyG6X rGciezRcThVAM8ZBPF2iYej1u0H5oPQ/yCwc4OE+e1n9fItp5YwA0ujQNdpoMO2onG2o yOvEoIWotuuSdrGBAQ0ZjBeiHzeDRlbgLaH6zw+C1vN7wiHOwkPP7JecqiiVsFtvqbDI NSWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pWGBOT4d; 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 d75a77b69052e-45f0898516asi6095591cf.154.2024.10.08.11.47.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 11:47:02 -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=pWGBOT4d; 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 CF1BB385020B for ; Tue, 8 Oct 2024 18:47:01 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 970D1385DDED for ; Tue, 8 Oct 2024 18:46:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 970D1385DDED 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 970D1385DDED Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728413208; cv=none; b=xW7uNZDC83p4xG7KWSdzFPGsnGLZym9eQ9mr9yfKchdA3mOpX1koei3NRSqIQ+M1Ld+1IScx9nHhUU01P+CSw4TmskhS0Mf852GTTNJi7zrL2BlEOw0E8GdmmzQUwY3ldx6sjdM54OADonCkHlPqegXpaG4sP6SUUq4fM5eKi40= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728413208; c=relaxed/simple; bh=8zS3JnIflNr7nxtYcvVvptL9klXXFKQrZY/NSxgjUGs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=PKk3v0rUpgZMgURZ5XaCbHuwXWkNVqbBEzgdhYw0xw3MlbogzbztxRzNRSeQl+/zyv6tggk2Jc+RMbHNSnbCozVbPZk5G6f4VNKxnkJhoDEwoHVttp8qSKtIZbQDXBBT1PrOBQVGC0ksergv4k4LBHRoQxxEsU3WOfK5KTXjHBs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-20ba9f3824fso45790745ad.0 for ; Tue, 08 Oct 2024 11:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728413202; x=1729018002; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pIfDF5IYzNqpy2LocItfhplNquXy0LOTR387eukWeuo=; b=pWGBOT4dTfIjD/c4Bi5VAyqpCtbA9esjMr4R8rGBQeHSBsCcvtgk2zdnXGaaGVAtVL mwjEiPQ2qSCsNifipgYNDmpYpc3lrg7lAvQfS9RtDvejfxJaCPqndixMvKgxeddyjCsm L0Qc+wqFIOen8fr6E6bekZS3AeLUt5dR5//SDVTfy76test8l701cOXLeDkhJl2ftW0n FkJ7m+ICpOCjmUFD58z3rLYOOJRv3emhJnF2uaIcw6vCCtil9rRZVQEjFTFVC+ryf8W3 9eOKSJ7gs5oo7wXZjglsxcOlQQS4EYy6mG+Y0BYVsW3v//Ej9E701hG895S96FzPbJRm DoCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728413202; x=1729018002; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pIfDF5IYzNqpy2LocItfhplNquXy0LOTR387eukWeuo=; b=YiTpofBiVJrAKzJx2kBC1MVWYWQLhS1FuzG/OaNYOut8jAifhMQkU1Mnj1RIYIjIsH mGYPGgRG9qmKrxC/KilaljCMjxJnjQX5kYcX2bsOsTCIicRMJi0/qALe8QbFnc49K4aY hyww2/RrnTBpuguQtvo7358JQRynDq9g4Fkoz9CPmWhIGOaWJXad8TMLE7PUTt4NVJaP 2WpBR5oKresh5mhh1qPkfvPyiwz1wMpHAj16CrgJLKO+dc/0WqRMTOR/v5uyqRa2kFSL 7hsAqCdOEDHSOBtm5ESzHLRZPtyB5w2L3pGcfYMrYp1Uwt8SGuXHiehOLh/sSWZ8rBrh +lWQ== X-Gm-Message-State: AOJu0YyfnbJaid6mxlOkHk7Sn1s41BFnOxDXwFpzTTK1eE+ytLvFwYKY Y85iZKNr/9UCdYZgyM5337QirirPkyVHxVn0HrECcj0MgEKyoxkm2EPliafSMf7AXPbDStddLCL S02w= X-Received: by 2002:a17:902:f707:b0:20b:9841:b44d with SMTP id d9443c01a7336-20bfde57e1dmr270920205ad.9.1728413202429; Tue, 08 Oct 2024 11:46:42 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:68d6:61bb:ff14:bcb3:8ace]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c1395dc41sm58068535ad.217.2024.10.08.11.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 11:46:42 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers Subject: [PATCH v2 3/8] Update PIDFD_* constants for Linux 6.11 Date: Tue, 8 Oct 2024 15:45:25 -0300 Message-ID: <20241008184634.245607-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241008184634.245607-1-adhemerval.zanella@linaro.org> References: <20241008184634.245607-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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. Reviewed-by: H.J. Lu --- 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'