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:   Wed, 21 Feb 2018 15:39:26 +0300
From:   Andrey Ryabinin <aryabinin@...tuozzo.com>
To:     Matthew Wilcox <willy@...radead.org>,
        Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
Cc:     Dave Hansen <dave.hansen@...el.com>, linux-kernel@...r.kernel.org,
        Christoph Hellwig <hch@...radead.org>, linux-mm@...ck.org,
        Andy Lutomirski <luto@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        kasan-dev@...glegroups.com
Subject: Re: [PATCH 1/4] vmalloc: add vm_flags argument to internal
 __vmalloc_node()



On 02/21/2018 03:24 PM, Matthew Wilcox wrote:
> On Tue, Jan 23, 2018 at 01:55:22PM +0300, Konstantin Khlebnikov wrote:
>> This allows to set VM_USERMAP in vmalloc_user() and vmalloc_32_user()
>> directly at allocation and avoid find_vm_area() call.
> 
> While reviewing this patch, I came across this infelicity ...
> 
> have I understood correctly?
> 
> diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c
> index e13d911251e7..9060f80b4a41 100644
> --- a/mm/kasan/kasan.c
> +++ b/mm/kasan/kasan.c
> @@ -631,11 +631,10 @@ int kasan_module_alloc(void *addr, size_t size)
>  	ret = __vmalloc_node_range(shadow_size, 1, shadow_start,
>  			shadow_start + shadow_size,
>  			GFP_KERNEL | __GFP_ZERO,
> -			PAGE_KERNEL, VM_NO_GUARD, NUMA_NO_NODE,
> +			PAGE_KERNEL, VM_NO_GUARD | VM_KASAN, NUMA_NO_NODE,
>  			__builtin_return_address(0));
>  
>  	if (ret) {
> -		find_vm_area(addr)->flags |= VM_KASAN;

addr != ret
That's different vm areas.

>  		kmemleak_ignore(ret);
>  		return 0;
>  	}
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ