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: <20131108093455.GA1230@krava.brq.redhat.com>
Date:	Fri, 8 Nov 2013 10:34:55 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	David Ahern <dsahern@...il.com>
Cc:	acme@...stprotocols.net, linux-kernel@...r.kernel.org,
	mingo@...nel.org, Frederic Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Mike Galbraith <efault@....de>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 2/2] perf record: mmap output file - v4

On Thu, Nov 07, 2013 at 09:23:25PM -0700, David Ahern wrote:

SNIP

>  
> +static void mmap_output_fini(struct perf_record *rec)
> +{
> +	off_t len;
> +	int fd;
> +
> +	if (!rec->mmap.use)
> +		return;
> +
> +	rec->mmap.use = false;
> +
> +	len = rec->session->header.data_offset + rec->bytes_written;
> +	fd = rec->file.fd;
> +
> +	munmap(rec->mmap.addr, rec->mmap.out_size);
> +	rec->mmap.addr = NULL;
> +
> +	if (ftruncate(fd, len) != 0)
> +		pr_err("ftruncate failed\n");

I think we should fail here and dont let the finishing
code run on probably corrupted file.

the code that process build IDs could even get stuck

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