lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <56AFC1F1.5080507@hurleysoftware.com>
Date:	Mon, 1 Feb 2016 12:37:05 -0800
From:	Peter Hurley <peter@...leysoftware.com>
To:	Archit Taneja <architt@...eaurora.org>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Ben Skeggs <bskeggs@...hat.com>
Cc:	David Airlie <airlied@...ux.ie>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	Linux kernel <linux-kernel@...r.kernel.org>
Subject: BUG caused by "Use new drm_fb_helper functions" series

Hi Archit,

Just booting 4.4-rc5+, I got this splat [1]
At first glance, this appears to be a simple fix.

However, I'm concerned that fbcon functions, which may be called with
interrupts disabled, are now hooked up to fbdev functions which may assume
interrupts are not disabled (as is the case with cfb_imageblit()).

For example, in the splat below, it's a simple fix to make the splat go
away with GFP_ATOMIC allocation. However, the following fence wait is _never_
going to trigger with interrupts disabled on UP.

FWIW, I've been running almost exclusively debug kernel builds so I'm not
sure why this hasn't triggered many times before, but it hasn't.

Regards,
Peter Hurley


[1] BUG splat

[   37.438494] BUG: sleeping function called from invalid context at /home/peter/src/kernels/mainline/mm/slub.c:1287
[   37.438495] in_atomic(): 1, irqs_disabled(): 1, pid: 2276, name: auditd
[   37.438497] 1 lock held by auditd/2276:
[   37.438507]  #0:  (audit_cmd_mutex){+.+.+.}, at: [<ffffffff8113a63f>] audit_receive+0x1f/0xa0
[   37.438507] irq event stamp: 1689
[   37.438511] hardirqs last  enabled at (1689): [<ffffffff810e9a96>] vprintk_emit+0x236/0x620
[   37.438513] hardirqs last disabled at (1688): [<ffffffff810e9934>] vprintk_emit+0xd4/0x620
[   37.438518] softirqs last  enabled at (1652): [<ffffffff81753898>] netlink_poll+0x138/0x1c0
[   37.438520] softirqs last disabled at (1650): [<ffffffff81753857>] netlink_poll+0xf7/0x1c0
[   37.438522] CPU: 7 PID: 2276 Comm: auditd Not tainted 4.4.0-rc5+wip-xeon+debug #rc5+wip
[   37.438523] Hardware name: Dell Inc. Precision WorkStation T5400  /0RW203, BIOS A11 04/30/2012
[   37.438526]  ffffffff81ce5cc8 ffff8802a87c3590 ffffffff813fb6c5 ffff8802ac768000
[   37.438528]  ffff8802a87c35b8 ffffffff810a6fb9 ffffffff81ce5cc8 0000000000000507
[   37.438530]  0000000000000000 ffff8802a87c35e0 ffffffff810a70b9 00000000024080c0
[   37.438531] Call Trace:
[   37.438535]  [<ffffffff813fb6c5>] dump_stack+0x4e/0x79
[   37.438538]  [<ffffffff810a6fb9>] ___might_sleep+0x149/0x200
[   37.438540]  [<ffffffff810a70b9>] __might_sleep+0x49/0x80
[   37.438544]  [<ffffffff81202dfd>] kmem_cache_alloc_trace+0x20d/0x2e0
[   37.438600]  [<ffffffffa0272e9b>] ? nouveau_fence_new+0x3b/0x90 [nouveau]
[   37.438624]  [<ffffffffa0272e9b>] nouveau_fence_new+0x3b/0x90 [nouveau]
[   37.438649]  [<ffffffffa02707b2>] nouveau_channel_idle+0x42/0xb0 [nouveau]
[   37.438673]  [<ffffffffa026bb3f>] nouveau_fbcon_sync+0x7f/0xb0 [nouveau]
[   37.438677]  [<ffffffff8148998a>] cfb_imageblit+0x9a/0x4d0
[   37.438681]  [<ffffffff810d22ef>] ? trace_hardirqs_off_caller+0x1f/0xc0
[   37.438693]  [<ffffffffa013d30e>] drm_fb_helper_cfb_imageblit+0xe/0x10 [drm_kms_helper]
[   37.438717]  [<ffffffffa026bbc1>] nouveau_fbcon_imageblit+0x51/0xd0 [nouveau]
[   37.438719]  [<ffffffff8147c02c>] bit_putcs+0x2dc/0x530
[   37.438721]  [<ffffffff810d239d>] ? trace_hardirqs_off+0xd/0x10
[   37.438725]  [<ffffffff81476144>] ? get_color.isra.15+0x34/0x130
[   37.438727]  [<ffffffff81477278>] fbcon_putcs+0x128/0x160
[   37.438728]  [<ffffffff8147bd50>] ? bit_cursor+0x5e0/0x5e0
[   37.438730]  [<ffffffff8147756b>] fbcon_redraw.isra.25+0x16b/0x1d0
[   37.438731]  [<ffffffff8147894a>] fbcon_scroll+0x1ea/0xce0
[   37.438734]  [<ffffffff815112ca>] scrup+0x14a/0x160
[   37.438736]  [<ffffffff81511360>] lf+0x80/0x90
[   37.438737]  [<ffffffff81511617>] vt_console_print+0x2a7/0x3e0
[   37.438739]  [<ffffffff810e89c4>] call_console_drivers.constprop.24+0x144/0x1d0
[   37.438741]  [<ffffffff810e9783>] console_unlock+0x463/0x540
[   37.438742]  [<ffffffff810e9bba>] vprintk_emit+0x35a/0x620
[   37.438744]  [<ffffffff810e9fd9>] vprintk_default+0x29/0x40
[   37.438748]  [<ffffffff8119f71a>] printk+0x4d/0x4f
[   37.438750]  [<ffffffff81137ad2>] audit_printk_skb+0x62/0x70
[   37.438751]  [<ffffffff81137e84>] audit_log_end+0x1d4/0x2d0
[   37.438752]  [<ffffffff81137ce0>] ? audit_log_end+0x30/0x2d0
[   37.438754]  [<ffffffff81139059>] audit_log_config_change+0x89/0xa0
[   37.438756]  [<ffffffff8113a4ca>] audit_receive_msg+0xa5a/0xbb0
[   37.438759]  [<ffffffff818481bd>] ? mutex_lock_nested+0x2ed/0x450
[   37.438761]  [<ffffffff8113a63f>] ? audit_receive+0x1f/0xa0
[   37.438762]  [<ffffffff8113a63f>] ? audit_receive+0x1f/0xa0
[   37.438764]  [<ffffffff8113a672>] audit_receive+0x52/0xa0
[   37.438766]  [<ffffffff81755652>] netlink_unicast+0xf2/0x1c0
[   37.438767]  [<ffffffff81755b07>] netlink_sendmsg+0x3e7/0x620
[   37.438771]  [<ffffffff816ff4e8>] sock_sendmsg+0x38/0x50
[   37.438772]  [<ffffffff816ff946>] SYSC_sendto+0xf6/0x170
[   37.438775]  [<ffffffff8119db8d>] ? context_tracking_exit+0x1d/0x30
[   37.438778]  [<ffffffff8100367f>] ? enter_from_user_mode+0x1f/0x50
[   37.438780]  [<ffffffff8100377b>] ? syscall_trace_enter_phase1+0xcb/0x130
[   37.438781]  [<ffffffff81003017>] ? trace_hardirqs_on_thunk+0x17/0x19
[   37.438784]  [<ffffffff8170079e>] SyS_sendto+0xe/0x10
[   37.438786]  [<ffffffff8184be36>] entry_SYSCALL_64_fastpath+0x16/0x7a

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ