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] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0808161033350.3324@nehalem.linux-foundation.org>
Date:	Sat, 16 Aug 2008 10:44:29 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Ulrich Drepper <drepper@...hat.com>
cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] VMA comment fixes



On Sat, 16 Aug 2008, Ulrich Drepper wrote:
>
> These seem to be two tiny problems in comments related to VMA data
> structures.  Am I correct?

No.

> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> -	unsigned long vm_flags;		/* Flags, listed below. */
> +	unsigned long vm_flags;		/* Flags, see vmalloc.h. */

It's "see mm.h" for the primary one. The vmalloc.h ones are only used for 
vmalloc'ed areas, no for regular _user_ mappings.

That said, I agree that it's damn confusing that we have two different 
sets of flags, both called VM_xyz. We use the "vm_area_struct" for the 
normal user virtual mappings (mmap) tracking, and we use the "vm_struct" 
for the kernel virtual mappings (vmalloc).

Both have a flags field, and both use VM_xyz for their field names.

> diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
> -/* bits in vm_struct->flags */
> +/* bits in vm_area_struct->flags */

See above. The vmalloc ones really are in "vm_struct->flags".

The confusion comes at least partly because

 - I think historically we _used_ to use vm_area_struct for both, if I 
   recall correctly

and because

 - we actually have some mixing of the two (for example 
   "remap_vmalloc_range()" will remap a vmalloc mapping _into_ a user 
   mapping, so it takes a _user_ mapping (a "vm_area_struct") _and_ a 
   vmalloc address (internally using a "struct vm_struct") and copies from 
   one to the other.

it might be a good idea to call the vmalloc flags somethign else than 
VM_xyz. But I'm not sure it's worth the churn. I don't remember there 
having ever been any _actual_ confusion by the VM people who have to deal 
with both (because you really very seldom can confuse them).

		Linus
--
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