netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Hartmann <andihartmann@01019freenet.de>
To: Oliver Freyermuth <o.freyermuth@googlemail.com>,
	David Miller <davem@davemloft.net>
Cc: romieu@fr.zoreil.com, netdev@vger.kernel.org
Subject: Re: Memory corruption with r8169 across several device revisions and kernels
Date: Wed, 24 Jan 2018 08:05:25 +0100	[thread overview]
Message-ID: <9ce9eecc-345b-a742-d6f2-eb8253876e5d@01019freenet.de> (raw)
In-Reply-To: <531457fe-373c-0590-a50d-bf8f96d02195@01019freenet.de>

On 01/24/2018 at 06:31 AM Andreas Hartmann wrote:
> On 01/23/2018 at 04:47 PM Oliver Freyermuth wrote:
>> Am 23.01.2018 um 16:28 schrieb David Miller:
>>> Looking at how these DMA counters are handled, there appears to be a
>>> requirement that the memory buffer is 64-byte aligned.
>>>
>>> [...]
>>>
>>> Therefore the driver needs to allocate "size + (64 - 1)" bytes and do
>>> the 64-byte alignment of the CPU pointer and the DMA address by hand.
>>
>> This is also what I wondered about as a non-expert in hardware drivers; 
>> alignment should surely be enforced here. 
>>
>> However, for the memory corruption I observed, I used an x86_64 system
>> (which I believe always has PAGE_SIZE aligned buffers). 
>> So there should be another bug, unless I am mistaken about x86_64. 
>>
>> I checked the deprecated r8168 driver by Realtek (I am not sure if this one is also affected by the issue, though)
> 
> I'm using since years this driver because r8169 is broken (it is slow
> and it misses packages - which is extremely bad for real time
> applications like asterisk, if they appear 50s later ...).
> 
> r8168-8.045.08 is an actual version which is provided by realtek on
> their homepage and which even compiles fine w/ 4.14.x.

It just *compiles* w/ 4.14 - but doesn't work here at all. It's running
fine here w/ vanilla 4.4. Realtek officially writes about support up to
4.7. at the moment - but code already knows about 4.11.


Regards,
Andreas

  reply	other threads:[~2018-01-24  7:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-20 20:18 Memory corruption with r8169 across several device revisions and kernels Oliver Freyermuth
2018-01-21 20:48 ` Francois Romieu
2018-01-21 20:50   ` Oliver Freyermuth
2018-01-22  0:09     ` Francois Romieu
2018-01-22  0:44       ` Oliver Freyermuth
2018-01-22 22:55       ` Oliver Freyermuth
2018-01-23 15:28         ` David Miller
2018-01-23 15:47           ` Oliver Freyermuth
2018-01-24  5:31             ` Andreas Hartmann
2018-01-24  7:05               ` Andreas Hartmann [this message]
2018-01-23 22:13         ` Francois Romieu
2018-01-24  1:21           ` Oliver Freyermuth
2018-01-24  1:33             ` David Miller
2018-01-26  0:53               ` [PATCH net 1/1] r8169: fix memory corruption on retrieval of hardware statistics Francois Romieu
2018-01-26  2:34                 ` David Miller

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=9ce9eecc-345b-a742-d6f2-eb8253876e5d@01019freenet.de \
    --to=andihartmann@01019freenet.de \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=o.freyermuth@googlemail.com \
    --cc=romieu@fr.zoreil.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).