From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932400AbcI1Mij (ORCPT ); Wed, 28 Sep 2016 08:38:39 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:33665 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932273AbcI1Mie (ORCPT ); Wed, 28 Sep 2016 08:38:34 -0400 Subject: Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets To: David Miller References: <20160928112703.GW1876@uranus.lan> <20160928.080701.1194277590163223525.davem@davemloft.net> <60b2e075-e852-f0c2-c188-631f547791d5@mojatatu.com> <20160928.081646.1634500099795129398.davem@davemloft.net> <70b51ac5-a7d1-8b52-90c4-7f80ec8ad4d5@mojatatu.com> Cc: gorcunov@gmail.com, eric.dumazet@gmail.com, dsa@cumulusnetworks.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, 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: Date: Wed, 28 Sep 2016 08:38: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: <70b51ac5-a7d1-8b52-90c4-7f80ec8ad4d5@mojatatu.com> 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 08:27 AM, Jamal Hadi Salim wrote: > On 16-09-28 08:16 AM, David Miller wrote: >> From: Jamal Hadi Salim >> Date: Wed, 28 Sep 2016 08:09:28 -0400 >> >>> On 16-09-28 08:07 AM, David Miller wrote: >>> >>>> Right, it would be legal for an existing user to have code that >>>> explicitly initializes every member of the structure, including 'pad'. >>>> So we have to keep that member around, at a minimum, for their sake. >>>> >>> >>> I think we need to start labelling any new pad fields added as >>> "Not UAPI. Do not fsck fondle this". >> >> They must initialize it to zero. >> > > What if in the future actually meant to use 0 for > something?;-> For example in Cyrill's case it means PROTO_IP > Not sure if it useful to interpret or not but it is part of the > enum for protocols. I just tested with: socket(AF_INET, SOCK_RAW, 0); and got back: EPROTONOSUPPORT So in this case doesnt matter. But my point stands i.e 0 could mean something. cheers, jamal