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: <CAJd=RBAR6gy2=NFkEAOqH-K+YcUYQKZhsB9YAJi0-TvWFvEKMg@mail.gmail.com>
Date:	Fri, 14 Oct 2011 22:45:09 +0800
From:	Hillf Danton <dhillf@...il.com>
To:	Thanh-Lam NGUYEN <thanh-lam.nguyen@...atel-lucent.com>
Cc:	Alexander Viro <viro@...iv.linux.org.uk>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] binfmt_elf.c: core file shrinking

On Fri, Oct 14, 2011 at 4:52 PM, Thanh-Lam NGUYEN
<thanh-lam.nguyen@...atel-lucent.com> wrote:
> Sorry for upping the patch,
> as it is my first contribution I would like to know if there is any
> problem with it.
>
> Best regard
> Thanh lam NGUYEN
>
> On 11/10/2011 17:36, Thanh-Lam NGUYEN wrote:
>
>> The vma_shrink function looks for the 1st allocated and the last
>> allocated page. Only this part is dumped to the disk (the virual
>> start address and the size are dupdated to reflect the new dumped
>> information).
>>
>> Signed-off-by: Thanh Lam NGUYEN <thanh-lam.nguyen@...atel-lucent.com>
>> Signed-off-by: Benjamin ZORES <Benjamin.Zores@...atel-lucent.com>
>> ---
>>  linux/fs/binfmt_elf.c |   54
>> ++++++++++++++++++++++++++++++++++++++++++++++----

corrupted message?

>>  1 file changed, 55 insertions(+), 4 deletions(-)
>>
>> --- linux/fs/binfmt_elf.c
>> +++ linux/fs/binfmt_elf.c
>> @@ -1085,6 +1085,48 @@
>>   * Jeremy Fitzhardinge <jeremy@...oz.au>
>>   */
>>
>> +/*
>> + * Search for 1st and last allocated page from vma_start to vma_end.
>> + * Update vma_start and vma_end to reflect the result.
>> + */
>> +void vma_shrink(struct vm_area_struct *vma, unsigned long *vma_start,
>> +             unsigned long *vma_end)
>> +{
>> +     int allocated;
>> +     unsigned long start, addr, end;
>> +
>> +     allocated = 0;
>> +     start = end = *vma_start;
>> +     for (addr = *vma_start; _addr < *vma_end; addr += PAGE_SIZE) {
                                        -----^
                                        where is _addr from?

>> +             struct page *page;
>> +             if (get_user_pages(current, current->mm, addr, 1, 0, 1,
>> +                                &page, NULL) <= 0) {
>> +                     /* NO PAGE */
--
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