mbox series

[net-next,v2,0/2] MCTP sockaddr padding check/initialisation fixup

Message ID cover.1635965993.git.esyr@redhat.com (mailing list archive)
Headers show
Series MCTP sockaddr padding check/initialisation fixup | expand

Message

Eugene Syromiatnikov Nov. 3, 2021, 7:09 p.m. UTC
Hello.

This pair of patches introduces checks for padding fields of struct
sockaddr_mctp/sockaddr_mctp_ext to ease their re-use for possible
extensions in the future;  as well as zeroing of these fields
in the respective sockaddr filling routines.  While the first commit
is definitely an ABI breakage, it is proposed in hopes that the change
is made soon enough (the interface appeared only in Linux 5.15)
to avoid affecting any existing user space.

Eugene Syromiatnikov (2):
  mctp: handle the struct sockaddr_mctp padding fields
  mctp: handle the struct sockaddr_mctp_ext padding field

 net/mctp/af_mctp.c | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

--
v2:
 - Fixed the style of logical continuations, as noted by Jakub Kicinski.
 - Changed "Complements:" to "Fixes:" in commit messages, as it seems
   that it is the only commit message tag checkpatch.pl recognises.

v1: https://lore.kernel.org/netdev/cover.1635788968.git.esyr@redhat.com/

Comments

Jakub Kicinski Nov. 4, 2021, 11:55 p.m. UTC | #1
On Wed, 3 Nov 2021 20:09:36 +0100 Eugene Syromiatnikov wrote:
> This pair of patches introduces checks for padding fields of struct
> sockaddr_mctp/sockaddr_mctp_ext to ease their re-use for possible
> extensions in the future;  as well as zeroing of these fields
> in the respective sockaddr filling routines.  While the first commit
> is definitely an ABI breakage, it is proposed in hopes that the change
> is made soon enough (the interface appeared only in Linux 5.15)
> to avoid affecting any existing user space.

Seems reasonable, Jeremy can you send an ack?
Jeremy Kerr Nov. 4, 2021, 11:59 p.m. UTC | #2
Hi Jakub,

> > This pair of patches introduces checks for padding fields of struct
> > sockaddr_mctp/sockaddr_mctp_ext to ease their re-use for possible
> > extensions in the future;  as well as zeroing of these fields
> > in the respective sockaddr filling routines.  While the first
> > commit
> > is definitely an ABI breakage, it is proposed in hopes that the
> > change
> > is made soon enough (the interface appeared only in Linux 5.15)
> > to avoid affecting any existing user space.
> 
> Seems reasonable, Jeremy can you send an ack?

Yep, will do ASAP - I'm planning also send references to the commits
ton the userspace side, so that we have a record of where everything
lines up on the updated ABI.

I'll have that done later today.

Cheers,


Jeremy
Jeremy Kerr Nov. 5, 2021, 12:23 a.m. UTC | #3
Hi Eugene,

> While the first commit is definitely an ABI breakage, it is proposed
> in hopes that the change is made soon enough (the interface appeared
> only in Linux 5.15) to avoid affecting any existing user space.

Of the two applications that currently use AF_MCTP:

 - one is already zeroing the sockaddr_mctp
 - the other has a fix for two of the potential sendmsg() & bind()
   calls: https://github.com/CodeConstruct/mctp/commit/072bafe7

Given we have a confined set of applications (and users), and they're
both now compatible with this change:

Acked-by: Jeremy Kerr <jk@codeconstruct.com.au>

For both patches.

Cheers,


Jeremy
patchwork-bot+netdevbpf@kernel.org Nov. 5, 2021, 2:30 a.m. UTC | #4
Hello:

This series was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 3 Nov 2021 20:09:36 +0100 you wrote:
> Hello.
> 
> This pair of patches introduces checks for padding fields of struct
> sockaddr_mctp/sockaddr_mctp_ext to ease their re-use for possible
> extensions in the future;  as well as zeroing of these fields
> in the respective sockaddr filling routines.  While the first commit
> is definitely an ABI breakage, it is proposed in hopes that the change
> is made soon enough (the interface appeared only in Linux 5.15)
> to avoid affecting any existing user space.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/2] mctp: handle the struct sockaddr_mctp padding fields
    https://git.kernel.org/netdev/net/c/1e4b50f06d97
  - [net-next,v2,2/2] mctp: handle the struct sockaddr_mctp_ext padding field
    https://git.kernel.org/netdev/net/c/e9ea574ec1c2

You are awesome, thank you!