netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Marcelo Ricardo Leitner' <marcelo.leitner@gmail.com>
Cc: Julien Gomes <julien@arista.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-sctp@vger.kernel.org" <linux-sctp@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"nhorman@tuxdriver.com" <nhorman@tuxdriver.com>,
	"vyasevich@gmail.com" <vyasevich@gmail.com>,
	"lucien.xin@gmail.com" <lucien.xin@gmail.com>
Subject: RE: [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length
Date: Fri, 8 Feb 2019 09:53:03 +0000	[thread overview]
Message-ID: <0415888f34e7494e9879a77599c618e0@AcuMS.aculab.com> (raw)
In-Reply-To: <20190207174715.GF13621@localhost.localdomain>

From: 'Marcelo Ricardo Leitner'
> Sent: 07 February 2019 17:47
...
> > > Maybe what we want(ed) here then is explicit versioning, to have the 3
> > > definitions available. Then the application is able to use, say struct
> > > sctp_event_subscribe, and be happy with it, while there is struct
> > > sctp_event_subscribe_v2 and struct sctp_event_subscribe_v3 there too.
> > >
> > > But it's too late for that now because that would break applications
> > > already using the new fields in sctp_event_subscribe.
> >
> > It is probably better to break the recompilation of the few programs
> > that use the new fields (and have them not work on old kernels)
> > than to stop recompilations of old programs stop working on old
> > kernels or have requested new options silently ignored.
> 
> I got confused here, not sure what you mean. Seems there is one "stop"
> word too many.

More confusing than I intended...

With the current kernel and headers a 'new program' (one that
needs the new options) will fail to run on an old kernel - which is good.
However a recompilation of an 'old program' (that doesn't use
the new options) will also fail to run on an old kernel - which is bad.

Changing the kernel to ignore extra events flags breaks the 'new'
program.

Versioning the structure now (even though it should have been done
earlier) won't change the behaviour of existing binaries.

However a recompilation of an 'old' program would use the 'old'
structure and work on old kernels.
Attempts to recompile a 'new' program will fail - until the structure
name (or some #define to enable the extra fields) is changed.

Breaking compilations is much better than unexpected run-time
behaviour.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2019-02-08  9:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 20:14 [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length Julien Gomes
2019-02-06 20:37 ` Marcelo Ricardo Leitner
2019-02-06 20:48   ` Julien Gomes
2019-02-06 21:07     ` Marcelo Ricardo Leitner
2019-02-06 21:23       ` Neil Horman
2019-02-06 21:48         ` Julien Gomes
2019-02-07 14:44           ` Neil Horman
2019-02-06 21:26       ` Julien Gomes
2019-02-06 21:39         ` Neil Horman
2019-02-06 21:48           ` Julien Gomes
2019-02-06 21:53             ` Julien Gomes
2019-02-07 14:48             ` Neil Horman
2019-02-07 17:33       ` David Laight
2019-02-07 17:47         ` 'Marcelo Ricardo Leitner'
2019-02-08  9:53           ` David Laight [this message]
2019-02-08 12:36             ` Neil Horman
2019-02-06 21:08     ` Neil Horman
2019-02-06 21:18       ` Marcelo Ricardo Leitner
2019-02-09 23:12   ` David Miller
2019-02-10 12:46     ` Marcelo Ricardo Leitner
2019-02-10 20:15       ` Marcelo Ricardo Leitner
2019-02-13 16:17         ` David Laight
2019-02-13 17:23           ` 'Marcelo Ricardo Leitner'
2019-02-11 15:04       ` Neil Horman
2019-02-11 17:05         ` Marcelo Ricardo Leitner
2019-02-06 20:49 ` Neil Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0415888f34e7494e9879a77599c618e0@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=davem@davemloft.net \
    --cc=julien@arista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=vyasevich@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).