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: <OFFBABC377.C12D8795-ON65257BFE.00151B4E-65257BFE.00154301@in.ibm.com>
Date:	Tue, 8 Oct 2013 09:22:46 +0530
From:	Janani Venkataraman1 <jananive@...ibm.com>
To:	Ryan Mallon <rmallon@...il.com>
Cc:	adobriyan@...il.com, akpm@...ux-foundation.org, amwang@...hat.com,
	ananth@...ux.vnet.ibm.com, andi@...stfloor.org,
	aravinda@...ux.vnet.ibm.com, avagin@...nvz.org,
	d.hatayama@...fujitsu.com, eparis@...hat.com, gorcunov@...nvz.org,
	hch@....de, james.hogan@...tec.com, jeremy.fitzhardinge@...rix.com,
	kosaki.motohiro@...fujitsu.com, linux-kernel@...r.kernel.org,
	mhiramat@...hat.com, oleg@...hat.com, rdunlap@...otime.net,
	roland@...k.frob.com, suzuki@...ux.vnet.ibm.com,
	tarundsk@...ux.vnet.ibm.com, tj@...nel.org,
	torvalds@...ux-foundation.org, vapier@...too.org,
	xemul@...allels.com
Subject: Re: [PATCH 02/19] Make vma_dump_size() generic





From:	Ryan Mallon <rmallon@...il.com>
To:	Janani Venkataraman1/India/IBM@...IN,
            linux-kernel@...r.kernel.org,
Cc:	amwang@...hat.com, rdunlap@...otime.net, andi@...stfloor.org,
            aravinda@...ux.vnet.ibm.com, hch@....de, mhiramat@...hat.com,
            jeremy.fitzhardinge@...rix.com, xemul@...allels.com,
            suzuki@...ux.vnet.ibm.com, kosaki.motohiro@...fujitsu.com,
            adobriyan@...il.com, tarundsk@...ux.vnet.ibm.com,
            vapier@...too.org, roland@...k.frob.com, tj@...nel.org,
            ananth@...ux.vnet.ibm.com, gorcunov@...nvz.org,
            avagin@...nvz.org, oleg@...hat.com, eparis@...hat.com,
            d.hatayama@...fujitsu.com, james.hogan@...tec.com,
            akpm@...ux-foundation.org, torvalds@...ux-foundation.org
Date:	10/08/2013 05:52 AM
Subject:	Re: [PATCH 02/19] Make vma_dump_size() generic



On 04/10/13 20:30, Janani Venkataraman wrote:
> From:Suzuki K. Poulose <suzuki@...ibm.com>
>
> vma_dump_size calculates the file size of a vma area in the core file. It
> assumes the vma belongs to the "current". Make it generic to work for any
task.
> This will be reused by application core dump infrastructure.
>
> Signed-off-by: Suzuki K. Poulose <suzuki@...ibm.com>
> ---

> -static unsigned long vma_dump_size(struct vm_area_struct *vma,
> +unsigned long vma_dump_size(struct task_struct *p, struct vm_area_struct
*vma,
>  		 		 		 		 		 unsigned long
mm_flags)
>  {
>  #define FILTER(type)    (mm_flags & (1UL << MMF_DUMP_##type))
> @@ -143,10 +143,18 @@ static unsigned long vma_dump_size(struct
vm_area_struct *vma,
>  		 		  * Switch to the user "segment" for get_user(),
>  		 		  * then put back what elf_core_dump() had in
place.
>  		 		  */
> -		 		 set_fs(USER_DS);
> - 		 		 if (unlikely(get_user(word, header)))
> - 		 		 		 word = 0;
> -		 		 set_fs(fs);
> +		 		 if (p->mm == current->mm) {
> +		 		 		 mm_segment_t fs = get_fs();

It looks like you missed the removal of the old:

		 mm_segment_t fs = get_fs();

above? Just below if (FILTER(ELF_HEADERS)).

Yes thats correct. I will remove it. Thanks for pointing it out.

Thanks
Janani

~Ryan



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