From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932339AbcI1M12 (ORCPT ); Wed, 28 Sep 2016 08:27:28 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:36235 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932179AbcI1M11 (ORCPT ); Wed, 28 Sep 2016 08:27:27 -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> 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: <70b51ac5-a7d1-8b52-90c4-7f80ec8ad4d5@mojatatu.com> Date: Wed, 28 Sep 2016 08:27:24 -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: <20160928.081646.1634500099795129398.davem@davemloft.net> 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: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. Maybe we shouldnt be adding pad fields in these netlink structure definitions then one can liberally add new ones. Note: inet_diag somewhere has a netlink structure that has a hole. I pointed it out to Eric D. and he said we cant add it now because it would break ABI. So where do we draw the line for future extensions? cheers, jamal