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:	Thu, 20 Nov 2008 18:44:45 +0900
From:	"Ryota OZAKI" <ozaki.ryota@...il.com>
To:	"Izik Eidus" <ieidus@...hat.com>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, kvm@...r.kernel.org, aarcange@...hat.com,
	chrisw@...hat.com, avi@...hat.com, dlaor@...hat.com,
	kamezawa.hiroyu@...fujitsu.com, cl@...ux-foundation.org,
	corbet@....net
Subject: Re: [PATCH 0/4] ksm - dynamic page sharing driver for linux v2

2008/11/20 Izik Eidus <ieidus@...hat.com>:
> ציטוט Izik Eidus:
>>
>> ציטוט Ryota OZAKI:
>>>
>>> Hi Izik,
>>>
>>> I've tried your patch set, but ksm doesn't work in my machine.
>>>
>>> I compiled linux patched with the four patches and configured with KSM
>>> and KVM enabled. After boot with the linux, I run two VMs running linux
>>> using QEMU with a patch in your mail and started KSM scanner with your
>>> script, then the host linux caused panic with the following oops.
>>>
>>
>> Yes you are right, we are missing pte_unmap(pte); in get_pte()!
>> that will effect just 32bits with highmem so this why you see it
>> thanks for the reporting, i will fix it for v3
>>
>> below patch should fix it (i cant test it now, will test it for v3)
>>
>> can you report if it fix your problem? thanks
>>
> Thinking about what i just did, it is wrong,
> this patch is the right one (still wasnt tested), but if you are going to
> apply something then use this one.

Great! Applied the 2nd patch, ksm works with both HIGHMEM enabled and disabled.

Thanks for your quick response,
  ozaki-r

>
> thanks
>
> diff --git a/mm/ksm.c b/mm/ksm.c
> index 707be52..c842c29 100644
> --- a/mm/ksm.c
> +++ b/mm/ksm.c
> @@ -569,14 +569,16 @@ out:
>  static int is_present_pte(struct mm_struct *mm, unsigned long addr)
>  {
>        pte_t *ptep;
> +       int r;
>
>        ptep = get_pte(mm, addr);
>        if (!ptep)
>                return 0;
>
> -       if (pte_present(*ptep))
> -               return 1;
> -       return 0;
> +       r = pte_present(*ptep);
> +       pte_unmap(ptep);
> +
> +       return r;
>  }
>
>  #define PAGEHASH_LEN 128
> @@ -669,6 +671,7 @@ static int try_to_merge_one_page(struct mm_struct *mm,
>        if (!orig_ptep)
>                goto out_unlock;
>        orig_pte = *orig_ptep;
> +       pte_unmap(orig_ptep);
>        if (!pte_present(orig_pte))
>                goto out_unlock;
>        if (page_to_pfn(oldpage) != pte_pfn(orig_pte))
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ