From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id 718A43857016 for ; Fri, 21 Apr 2023 20:28:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 718A43857016 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3f1738d0d4cso14497835e9.1 for ; Fri, 21 Apr 2023 13:28:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682108906; x=1684700906; 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=MDfWHM/P6nNEa1XjW5/WtrlkjEXtQfrXNsFHpzNi76Y=; b=BNz/fs651UEi35uM78DaqKkMCaaXyy9oViuvGFaszVxaFUPBz6Tyn91GUZsvQfpMag oTLJpvl6DAn+3+I4A0qrpYQf+Dzf4Nn1i/tPKLphWTdATqfoSUGAFNuil3cYxfgHNreP 0OlwyCZjQL+g+EFyd4zhzmCvDSCoVP77ZSUUW0k5M5BY95mkah2ve8OBIqm8TJTDXi0v Vcm5+DlBlykmXiHQS0ghW43dWNlYSz8qlv3BhWGpUrp0dWK4PYd4+7+u7oeqvGRoSdGp zp3t0iMwX0OLPCFZgDWqDuSLfD7H/EKIvqxphegJn7iGTUOS7C/YP6NXbwDQjKG6Raph wofg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682108906; x=1684700906; 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=MDfWHM/P6nNEa1XjW5/WtrlkjEXtQfrXNsFHpzNi76Y=; b=LKzMcocS52qp0d5TfnZcTN5F6Z80US6aB3hn+PMpKwkI6didSGJlecLD2z7qk1ni1S 0P1iZi4scaE4LZNe3nbYucueWcbGF1whElMX87yR0otNAMRH3TPMd0VYBac8c2JdEMP5 8Aaz30POILMSimmxLMv+bG4yDeNRXNsis9nECjm+bx+hHTjk1o0cP0U+IR51BQqRT1Ww UlY3zwnqGlgUsyrYXawc9VIudzqH2ZG3hsaVO+PcGbjUof+hlJyqAnbMAVE2FNsmoQBb cCkakxE4IND3oCmye6r543U91ULrr0Vrdh5fxgw5hIKDx/wS7kFUEygj5tDIHVeJjQJO 1ucw== X-Gm-Message-State: AAQBX9dxp1NW1ouOjUP5lSBf2ivb+mbgQ1mZlD4ePqRDTRUfekrxah+s hVqxxBThg6CM31k+rPdnR4Y= X-Google-Smtp-Source: AKy350YCNv4XKwjAYNpB6xP09yqF1vMRlXDCqd82hjCbROWJuJnKCtWFkwOHqkNfWXUwJ92PF5VuMw== X-Received: by 2002:a7b:ce87:0:b0:3f1:7277:eaa with SMTP id q7-20020a7bce87000000b003f172770eaamr2818133wmj.31.1682108906047; Fri, 21 Apr 2023 13:28:26 -0700 (PDT) Received: from asus5775.alejandro-colomar.es ([170.253.51.134]) by smtp.googlemail.com with ESMTPSA id o10-20020a1c750a000000b003f191c9c4b0sm2698226wmc.11.2023.04.21.13.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 13:28:25 -0700 (PDT) From: Alejandro Colomar X-Google-Original-From: Alejandro Colomar To: linux-man@vger.kernel.org Cc: Alejandro Colomar , =?UTF-8?q?Bastien=20Roucari=C3=A8s?= , Eric Blake , glibc , GCC , Stefan Puiu , Igor Sysoev , Rich Felker , Andrew Clayton , Richard Biener , Zack Weinberg , Florian Weimer , Joseph Myers , Jakub Jelinek , Sam James Subject: [PATCH v3] sockaddr.3type: POSIX Issue 8 will solve strict-aliasing issues with these types Date: Fri, 21 Apr 2023 22:27:18 +0200 Message-Id: <20230421202718.21831-1-alx@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Link: Reported-by: Bastien Roucariès Reported-by: Alejandro Colomar Reviewed-by: Eric Blake Cc: glibc Cc: GCC Cc: Stefan Puiu Cc: Igor Sysoev Cc: Rich Felker Cc: Andrew Clayton Cc: Richard Biener Cc: Zack Weinberg Cc: Florian Weimer Cc: Joseph Myers Cc: Jakub Jelinek Cc: Sam James Signed-off-by: Alejandro Colomar --- Hi Eric, I took your informal review as a "Reviewed-by". Please confirm. I've also modified the small wording thingy you suggested. I'll float this patch in the list in case anyone has comments, and will push some time this weekend (depending on many variables). Cheers, Alex man3type/sockaddr.3type | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/man3type/sockaddr.3type b/man3type/sockaddr.3type index 2fdf56c59..cf8d601f5 100644 --- a/man3type/sockaddr.3type +++ b/man3type/sockaddr.3type @@ -117,6 +117,14 @@ .SH HISTORY was invented by POSIX. See also .BR accept (2). +.PP +These structures were invented before modern ISO C strict-aliasing rules. +If aliasing rules are applied strictly, +these structures would be extremely difficult to use +without invoking Undefined Behavior. +POSIX Issue 8 will fix this by requiring that implementations +make sure that these structures +can be safely used as they were designed. .SH NOTES .I socklen_t is also defined in -- 2.40.0