Re: Top kernel oopses/warnings for the week of May 30th 2008

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Arjan van de Ven <arjan@...>, Linux Kernel Mailing List <linux-kernel@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, Greg KH <greg@...>, Jeff Garzik <jeff@...>, Dave Jones <davej@...>
Date: Tuesday, June 10, 2008 - 8:42 am

On Mon, 9 Jun 2008, Ingo Molnar wrote:

Thanks for giving it a try.


Right, that would be with CONFIG_PREEMPT_VOLUNTARY.  Or in my case
with CONFIG_DEBUG_SPINLOCK_SLEEP, strnlen_user's might_sleep gives
BUG: sleeping function called from invalid context...

At first I thought it was just falling foul of our zeal for might_sleep.
But no, the warning is correct: the get_user(str) and strnlen_user(str)
can perfectly well fault, but my suggested patch lets them be called
with a kmap_atomic outstanding.

I doubt it would be cost-effective to kunmap_atomic for each little
string there.  I don't see a quick and effective way to fix it up.
I don't have the patience to go about adding get_user_inatomic and
strnlen_user_inatomic, there's more urgent things to be doing.

It would be nice to use a per-process kmap; or use an efficient
one-page mapping in the exec'ers userspace; or maybe just having
a kunmap_and_flush would help (to slow the cycling around pkmap
page table), though it would still involve the global spinlock.

Sorry, no quick and effective fix: please just drop the patch.

Thanks,
Hugh
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 12:39 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Sun Jun 1, 10:27 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 6:36 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Hugh Dickins, (Tue Jun 10, 8:42 am)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 6:00 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 6:34 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 5:49 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 6:17 pm)