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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 22 Oct 2008 02:18:26 +0900
From:	"KOSAKI Motohiro" <kosaki.motohiro@...fujitsu.com>
To:	"Heiko Carstens" <heiko.carstens@...ibm.com>
Cc:	"Nick Piggin" <npiggin@...e.de>, linux-kernel@...r.kernel.org,
	"Hugh Dickins" <hugh@...itas.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Linus Torvalds" <torvalds@...ux-foundation.org>,
	"Rik van Riel" <riel@...hat.com>,
	"Lee Schermerhorn" <lee.schermerhorn@...com>, linux-mm@...ck.org
Subject: Re: mlock: mlocked pages are unevictable

2008/10/22 KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>:
> Hi
>
>> I think the following part of your patch:
>>
>>> diff --git a/mm/swap.c b/mm/swap.c
>>> index fee6b97..bc58c13 100644
>>> --- a/mm/swap.c
>>> +++ b/mm/swap.c
>>> @@ -278,7 +278,7 @@ void lru_add_drain(void)
>>>       put_cpu();
>>>  }
>>>
>>> -#ifdef CONFIG_NUMA
>>> +#if defined(CONFIG_NUMA) || defined(CONFIG_UNEVICTABLE_LRU)
>>>  static void lru_add_drain_per_cpu(struct work_struct *dummy)
>>>  {
>>>       lru_add_drain();
>>
>> causes this (allyesconfig on s390):
>
> hm,
>
> I don't think so.
>
> Actually, this patch has
>   mmap_sem -> lru_add_drain_all() dependency.
>
> but its dependency already exist in another place.
> example,
>
>  sys_move_pages()
>      do_move_pages()  <- down_read(mmap_sem)
>          migrate_prep()
>               lru_add_drain_all()
>
> Thought?

ok. maybe I understand this issue.

This bug is caused by folloing dependencys.

some VM place has
      mmap_sem -> kevent_wq

net/core/dev.c::dev_ioctl()  has
     rtnl_lock  ->  mmap_sem        (*) almost ioctl has
copy_from_user() and it cause page fault.

linkwatch_event has
    kevent_wq -> rtnl_lock


So, I think VM subsystem shouldn't use kevent_wq because many driver
use ioctl and work queue combination.
then drivers fixing isn't easy.

I'll make the patch soon.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ