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: <CAPz6YkVsnZk0WA+Y-cOTtX4=VQd2=peOyKCD4aHdUXCy3=GDaw@mail.gmail.com>
Date:	Wed, 13 Jul 2011 13:49:08 -0700
From:	Sonny Rao <sonnyrao@...omium.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Michael Neuling <mikey@...ling.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, Jul 13, 2011 at 1:38 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
> 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/

Argh, I'm really messing this up... so yeah this shouldn't have worked
on big-endian without that fix..
Mikey, are you sure it worked?

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