Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1492533

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

From Jamal Hadi Salim <jhs@mojatatu.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets
Date 2016-09-28 13:10 +0200
Message-ID <smkUp-5Ue-13@gated-at.bofh.it> (permalink)
References <smj2i-4LM-41@gated-at.bofh.it> <smjYm-5lD-23@gated-at.bofh.it> <smk82-5oX-17@gated-at.bofh.it> <smkB4-5yJ-5@gated-at.bofh.it> <smkKJ-5BT-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 11:10 +0200
  Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Jamal Hadi Salim <jhs@mojatatu.com> - 2016-09-28 12:10 +0200
    Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 12:20 +0200
      Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Jamal Hadi Salim <jhs@mojatatu.com> - 2016-09-28 12:50 +0200
        Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 13:00 +0200
          Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Jamal Hadi Salim <jhs@mojatatu.com> - 2016-09-28 13:10 +0200
            Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 13:30 +0200
              Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Jamal Hadi Salim <jhs@mojatatu.com> - 2016-09-28 14:10 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets David Miller <davem@davemloft.net> - 2016-09-28 14:20 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 14:30 +0200
              Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets David Miller <davem@davemloft.net> - 2016-09-28 14:10 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 14:20 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets David Miller <davem@davemloft.net> - 2016-09-28 14:20 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Jamal Hadi Salim <jhs@mojatatu.com> - 2016-09-28 14:30 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Jamal Hadi Salim <jhs@mojatatu.com> - 2016-09-28 14:40 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 14:50 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 15:00 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Jamal Hadi Salim <jhs@mojatatu.com> - 2016-09-28 15:00 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Jamal Hadi Salim <jhs@mojatatu.com> - 2016-09-28 14:20 +0200
              Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Eric Dumazet <eric.dumazet@gmail.com> - 2016-09-28 15:00 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 15:10 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 15:10 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Eric Dumazet <eric.dumazet@gmail.com> - 2016-09-28 15:30 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 15:50 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Eric Dumazet <eric.dumazet@gmail.com> - 2016-09-28 16:00 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov <gorcunov@gmail.com> - 2016-09-28 17:00 +0200
                Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Eric Dumazet <eric.dumazet@gmail.com> - 2016-09-28 15:10 +0200

csiph-web