From patchwork Fri Oct 13 21:45:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1848674 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S6g702L64z1yqj for ; Sat, 14 Oct 2023 08:46:04 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6380A3856DEA for ; Fri, 13 Oct 2023 21:46:02 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 934CB3858CDB for ; Fri, 13 Oct 2023 21:45:52 +0000 (GMT) ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 934CB3858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.252 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697233554; cv=none; b=xoijjUgFfxxkriDsf0n2AVA+xaizkZRhHOsVH+aXdg6NfiVlMQ59iu9CBtuSMRgFGduuP0S86mxle+Sd1aNtwtx04EI1eMtFJz2ZoIrJ7ldwRe943KpYNQ5ZNTntEfZzlIcDZ94b5SLt+W2Vr+gWSIfSjh1JM1Mc2kzWAZMTHX4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697233554; c=relaxed/simple; bh=7RYGVng3y6OzXk/DKdXKSfFk3+Zd6bPoN/KphBZQZc0=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=Yg++x7XrLBudFsWhTGu68f9KmUrZagi8ZiQbP1bVKFoHmn8RRczWrgRV2myz8w36Pdq953l0KPhHdq/AOgieSBDb/xyYNGhCkP5s1aOfxaYqwohxwpVhPoXmzHPNcu/df0rpY+FrZNScY+RkAcbn14/8dfYdpE7AhnVo89P2IKM= ARC-Authentication-Results: i=1; server2.sourceware.org DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 934CB3858CDB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-CSE-ConnectionGUID: VXDLbOXER6qxuTtgsxNH+A== X-CSE-MsgGUID: uyHm3VYqSoKlWtt9W7sjnA== X-IronPort-AV: E=Sophos;i="6.03,223,1694764800"; d="scan'208";a="19424348" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 13 Oct 2023 13:45:51 -0800 IronPort-SDR: CupK4/D6fNneIDmOCtTsTQsEHB7TlLisISNuW3sK4CTFmUZYU6Kj6ItPKSdzMDsz/Z93lxThjT 6TAhEcIhPqL425jdMc231khwgZRxsaPNHv/NMzORAzmyXjeNoqRPpv24syVEPIBhJlHfiDKuAi QkN/Tz3zh1Qp9Pk9PzMu4NfuPD+Q9vSsDTyej8lKmg+jk3lQzpwau69X8tHCnqt2knhuVbPVu/ t+Ey6pcqy7rQD0qic6FPiSFazTXwZVrjzHdKOWMOqI2zx4M6GSMuTX54Nz2MTi94C9cEpwqwnt CdU= Date: Fri, 13 Oct 2023 21:45:46 +0000 From: Joseph Myers To: Subject: Add SCM_SECURITY, SCM_PIDFD to bits/socket.h Message-ID: <16452ef-e89d-9618-efbf-475f95eb6e36@codesourcery.com> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3109.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, 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+incoming=patchwork.ozlabs.org@sourceware.org Linux 6.5 adds a constant SCM_PIDFD (recall that the non-uapi linux/socket.h, where this constant is added, is in fact a header providing many constants that are part of the kernel/userspace interface). This shows up that SCM_SECURITY, from the same set of definitions and added in Linux 2.6.17, is also missing from glibc, although glibc has the first two constants from this set, SCM_RIGHTS and SCM_CREDENTIALS; add both missing constants to glibc. Tested for x86_64. diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h index 57b05715be..c19814c5cf 100644 --- a/sysdeps/unix/sysv/linux/bits/socket.h +++ b/sysdeps/unix/sysv/linux/bits/socket.h @@ -367,6 +367,10 @@ enum #ifdef __USE_GNU , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ # define SCM_CREDENTIALS SCM_CREDENTIALS + , SCM_SECURITY = 0x03 /* Security label. */ +# define SCM_SECURITY SCM_SECURITY + , SCM_PIDFD = 0x04 /* Pidfd. */ +# define SCM_PIDFD SCM_PIDFD #endif };