linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SCTP ABI breakage?
@ 2021-12-21 22:50 Stephen Hemminger
  2021-12-22 15:54 ` Xin Long
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2021-12-21 22:50 UTC (permalink / raw)
  To: in Long, vyasevich, nhorman, marcelo.leitner, davem, kuba
  Cc: linux-sctp, netdev

Looks like changes to SCTP events create kernel ABI breakage in applications.

If application is compiled with new header but attempts to run on older kernel, it doesn't work:

Reported here: https://osmocom.org/issues/5366

Looks like bad design assumptions about how setsockopt here:
static int sctp_setsockopt_events(struct sock *sk, __u8 *sn_type,
				  unsigned int optlen)
{
	struct sctp_sock *sp = sctp_sk(sk);
	struct sctp_association *asoc;
	int i;

	if (optlen > sizeof(struct sctp_event_subscribe))
		return -EINVAL;

Because of that the commits that add new events cause code built with the new
header to not run on older kernels.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: SCTP ABI breakage?
  2021-12-21 22:50 SCTP ABI breakage? Stephen Hemminger
@ 2021-12-22 15:54 ` Xin Long
  0 siblings, 0 replies; 2+ messages in thread
From: Xin Long @ 2021-12-22 15:54 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Vlad Yasevich, Neil Horman, Marcelo Ricardo Leitner, davem,
	Jakub Kicinski, linux-sctp @ vger . kernel . org, network dev

On Tue, Dec 21, 2021 at 5:50 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> Looks like changes to SCTP events create kernel ABI breakage in applications.
>
> If application is compiled with new header but attempts to run on older kernel, it doesn't work:
>
> Reported here: https://osmocom.org/issues/5366
>
> Looks like bad design assumptions about how setsockopt here:
> static int sctp_setsockopt_events(struct sock *sk, __u8 *sn_type,
>                                   unsigned int optlen)
> {
>         struct sctp_sock *sp = sctp_sk(sk);
>         struct sctp_association *asoc;
>         int i;
>
>         if (optlen > sizeof(struct sctp_event_subscribe))
>                 return -EINVAL;
>
> Because of that the commits that add new events cause code built with the new
> header to not run on older kernels.
Hi, Stephen,

This is a known issue, and we're sorry that this can not be fixed.
please see:

https://lore.kernel.org/netdev/20200501131607.GU1294372@nataraja/

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-22 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21 22:50 SCTP ABI breakage? Stephen Hemminger
2021-12-22 15:54 ` Xin Long

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).