public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [3.10rc6] /proc/dri/0/vma broken on nouveau.
@ 2013-06-18  1:36 Dave Jones
  2013-06-18  1:49 ` David Airlie
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Jones @ 2013-06-18  1:36 UTC (permalink / raw)
  To: Linux Kernel; +Cc: airlied, bskeggs

Reading /proc/dri/0/vma causes bad things to happen on a box with nouveau loaded.
(Note, no X running on that box)

Trace below shows trinity, but I can reproduce it with just cat /proc/dri/0/vma

------------[ cut here ]------------
kernel BUG at arch/x86/mm/physaddr.c:79!
invalid opcode: 0000 [#1] PREEMPT SMP 
Modules linked in: tun cmtp kernelcapi rfcomm l2tp_ppp l2tp_netlink l2tp_core ipt_ULOG bnep can_bcm scsi_transport_iscsi nfnetlink rds atm bluetooth can_raw appletalk netrom pppoe af_key ipx rose p8023 pppox p8022 psnap ppp_generic ax25 llc slhc af_802154 nfc can rfkill irda crc_ccitt phonet nfsv3 nfs_acl nfs lockd sunrpc fscache nouveau video mxm_wmi wmi i2c_algo_bit ttm drm_kms_helper drm i5000_edac edac_core tg3 iTCO_wdt iTCO_vendor_support lpc_ich ppdev pcspkr microcode mfd_core i2c_i801 i2c_core dcdbas serio_raw ptp i5k_amb pps_core shpchp parport_pc floppy parport xfs libcrc32c raid0
CPU: 3 PID: 26586 Comm: trinity-child3 Tainted: G        W    3.10.0-rc6+ #1 
Hardware name: Dell Inc.                 Precision WorkStation 490    /0DT031, BIOS A08 04/25/2008
task: f12041a0 ti: eace4000 task.ti: eace4000
EIP: 0060:[<c102e2a6>] EFLAGS: 00010206 CPU: 3
EIP is at __phys_addr+0x72/0x76
EAX: 37bfe000 EBX: 37bfe000 ECX: 0000000c EDX: 37bfe000
ESI: eacc7870 EDI: eacc7870 EBP: eace5e98 ESP: eace5e94
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
CR0: 80050033 CR2: 0a24116c CR3: 2cc22000 CR4: 000007f0
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400
Stack:
 ee11ce30 eace5efc f868c42f c106a0ff 80070007 e6266700 00000282 eace5efc
 c15a6ea6 000000d0 f2403680 f2403680 eace5efc c115054d f2d40e50 ee11ce68
 f12041a0 eacc7870 000010b0 eace4000 00001000 c11841cf 000000d0 eacc7870
Call Trace:
 [<f868c42f>] drm_vma_info+0x39/0x26e [drm]
 [<c106a0ff>] ? __might_sleep+0x19/0x1ac
 [<c15a6ea6>] ? mutex_lock_nested+0x286/0x39c
 [<c115054d>] ? kmem_cache_alloc_trace+0x282/0x2cc
 [<c11841cf>] ? seq_read+0x24d/0x438
 [<c1184068>] seq_read+0xe6/0x438
 [<c1183f82>] ? traverse.isra.6+0x256/0x256
 [<c11b9ff6>] proc_reg_read+0x48/0x71
 [<c11b9fae>] ? proc_reg_write+0x71/0x71
 [<c11644c8>] vfs_read+0x80/0x148
 [<c1164b5f>] SyS_read+0x49/0x7d
 [<c15b19c1>] sysenter_do_call+0x12/0x32
Code: 27 11 c2 8d 91 00 00 80 00 39 d0 72 cb 8b 0d 2c 27 81 c1 8d 91 00 00 c1 ff 81 e2 00 00 e0 ff 81 ea 00 20 00 00 39 d0 73 af 0f 0b <0f> 0b 0f 0b 55 89 e5 53 66 66 66 66 90 89 c2 31 c0 81 fa ff ff


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [3.10rc6] /proc/dri/0/vma broken on nouveau.
  2013-06-18  1:36 [3.10rc6] /proc/dri/0/vma broken on nouveau Dave Jones
@ 2013-06-18  1:49 ` David Airlie
  2013-06-18  1:58   ` Dave Jones
  2013-07-30  0:53   ` Dave Jones
  0 siblings, 2 replies; 8+ messages in thread
From: David Airlie @ 2013-06-18  1:49 UTC (permalink / raw)
  To: Dave Jones; +Cc: Linux Kernel, bskeggs, dri-devel

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


> Reading /proc/dri/0/vma causes bad things to happen on a box with nouveau
> loaded.
> (Note, no X running on that box)
> 
> Trace below shows trinity, but I can reproduce it with just cat
> /proc/dri/0/vma

How about this, lets just rip it all out.

Dave.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-drm-remove-vma-debug-code.patch --]
[-- Type: text/x-patch; name=0001-drm-remove-vma-debug-code.patch, Size: 4047 bytes --]

From 54f9605737437272f440bbc6cc4adf805334884b Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Tue, 18 Jun 2013 11:38:10 +1000
Subject: [PATCH] drm: remove vma debug code

This lists vma in /proc and is both crash prone and quite possible horribly
racy. Just nuke it I don't think I've used it in years and years.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/drm_debugfs.c |  3 ---
 drivers/gpu/drm/drm_info.c    | 54 -------------------------------------------
 drivers/gpu/drm/drm_proc.c    |  3 ---
 include/drm/drmP.h            |  4 ----
 4 files changed, 64 deletions(-)

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index a05087c..595c8c1 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -48,9 +48,6 @@ static struct drm_info_list drm_debugfs_list[] = {
 	{"clients", drm_clients_info, 0},
 	{"bufs", drm_bufs_info, 0},
 	{"gem_names", drm_gem_name_info, DRIVER_GEM},
-#if DRM_DEBUG_CODE
-	{"vma", drm_vma_info, 0},
-#endif
 };
 #define DRM_DEBUGFS_ENTRIES ARRAY_SIZE(drm_debugfs_list)
 
diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c
index d4b20ce..0d25f8d 100644
--- a/drivers/gpu/drm/drm_info.c
+++ b/drivers/gpu/drm/drm_info.c
@@ -222,57 +222,3 @@ int drm_gem_name_info(struct seq_file *m, void *data)
 	return 0;
 }
 
-#if DRM_DEBUG_CODE
-
-int drm_vma_info(struct seq_file *m, void *data)
-{
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
-	struct drm_device *dev = node->minor->dev;
-	struct drm_vma_entry *pt;
-	struct vm_area_struct *vma;
-#if defined(__i386__)
-	unsigned int pgprot;
-#endif
-
-	mutex_lock(&dev->struct_mutex);
-	seq_printf(m, "vma use count: %d, high_memory = %pK, 0x%pK\n",
-		   atomic_read(&dev->vma_count),
-		   high_memory, (void *)(unsigned long)virt_to_phys(high_memory));
-
-	list_for_each_entry(pt, &dev->vmalist, head) {
-		vma = pt->vma;
-		if (!vma)
-			continue;
-		seq_printf(m,
-			   "\n%5d 0x%pK-0x%pK %c%c%c%c%c%c 0x%08lx000",
-			   pt->pid,
-			   (void *)vma->vm_start, (void *)vma->vm_end,
-			   vma->vm_flags & VM_READ ? 'r' : '-',
-			   vma->vm_flags & VM_WRITE ? 'w' : '-',
-			   vma->vm_flags & VM_EXEC ? 'x' : '-',
-			   vma->vm_flags & VM_MAYSHARE ? 's' : 'p',
-			   vma->vm_flags & VM_LOCKED ? 'l' : '-',
-			   vma->vm_flags & VM_IO ? 'i' : '-',
-			   vma->vm_pgoff);
-
-#if defined(__i386__)
-		pgprot = pgprot_val(vma->vm_page_prot);
-		seq_printf(m, " %c%c%c%c%c%c%c%c%c",
-			   pgprot & _PAGE_PRESENT ? 'p' : '-',
-			   pgprot & _PAGE_RW ? 'w' : 'r',
-			   pgprot & _PAGE_USER ? 'u' : 's',
-			   pgprot & _PAGE_PWT ? 't' : 'b',
-			   pgprot & _PAGE_PCD ? 'u' : 'c',
-			   pgprot & _PAGE_ACCESSED ? 'a' : '-',
-			   pgprot & _PAGE_DIRTY ? 'd' : '-',
-			   pgprot & _PAGE_PSE ? 'm' : 'k',
-			   pgprot & _PAGE_GLOBAL ? 'g' : 'l');
-#endif
-		seq_printf(m, "\n");
-	}
-	mutex_unlock(&dev->struct_mutex);
-	return 0;
-}
-
-#endif
-
diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c
index d7f2324..92e9abd 100644
--- a/drivers/gpu/drm/drm_proc.c
+++ b/drivers/gpu/drm/drm_proc.c
@@ -55,9 +55,6 @@ static const struct drm_info_list drm_proc_list[] = {
 	{"clients", drm_clients_info, 0},
 	{"bufs", drm_bufs_info, 0},
 	{"gem_names", drm_gem_name_info, DRIVER_GEM},
-#if DRM_DEBUG_CODE
-	{"vma", drm_vma_info, 0},
-#endif
 };
 #define DRM_PROC_ENTRIES ARRAY_SIZE(drm_proc_list)
 
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 63d17ee..849523d 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1600,10 +1600,6 @@ int drm_prime_add_dma_buf(struct drm_device *dev, struct drm_gem_object *obj);
 int drm_prime_lookup_obj(struct drm_device *dev, struct dma_buf *buf,
 			 struct drm_gem_object **obj);
 
-#if DRM_DEBUG_CODE
-extern int drm_vma_info(struct seq_file *m, void *data);
-#endif
-
 				/* Scatter Gather Support (drm_scatter.h) */
 extern void drm_sg_cleanup(struct drm_sg_mem * entry);
 extern int drm_sg_alloc_ioctl(struct drm_device *dev, void *data,
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [3.10rc6] /proc/dri/0/vma broken on nouveau.
  2013-06-18  1:49 ` David Airlie
@ 2013-06-18  1:58   ` Dave Jones
  2013-07-30  0:53   ` Dave Jones
  1 sibling, 0 replies; 8+ messages in thread
From: Dave Jones @ 2013-06-18  1:58 UTC (permalink / raw)
  To: David Airlie; +Cc: Linux Kernel, bskeggs, dri-devel

On Mon, Jun 17, 2013 at 09:49:27PM -0400, David Airlie wrote:
 > 
 > > Reading /proc/dri/0/vma causes bad things to happen on a box with nouveau
 > > loaded.
 > > (Note, no X running on that box)
 > > 
 > > Trace below shows trinity, but I can reproduce it with just cat
 > > /proc/dri/0/vma
 > 
 > How about this, lets just rip it all out.

That's one way to deal with it :)
If no programs use it, then yeah, sure, why not.

	Dave

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [3.10rc6] /proc/dri/0/vma broken on nouveau.
  2013-06-18  1:49 ` David Airlie
  2013-06-18  1:58   ` Dave Jones
@ 2013-07-30  0:53   ` Dave Jones
  2013-08-05  7:40     ` Daniel Vetter
  1 sibling, 1 reply; 8+ messages in thread
From: Dave Jones @ 2013-07-30  0:53 UTC (permalink / raw)
  To: David Airlie; +Cc: Linux Kernel, bskeggs, dri-devel

On Mon, Jun 17, 2013 at 09:49:27PM -0400, David Airlie wrote:
 > 
 > > Reading /proc/dri/0/vma causes bad things to happen on a box with nouveau
 > > loaded.
 > > (Note, no X running on that box)
 > > 
 > > Trace below shows trinity, but I can reproduce it with just cat
 > > /proc/dri/0/vma
 > 
 > How about this, lets just rip it all out.

No-one objected, and this is still around in 3.11-rc3 in the same
easily oopsable state.. I vote we kill it with fire.

	Dave

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [3.10rc6] /proc/dri/0/vma broken on nouveau.
  2013-07-30  0:53   ` Dave Jones
@ 2013-08-05  7:40     ` Daniel Vetter
  2013-08-28 20:30       ` Dave Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Vetter @ 2013-08-05  7:40 UTC (permalink / raw)
  To: Dave Jones, David Airlie, Linux Kernel, bskeggs, dri-devel

On Mon, Jul 29, 2013 at 08:53:35PM -0400, Dave Jones wrote:
> On Mon, Jun 17, 2013 at 09:49:27PM -0400, David Airlie wrote:
>  > 
>  > > Reading /proc/dri/0/vma causes bad things to happen on a box with nouveau
>  > > loaded.
>  > > (Note, no X running on that box)
>  > > 
>  > > Trace below shows trinity, but I can reproduce it with just cat
>  > > /proc/dri/0/vma
>  > 
>  > How about this, lets just rip it all out.
> 
> No-one objected, and this is still around in 3.11-rc3 in the same
> easily oopsable state.. I vote we kill it with fire.

Can we make it burn brighter while at it?

http://cgit.freedesktop.org/~danvet/drm/commit/?h=for-dvdhrm&id=151591c2828e18fde1eb8447874704f3422168b0

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [3.10rc6] /proc/dri/0/vma broken on nouveau.
  2013-08-05  7:40     ` Daniel Vetter
@ 2013-08-28 20:30       ` Dave Jones
  2013-08-28 20:35         ` Dave Airlie
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Jones @ 2013-08-28 20:30 UTC (permalink / raw)
  To: David Airlie, Linux Kernel, bskeggs, dri-devel

On Mon, Aug 05, 2013 at 09:40:33AM +0200, Daniel Vetter wrote:
 > On Mon, Jul 29, 2013 at 08:53:35PM -0400, Dave Jones wrote:
 > > On Mon, Jun 17, 2013 at 09:49:27PM -0400, David Airlie wrote:
 > >  > 
 > >  > > Reading /proc/dri/0/vma causes bad things to happen on a box with nouveau
 > >  > > loaded.
 > >  > > (Note, no X running on that box)
 > >  > > 
 > >  > > Trace below shows trinity, but I can reproduce it with just cat
 > >  > > /proc/dri/0/vma
 > >  > 
 > >  > How about this, lets just rip it all out.
 > > 
 > > No-one objected, and this is still around in 3.11-rc3 in the same
 > > easily oopsable state.. I vote we kill it with fire.
 > 
 > Can we make it burn brighter while at it?
 > 
 > http://cgit.freedesktop.org/~danvet/drm/commit/?h=for-dvdhrm&id=151591c2828e18fde1eb8447874704f3422168b0

This went kinda quiet, what's the plan here ?

	Dave


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [3.10rc6] /proc/dri/0/vma broken on nouveau.
  2013-08-28 20:30       ` Dave Jones
@ 2013-08-28 20:35         ` Dave Airlie
  2013-08-28 20:39           ` Dave Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Airlie @ 2013-08-28 20:35 UTC (permalink / raw)
  To: Dave Jones, David Airlie, Linux Kernel, Ben Skeggs, dri-devel

On Thu, Aug 29, 2013 at 6:30 AM, Dave Jones <davej@redhat.com> wrote:
> On Mon, Aug 05, 2013 at 09:40:33AM +0200, Daniel Vetter wrote:
>  > On Mon, Jul 29, 2013 at 08:53:35PM -0400, Dave Jones wrote:
>  > > On Mon, Jun 17, 2013 at 09:49:27PM -0400, David Airlie wrote:
>  > >  >
>  > >  > > Reading /proc/dri/0/vma causes bad things to happen on a box with nouveau
>  > >  > > loaded.
>  > >  > > (Note, no X running on that box)
>  > >  > >
>  > >  > > Trace below shows trinity, but I can reproduce it with just cat
>  > >  > > /proc/dri/0/vma
>  > >  >
>  > >  > How about this, lets just rip it all out.
>  > >
>  > > No-one objected, and this is still around in 3.11-rc3 in the same
>  > > easily oopsable state.. I vote we kill it with fire.
>  >
>  > Can we make it burn brighter while at it?
>  >
>  > http://cgit.freedesktop.org/~danvet/drm/commit/?h=for-dvdhrm&id=151591c2828e18fde1eb8447874704f3422168b0
>
> This went kinda quiet, what's the plan here ?

We nuked it from orbit in drm-next.

Dave.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [3.10rc6] /proc/dri/0/vma broken on nouveau.
  2013-08-28 20:35         ` Dave Airlie
@ 2013-08-28 20:39           ` Dave Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Jones @ 2013-08-28 20:39 UTC (permalink / raw)
  To: Dave Airlie; +Cc: David Airlie, Linux Kernel, Ben Skeggs, dri-devel

On Thu, Aug 29, 2013 at 06:35:22AM +1000, Dave Airlie wrote:
 > On Thu, Aug 29, 2013 at 6:30 AM, Dave Jones <davej@redhat.com> wrote:
 > > On Mon, Aug 05, 2013 at 09:40:33AM +0200, Daniel Vetter wrote:
 > >  > On Mon, Jul 29, 2013 at 08:53:35PM -0400, Dave Jones wrote:
 > >  > > On Mon, Jun 17, 2013 at 09:49:27PM -0400, David Airlie wrote:
 > >  > >  >
 > >  > >  > > Reading /proc/dri/0/vma causes bad things to happen on a box with nouveau
 > >  > >  > > loaded.
 > >  > >  > > (Note, no X running on that box)
 > >  > >  > >
 > >  > >  > > Trace below shows trinity, but I can reproduce it with just cat
 > >  > >  > > /proc/dri/0/vma
 > >  > >  >
 > >  > >  > How about this, lets just rip it all out.
 > >  > >
 > >  > > No-one objected, and this is still around in 3.11-rc3 in the same
 > >  > > easily oopsable state.. I vote we kill it with fire.
 > >  >
 > >  > Can we make it burn brighter while at it?
 > >  >
 > >  > http://cgit.freedesktop.org/~danvet/drm/commit/?h=for-dvdhrm&id=151591c2828e18fde1eb8447874704f3422168b0
 > >
 > > This went kinda quiet, what's the plan here ?
 > 
 > We nuked it from orbit in drm-next.

Awesome. Looks like that missed a Cc: -stable tag btw.

	Dave


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-08-28 20:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18  1:36 [3.10rc6] /proc/dri/0/vma broken on nouveau Dave Jones
2013-06-18  1:49 ` David Airlie
2013-06-18  1:58   ` Dave Jones
2013-07-30  0:53   ` Dave Jones
2013-08-05  7:40     ` Daniel Vetter
2013-08-28 20:30       ` Dave Jones
2013-08-28 20:35         ` Dave Airlie
2013-08-28 20:39           ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox