gcc trunk fails to build kernel on PowerPC64 due to oprofile warnings
William Cohen
wcohen at redhat.com
Fri Feb 3 04:21:08 AEDT 2017
On 01/26/2017 11:06 AM, Robert Richter wrote:
> On 26.01.17 10:46:43, William Cohen wrote:
>> From 7e46dbd7dc5bc941926a4a63c28ccebf46493e8d Mon Sep 17 00:00:00 2001
>> From: William Cohen <wcohen at redhat.com>
>> Date: Thu, 26 Jan 2017 10:33:59 -0500
>> Subject: [PATCH] Avoid hypthetical string truncation in oprofile stats buffer
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: 8bit
>>
>> Increased the size of an internal oprofile driver buffer ensuring that
>> the string was never truncated for any possible int value to avoid the
>> following gcc-7 compiler error on ppc when building the kernel:
>
> Please test gcc7 for other archs first. I don't think this is the only
> change needed to avoid this warning in oprofile code.
>
> Thanks,
>
> -Robert
>
Hi Robert,
I looked through the oprofile arch specific code for other snprintf uses with small character arrays and added those to the patch. Attached is current patch to increase the size of the buffers to make sure that they will not be truncated.
OProfile since 1.0.0 has used the kernels perf infrastructure rather than the oprofile kernel driver. OProfile 1.0 was released September 2014, over two years ago. Would it make sense to deprecate and at some point remove the oprofile driver kernel from the kernel? Recent Fedora distributions already have CONFIG_OPROFILE unset in the kernel configurations.
-Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-hypthetical-string-truncation-in-various-oprof.patch
Type: text/x-patch
Size: 5808 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20170202/9790eef3/attachment-0001.bin>
More information about the Linuxppc-dev
mailing list