From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753163AbcI1LGg (ORCPT ); Wed, 28 Sep 2016 07:06:36 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:34299 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752711AbcI1LG3 (ORCPT ); Wed, 28 Sep 2016 07:06:29 -0400 Subject: Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets To: Cyrill Gorcunov References: <20160928090357.GT1876@uranus.lan> <20160928101726.GU1876@uranus.lan> <8293413c-a81d-f7ff-24f0-8f58ce877116@mojatatu.com> <20160928105147.GV1876@uranus.lan> Cc: Eric Dumazet , David Ahern , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, avagin@openvz.org, stephen@networkplumber.org From: Jamal Hadi Salim Message-ID: <484dedaf-4e81-9a5a-ffb8-2c65b373c3a0@mojatatu.com> Date: Wed, 28 Sep 2016 07:06:26 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160928105147.GV1876@uranus.lan> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16-09-28 06:51 AM, Cyrill Gorcunov wrote: > On Wed, Sep 28, 2016 at 06:43:01AM -0400, Jamal Hadi Salim wrote: [..] >> I dont know how compilation will fail but you may be right with note: >> that is not how pads have been used in the past. They are supposed to >> cosmetic annotation which indicates "here's a hole; use it in the >> future if you are looking to add something". And someone in the >> future can claim them. I am not sure if MBZ philosophy applies. > > This structure is uapi, so anyone has complete rights to reference > @pad in the userspace programs. Sure it would be more clear to remove > the @pad completely, but if we choose so I think it's better to do > on top instead and then if someone complain we can easily revert > the single trivial commit instead of this big patch. I am conflicted. A field labelled "pad" does not appear to be valid as "UAPI". It is a cosmetic indicator. If you did sizeof() with or without it being present the value doesnt change. BTW: There is at least one major structure in inet diag has a hole today and doesnt have a padding indicator. > If protocol goes over u8 then complete inet_diag_req_v2 structure will > have to be reworked becaue @sdiag_protocol is u8 as well. IOW, once > someone liftup IPPROTO_MAX > 255, he will notice the problem immediately > because diag for such module simply stop working properly. > ok. cheers, jamal