mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jay Cliburn <jacliburn@bellsouth.net>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Chris Snook <csnook@redhat.com>,
	Luca Tettamanti <kronos.it@gmail.com>,
	Jeff Garzik <jeff@garzik.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: atl1 64-bit => 32-bit DMA borkage (reproducible, bisected)
Date: Fri, 9 May 2008 14:38:54 -0500	[thread overview]
Message-ID: <20080509143854.7bc39ab7@osprey.hogchain.net> (raw)
In-Reply-To: <20080509200715.GA5040@martell.zuzino.mipt.ru>

[trimmed cc list slightly]

On Sat, 10 May 2008 00:07:15 +0400
Alexey Dobriyan <adobriyan@gmail.com> wrote:

> On Fri, May 09, 2008 at 02:56:21PM -0400, Chris Snook wrote:
> > Alexey Dobriyan wrote:
> >> Hmmm, there was a wonderful oops on interface stop here when the
> >> other end of atl1 cable was physically unplugged (but there was
> >> traffic before): atl1_down
> >> 	atl1_clean_rx_ring
> >> 	swiotlb_unmap_single
> >> 	swiotlb_unmap_single_attrs
> >> 	memcpy_c
> >
> > Intel chip, or AMD?
> 
> Intel(R) Core(TM)2 CPU          6400  @ 2.13GHz
> Asus P5B-E motherboard.
> 

I see the same thing with a Socked AM2-based board (Asus M2V) with 4GB
RAM installed. The problem occurs only when SWIOTLB is active, which
happens automatically at boot (in arch/x86/kernel/pci-swiotlb.c) when
the page frame number exceeds 1048576 (corresponding to 2^32 bytes).

I thought for awhile that the problem went away with iommu=allowed, but
I was wrong.

The bug appears to be a "simple" skb write-after-free that happens only
when bounce buffers are in use, but I'll be damned if I can find the
cause of it.

<continues looking>

=============================================================================
BUG kmalloc-2048: Poison overwritten
-----------------------------------------------------------------------------

INFO: 0xffff81010004297a-0xffff810100042f71. First byte 0x0 instead of 0x6b
INFO: Allocated in dev_alloc_skb+0x16/0x2c age=5813 cpu=0 pid=3029
INFO: Freed in skb_release_data+0xa8/0xad age=201 cpu=0 pid=0
INFO: Slab 0xffffe20005801600 objects=15 used=0 fp=0xffff810100045b18 flags=0x8000000000002082
INFO: Object 0xffff810100042968 @offset=10600 fp=0xffff8101000418d8

Bytes b4 0xffff810100042958:  aa 91 fd ff 00 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a �.��....ZZZZZZZZ
  Object 0xffff810100042968:  6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
  Object 0xffff810100042978:  6b 6b 00 17 31 4e 9d 41 00 0f db bc af 14 08 00 kk..1N.A..ۼ�...
  Object 0xffff810100042988:  45 00 00 4e 87 5e 00 00 40 11 6e 82 c0 a8 01 fe E..N.^..@.n.�������.�
  Object 0xffff810100042998:  c0 a8 01 70 00 89 00 89 00 3a 3b 67 00 09 00 00 ��.p.....:;g....
  Object 0xffff8101000429a8:  00 01 00 00 00 00 00 00 20 43 4b 41 41 41 41 41 .........CKAAAAA
  Object 0xffff8101000429b8:  41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 AAAAAAAAAAAAAAAA
  Object 0xffff8101000429c8:  41 41 41 41 41 41 41 41 41 00 00 21 00 01 f0 53 AAAAAAAAA..!..
  Object 0xffff8101000429d8:  56 17 df 3e 3b 9f b7 1f 2d 29 f0 68 cf 4d 61 97 V.�>;.�.-)�h�Ma.
 Redzone 0xffff810100043168:  bb bb bb bb bb bb bb bb                         �𰻻������        
 Padding 0xffff8101000431a8:  5a 5a 5a 5a 5a 5a 5a 5a                         ZZZZZZZZ        
Pid: 3030, comm: ifconfig Not tainted 2.6.26-rc1 #3

Call Trace:
 [<ffffffff8108cf62>] print_trailer+0x123/0x12c
 [<ffffffff8108d00f>] check_bytes_and_report+0xa4/0xcb
 [<ffffffff8108d33e>] check_object+0xca/0x212
 [<ffffffff8108d6cd>] __free_slab+0x85/0xfd
 [<ffffffff811e5dd3>] ? skb_release_data+0xa8/0xad
 [<ffffffff8108d77d>] discard_slab+0x38/0x3a
 [<ffffffff8108e172>] __slab_free+0xdb/0x2ac
 [<ffffffff8108e47a>] kfree+0xbc/0xcb
 [<ffffffff811e5dd3>] ? skb_release_data+0xa8/0xad
 [<ffffffff811e5dd3>] skb_release_data+0xa8/0xad
 [<ffffffff811e6494>] skb_release_all+0xc9/0xce
 [<ffffffff811e5c2e>] __kfree_skb+0x11/0x78
 [<ffffffff811e5cbc>] kfree_skb+0x27/0x29
 [<ffffffffa00cc3aa>] :atl1:atl1_clean_rx_ring+0x7e/0xe2
 [<ffffffffa00cc4d7>] :atl1:atl1_down+0xc9/0xce
 [<ffffffffa00cedcd>] :atl1:atl1_close+0x18/0x27
 [<ffffffff811ebe2d>] dev_close+0x57/0x72
 [<ffffffff811ebb31>] dev_change_flags+0xa8/0x164
 [<ffffffff8122f44c>] devinet_ioctl+0x26a/0x5f6
 [<ffffffff8122fc79>] inet_ioctl+0x92/0xaa
 [<ffffffff811df6d4>] sock_ioctl+0x1da/0x202
 [<ffffffff8109f252>] vfs_ioctl+0x2a/0x77
 [<ffffffff8109f501>] do_vfs_ioctl+0x262/0x27f
 [<ffffffff8109f575>] sys_ioctl+0x57/0x7a
 [<ffffffff8100bff7>] tracesys+0xd5/0xda

FIX kmalloc-2048: Restoring 0xffff81010004297a-0xffff810100042f71=0x6b

  reply	other threads:[~2008-05-09 19:39 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11  3:33 2.6.25-rc8-mm2 Andrew Morton
2008-04-11  6:28 ` 2.6.25-rc8-mm2: boot hang after "ACPI: using IOAPIC for interrupt routing" Alexey Dobriyan
2008-04-11  6:29 ` Alexey Dobriyan
2008-04-11  6:43   ` Pekka Enberg
2008-04-11 10:35   ` Pekka Enberg
2008-04-11 21:07     ` Alexey Dobriyan
2008-04-11 21:25       ` Pekka J Enberg
2008-04-11 23:09         ` Alexey Dobriyan
2008-04-11  9:57 ` 2.6.25-rc8-mm2 KAMEZAWA Hiroyuki
2008-04-11 10:23   ` 2.6.25-rc8-mm2 KAMEZAWA Hiroyuki
2008-04-11 10:34     ` 2.6.25-rc8-mm2 Pekka Enberg
2008-04-11 10:57       ` 2.6.25-rc8-mm2 KAMEZAWA Hiroyuki
2008-04-11 11:17         ` 2.6.25-rc8-mm2 KAMEZAWA Hiroyuki
2008-04-11 13:17           ` 2.6.25-rc8-mm2 KAMEZAWA Hiroyuki
2008-04-11 14:24             ` 2.6.25-rc8-mm2 Pekka Enberg
2008-04-14  3:13               ` 2.6.25-rc8-mm2 KAMEZAWA Hiroyuki
2008-04-11 13:40 ` 2.6.25-rc8-mm2 Adrian Bunk
2008-04-12  4:22   ` 2.6.25-rc8-mm2 Andrew Morton
2008-04-12 18:43     ` 2.6.25-rc8-mm2 Aneesh Kumar K.V
2008-04-13  7:45       ` 2.6.25-rc8-mm2 Michael Schmitz
2008-04-13  8:11         ` 2.6.25-rc8-mm2 Geert Uytterhoeven
2008-04-11 23:43 ` 2.6.25-rc8-mm2: panic involving mount_block_root and down the road Alexey Dobriyan
2008-04-12  0:59   ` 2.6.25-rc8-mm2: CONFIG_ATA_SFF: " Alexey Dobriyan
2008-04-12  6:52     ` Adrian Bunk
2008-04-12 10:02       ` Jeff Garzik
2008-04-13  0:45         ` Tejun Heo
2008-04-13  0:51         ` [mm patch] select ATA_SFF Adrian Bunk
2008-04-12  5:53 ` 2.6.25-rc8-mm2 Valdis.Kletnieks
2008-04-12  6:07   ` 2.6.25-rc8-mm2 Andrew Morton
2008-04-12  8:52 ` 2.6.25-rc8-mm2 - CONFIG_PROFILE_LIKELY broke again Valdis.Kletnieks
2008-04-12  9:41 ` 2.6.25-rc8-mm2 Valdis.Kletnieks
2008-04-12 10:47 ` 2.6.25-rc8-mm2 - ftraced chews 100% of a CPU Valdis.Kletnieks
2008-04-13 20:44 ` 2.6.25-rc8-mm2: IP: [<ffffffff802868f9>] __kmalloc+0x69/0x110 Alexey Dobriyan
2008-04-13 20:53   ` Andrew Morton
2008-04-14 16:18     ` Pekka Enberg
2008-04-14 18:00     ` Christoph Lameter
2008-04-14  9:51   ` Pekka J Enberg
2008-04-14 16:01   ` Pekka Enberg
2008-04-14 17:53     ` Christoph Lameter
2008-04-14 17:57       ` Christoph Lameter
2008-04-14 18:32       ` Alexey Dobriyan
2008-04-14 19:56         ` 2.6.25-rc8-mm2: FIX kmalloc-2048 (was Re: 2.6.25-rc8-mm2: IP: [<ffffffff802868f9>] __kmalloc+0x69/0x110) Alexey Dobriyan
2008-04-14 20:05           ` Christoph Lameter
2008-04-19 11:17             ` Alexey Dobriyan
2008-04-19 14:45               ` atl1 64-bit => 32-bit DMA borkage (reproducible, bisected) Alexey Dobriyan
2008-04-20  2:54                 ` Jay Cliburn
2008-04-20 11:14                   ` Alexey Dobriyan
2008-04-20 11:06                     ` Jay Cliburn
2008-04-20 12:26                       ` Alexey Dobriyan
2008-04-20 18:37                         ` Jay Cliburn
2008-04-20 20:55                           ` Alexey Dobriyan
2008-04-21 18:42                             ` Chris Snook
2008-04-21 19:56                               ` Alexey Dobriyan
2008-04-22  2:08                             ` Jay Cliburn
2008-04-22 19:02                               ` Alexey Dobriyan
2008-04-26  0:57                               ` Jay Cliburn
2008-04-28  6:42                                 ` Alexey Dobriyan
2008-05-04 21:15                                 ` Alexey Dobriyan
2008-05-05  0:31                                   ` Jay Cliburn
2008-05-05  0:34                                     ` Jay Cliburn
2008-05-06 16:02                                   ` Jay Cliburn
2008-05-09 19:51                                     ` Alexey Dobriyan
2008-05-09 18:56                                       ` Chris Snook
2008-05-09 20:07                                         ` Alexey Dobriyan
2008-05-09 19:38                                           ` Jay Cliburn [this message]
2008-05-10 19:31                                             ` [PATCH] " Alexey Dobriyan
2008-05-11  1:58                                               ` Jay Cliburn
2008-04-14  8:07 ` BUG at __dentry_open [Was: 2.6.25-rc8-mm2] Jiri Slaby
2008-04-15 17:00 ` 2.6.25-rc8-mm2: Observed problems: Not a detailed bug report Zan Lynx
2008-04-15 18:42   ` Andrew Morton
2008-04-15 20:12     ` Rafael J. Wysocki

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=20080509143854.7bc39ab7@osprey.hogchain.net \
    --to=jacliburn@bellsouth.net \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=csnook@redhat.com \
    --cc=jeff@garzik.org \
    --cc=kronos.it@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®