From: Richard Weinberger <richard@nod.at>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: linux-can <linux-can@vger.kernel.org>,
Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Subject: Re: [PATCH v2] [RFC] can: fix msg_namelen values depending on CAN_REQUIRED_SIZE
Date: Thu, 25 Mar 2021 10:31:22 +0100 (CET) [thread overview]
Message-ID: <1257589994.113291.1616664682112.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <20210325081326.1652-1-socketcan@hartkopp.net>
----- Ursprüngliche Mail -----
> Von: "Oliver Hartkopp" <socketcan@hartkopp.net>
> An: "linux-can" <linux-can@vger.kernel.org>
> CC: "Oliver Hartkopp" <socketcan@hartkopp.net>, "richard" <richard@nod.at>, "Kurt Van Dijck"
> <dev.kurt@vandijck-laurijssen.be>
> Gesendet: Donnerstag, 25. März 2021 09:13:26
> Betreff: [PATCH v2] [RFC] can: fix msg_namelen values depending on CAN_REQUIRED_SIZE
> Since commit f5223e9eee65 ("can: extend sockaddr_can to include j1939
> members") the sockaddr_can has been extended in size and a new
> CAN_REQUIRED_SIZE macro has been introduced to calculate the protocol
> specific needed size.
>
> The ABI for the msg_name and msg_namelen has not been adapted to the
> new CAN_REQUIRED_SIZE macro for the other CAN protocols which leads
> to a problem when an existing binary reads the (increased)
> struct sockaddr_can in msg_name.
>
> Fixes: f5223e9eee65 ("can: extend sockaddr_can to include j1939 members")
> Link:
> https://lore.kernel.org/linux-can/1135648123.112255.1616613706554.JavaMail.zimbra@nod.at/T/#t
> Reported-by: Richard Weinberger <richard@nod.at>
> Suggested-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
> ---
> net/can/bcm.c | 10 ++++++----
> net/can/isotp.c | 11 +++++++----
> net/can/raw.c | 14 ++++++++------
> 3 files changed, 21 insertions(+), 14 deletions(-)
The patch unbreaks my application. :-)
Tested-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
prev parent reply other threads:[~2021-03-25 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 8:13 [PATCH v2] [RFC] can: fix msg_namelen values depending on CAN_REQUIRED_SIZE Oliver Hartkopp
2021-03-25 8:47 ` Kurt Van Dijck
2021-03-25 9:11 ` Oliver Hartkopp
2021-03-25 9:13 ` Marc Kleine-Budde
2021-03-25 9:31 ` Richard Weinberger [this message]
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=1257589994.113291.1616664682112.JavaMail.zimbra@nod.at \
--to=richard@nod.at \
--cc=dev.kurt@vandijck-laurijssen.be \
--cc=linux-can@vger.kernel.org \
--cc=socketcan@hartkopp.net \
/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