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] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 10 Dec 2011 12:02:39 -0800
From:	Andi Kleen <andi@...stfloor.org>
To:	t cheney <cdmalord@...il.com>
Cc:	linux-kernel@...r.kernel.org, viro@...iv.linux.org.uk,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 1/1] x86: Add process memory layout to coredump file

t cheney <cdmalord@...il.com> writes:

> This patch just add memory layout(same as /proc/pid/maps) to
> coredump file. The layout is appended to corenote segment with
> flag NT_MAPS=7.

Seems like a reasonable idea, but can you please share code with 
the proc implementation? 

It's a bit unusal to have ASCII in a coredump, but I suppose expressing
this in binary would be somewhat ugly.

> +	char *buf = notes->data;
> +	size_t core_limit = notes->datasz;
> +	gate_vma = get_gate_vma(current->mm);
> +

It seems a bit dubious to do this without locking even in a core dump.

> +	for (vma = first_vma(current, gate_vma); vma != NULL;
> +		vma = next_vma(vma, gate_vma)) {
> +		flags = vma->vm_flags;
> +		maps_size += len;
> +		if (file) {
> +			if (maps_size > core_limit)
> +				break;

You have a one-off bug here. Also below.

> +			DUMP_WRITE(buf, len, foffset);
> +		}


-Andi
-- 
ak@...ux.intel.com -- Speaking for myself only
--
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