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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+5g0SKx-xGs1RiyDGYsCKMCzQN3QoEt+n=+Yiguk5iZs=0=oA@mail.gmail.com>
Date:	Sun, 22 Sep 2013 21:23:09 -0300
From:	Felipe Pena <felipensp@...il.com>
To:	Johannes Weiner <hannes@...xchg.org>
Cc:	"James E.J. Bottomley" <jejb@...isc-linux.org>,
	linux-parisc@...r.kernel.org, Michal Hocko <mhocko@...e.cz>,
	linux-kernel@...r.kernel.org,
	Kautuk Consul <consul.kautuk@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Helge Deller <deller@....de>
Subject: Re: [PATCH 1/1] arch/parisc: mm: fix uninitialized variable usage

Hello Johannes,

On Sun, Sep 22, 2013 at 7:58 PM, Johannes Weiner <hannes@...xchg.org> wrote:
> Hello Felipe,
>
> On Sun, Sep 22, 2013 at 03:17:46PM -0300, Felipe Pena wrote:
>> The FAULT_FLAG_WRITE flag has been set based on uninitialized variable
>
> Oops, you are right.
>
>> Signed-off-by: Felipe Pena <felipensp@...il.com>
>> ---
>>  arch/parisc/mm/fault.c |    5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
>> index d10d27a..6b38026 100644
>> --- a/arch/parisc/mm/fault.c
>> +++ b/arch/parisc/mm/fault.c
>> @@ -182,8 +182,6 @@ void do_page_fault(struct pt_regs *regs, unsigned long code,
>>
>>       if (user_mode(regs))
>>               flags |= FAULT_FLAG_USER;
>> -     if (acc_type & VM_WRITE)
>> -             flags |= FAULT_FLAG_WRITE;
>>  retry:
>>       down_read(&mm->mmap_sem);
>>       vma = find_vma_prev(mm, address, &prev_vma);
>> @@ -201,6 +199,9 @@ good_area:
>>       if ((vma->vm_flags & acc_type) != acc_type)
>>               goto bad_area;
>>
>> +     if (acc_type & VM_WRITE)
>> +             flags |= FAULT_FLAG_WRITE;
>
> Can acc_type actually change between between the first round and a
> retry?  Otherwise, it might make sense to pull this up and place it
> next to the flag initialization instead of pulling one flag down.

>From what I've analyzed, this make sense. I'll make the suggested
changes and send another patch.

Thanks.

-- 
Regards,
Felipe Pena
--
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