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: <1310589536.3931.25.camel@gandalf.stny.rr.com>
Date:	Wed, 13 Jul 2011 16:38:56 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Michael Neuling <mikey@...ling.org>
Cc:	Sonny Rao <sonnyrao@...omium.org>, acme@...hat.com,
	anton@...ba.org, Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [RFC] perf: robustify proc and debugfs file recording

On Wed, 2011-07-13 at 20:52 +1000, Michael Neuling wrote:

> Actually, here's an updated patch to fix these..
> 
> FYI perf record/annotate/report works fine on my powerpc box here with
> this.  I don't have modules handy so I've not tested that aspect.

Sure it worked for you...


> -static unsigned long get_size(const char *file)
> -{
> -	unsigned long long size = 0;
> -	int fd;
> -
> -	fd = open(file, O_RDONLY);
> -	if (fd < 0)
> -		die("Can't read '%s'", file);
> -	size = get_size_fd(fd);
>  	close(fd);
>  
> -	return size;
> +	/* ugh, handle big-endian hdr_size == 4 */
> +	sizep = (char*)&size;
> +	if (bigendian())
> +		sizep += sizeof(u64) - hdr_sz;
> +
> +	if (pwrite(output_fd, &size, hdr_sz, hdr_pos) < 0)

s/&size/sizep/

-- Steve

> +		die("writing to %s", output_file);
>  }


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