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:   Mon, 29 Jul 2019 17:04:05 +0000
From:   Song Liu <songliubraving@...com>
To:     Oleg Nesterov <oleg@...hat.com>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Matthew Wilcox <matthew.wilcox@...cle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        "Steven Rostedt" <rostedt@...dmis.org>,
        Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
        William Kucharski <william.kucharski@...cle.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: + uprobe-use-original-page-when-all-uprobes-are-removed.patch
 added to -mm tree



> On Jul 29, 2019, at 8:05 AM, Oleg Nesterov <oleg@...hat.com> wrote:
> 
> I didn't see this version, so let me reply here.
> 
> On 07/26, Andrew Morton wrote:
>> 
>> +	/* try orig_page only for unregister and anonymous old_page */
>> +	if (!is_register && PageAnon(old_page)) {
> 
> Well, this is confusing... nothing really wrong, but we certainly do not
> want to install the new anonymous page if !is_register && !PageAnon(old).
> And in this case we do not even want to call __replace page().
> 
> OK, I won't insist, this should almost never happen, but again, please
> see https://lore.kernel.org/lkml/20190726084423.GA16112@redhat.com/

I see. Do you want me fold this patch with 2/4? 

> 
>> +		struct page *orig_page;
>> +		pgoff_t index;
>> +
>> +		index = vaddr_to_offset(vma, vaddr & PAGE_MASK) >> PAGE_SHIFT;
>> +		orig_page = find_get_page(vma->vm_file->f_inode->i_mapping,
>> +					  index);
>> +
>> +		if (orig_page) {
>> +			if (PageUptodate(orig_page) &&
>> +			    pages_identical(new_page, orig_page)) {
>> +				/* let go new_page */
>> +				put_page(new_page);
>> +				new_page = NULL;
>> +
>> +				/* dec_mm_counter for old_page */
>> +				dec_mm_counter(mm, MM_ANONPAGES);
> 
> this assumes that __replace_page() can't fail, but it can. I think you
> should move this into into __replace_page().

Good catch! Let me fix it. 

Hi Andrew,

Do you prefer a whole v10 (1/4 to 4/4) or just newer version of this 
one (2/4)?

Thanks,
Song 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ