netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Wolfgang Grandegger <wg@grandegger.com>,
	Wolfram Sang <w.sang@pengutronix.de>,
	Linux Netdev List <netdev@vger.kernel.org>,
	Andre Naujoks <nautsch@gmail.com>
Subject: Re: [PATCH net] mscan: zero accidentally copied register content
Date: Thu, 06 Oct 2011 20:25:24 +0200	[thread overview]
Message-ID: <4E8DF294.7060707@pengutronix.de> (raw)
In-Reply-To: <4E8C78E8.3010605@hartkopp.net>

[-- Attachment #1: Type: text/plain, Size: 896 bytes --]

On 10/05/2011 05:34 PM, Oliver Hartkopp wrote:
> Due to the 16 bit access to mscan registers there's too much data copied to
> the zero initialized CAN frame when having an odd number of bytes to copy.
> This patch clears the data byte read from the invalid register entry.
> 
> Reported-by: Andre Naujoks <nautsch@gmail.com>
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>

This problem have some other drivers, too, e.g. the at91 and the flexcan
driver both copy unconditionally all 8 bytes from the hardware. However,
I don't know if the hardware sets the remaining bytes to zero.

cheers, Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

      parent reply	other threads:[~2011-10-06 18:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05 15:34 [PATCH net] mscan: zero accidentally copied register content Oliver Hartkopp
2011-10-05 15:51 ` Wolfram Sang
2011-10-05 16:10   ` Oliver Hartkopp
2011-10-06  7:02     ` Oliver Hartkopp
2011-10-06  9:09       ` Wolfgang Grandegger
2011-10-06  9:24         ` Wolfram Sang
2011-10-06 14:01           ` Oliver Hartkopp
2011-10-06 14:09             ` Wolfram Sang
2011-10-06 14:14               ` Andre Naujoks
2011-10-06 14:33         ` Oliver Hartkopp
2011-10-06 15:03           ` Andre Naujoks
2011-10-06 18:24             ` Wolfgang Grandegger
2011-10-10 16:38               ` Oliver Hartkopp
2011-10-06 18:25 ` Marc Kleine-Budde [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=4E8DF294.7060707@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=nautsch@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    --cc=w.sang@pengutronix.de \
    --cc=wg@grandegger.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).