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]
Message-ID: <4DAF1DA7.9040705@redhat.com>
Date:	Wed, 20 Apr 2011 13:53:43 -0400
From:	Rik van Riel <riel@...hat.com>
To:	rwhitton@....org
CC:	linux-kernel@...r.kernel.org
Subject: Re: Background memory scrubbing

On 04/20/2011 01:05 PM, Robert Whitton wrote:
> On Wed 20/04/11  6:45 PM , Rik van Riel<riel@...hat.com>  wrote:
>> On 04/20/2011 03:58 AM, Robert Whitton wrote:
>>
>>> for each PFN from 256 to the highest valid PFN
>>> {
>>> if (pfn_valid(PFN))
>>> {
>>> page = pfn_to_page(PFN)
>>> va = kmap(page)
>>> atomic_scrub(va, PAGE_SIZE)
>>> kunmap(page)
>>> }
>>>
>>> sleep(for_a_while)
>>> }
>>
>> What exactly does atomic_scrub do?
>
> atomic_scrub is part of the edac subsystem see arch/x86/include/asm/edac.h. It simply does a locked add of zero to each DWORD in the specified range.

I can think of only a few ways in which that could cause a
kernel page fault.

One of the more obvious causes would be running into an
area of kernel memory that is mapped read-only.  Writing
to a page that is mapped read-only would cause a page
fault :)

Walking the page tables to check whether my guess is correct
should be possible in the current context.  Look at current->mm->pgd for 
the page directory and start walking from there.

Incidentally, the kernel mappings should be the same for any
process, so the above should hold true from any context.
--
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