Bug#833592: powerpc: kernel 4.4.(16|13) don't build with gcc-6 but with gcc-5

2016-08-15 Thread Elimar Riesebieter
* Elimar Riesebieter  [2016-08-06 18:39 +0200]:

> Package: gcc-6
> Version: 6.1.1-11
> Severity: important
> 
> 
> Hi all,
> 
> building a 4.4 Kernel with gcc-6 fails on arch ppc. Build with gcc-5 works 
> fine.
> Kernel 4.7 builds fine with gcc-6. The faillog:

Attached patch provided by [0] fixes the build. 

[0] https://bugzilla.kernel.org/show_bug.cgi?id=151651

Elimar
-- 
.~.
/V\   L   I   N   U   X
   /( )\ >Phear the Penguin<
   ^^-^^
From 1e407ee3b21f981140491d5b8a36422979ca246f Mon Sep 17 00:00:00 2001
From: Khem Raj 
Date: Mon, 25 Apr 2016 09:19:17 -0700
Subject: [PATCH] powerpc/ptrace: Fix out of bounds array access warning

gcc-6 correctly warns about a out of bounds access

arch/powerpc/kernel/ptrace.c:407:24: warning: index 32 denotes an offset greater than size of 'u64[32][1] {aka long long unsigned int[32][1]}' [-Warray-bounds]
offsetof(struct thread_fp_state, fpr[32][0]));
^

check the end of array instead of beginning of next element to fix this

Signed-off-by: Khem Raj 
Cc: Kees Cook 
Cc: Michael Ellerman 
Cc: Segher Boessenkool 
Tested-by: Aaro Koskinen 
Acked-by: Olof Johansson 
Signed-off-by: Michael Ellerman 
---
 arch/powerpc/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 30a03c0..060b140 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -377,7 +377,7 @@ static int fpr_get(struct task_struct *target, const struct user_regset *regset,
 
 #else
 	BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) !=
-		 offsetof(struct thread_fp_state, fpr[32][0]));
+		 offsetof(struct thread_fp_state, fpr[32]));
 
 	return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
    &target->thread.fp_state, 0, -1);
@@ -405,7 +405,7 @@ static int fpr_set(struct task_struct *target, const struct user_regset *regset,
 	return 0;
 #else
 	BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) !=
-		 offsetof(struct thread_fp_state, fpr[32][0]));
+		 offsetof(struct thread_fp_state, fpr[32]));
 
 	return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
   &target->thread.fp_state, 0, -1);
-- 
2.8.1



signature.asc
Description: PGP signature


gcc-as-needed.diff patch broke mpx support in GCC

2016-08-15 Thread Alexander Ivchenko
To: debian-gcc@lists.debian.org
From: aivch...@gmail.com
Subject: gcc-as-needed.diff patch broke mpx support in GCC

Package: gcc-5
Version: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609

gcc-5 from Ubuntu is configured with MPX support, but it is broken due
to always-added linker option "-as-needed".

This happens because usual invokation of gcc for mpx (e.g gcc
-fcheck-pointer-bounds -mmpx hello.c) would implicitely add -lmpx and
-lmpxwrappers during linking,
but those libraries are not actually linked:

> ldd a.out
linux-vdso.so.1 =>  (0x7ffe725af000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f3ed2513000)
/lib64/ld-linux-x86-64.so.2 (0x55922a9eb000)
(if we add -Wl,--no-as-needed:
> ldd a.out
linux-vdso.so.1 =>  (0x7ffe201e5000)
libmpx.so.0 => /usr/lib/x86_64-linux-gnu/libmpx.so.0
(0x7f9e76a76000)
libmpxwrappers.so.0 =>
/usr/lib/x86_64-linux-gnu/libmpxwrappers.so.0 (0x7f9e76873000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f9e764a9000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x7f9e7628c000)
/lib64/ld-linux-x86-64.so.2 (0x55f6e450d000))

The fix for that would be to add the same guards for as-needed as for
sanitizer libraries



Processing of gcc-6_6.1.1-12_all.changes

2016-08-15 Thread Debian FTP Masters
gcc-6_6.1.1-12_all.changes uploaded successfully to localhost
along with the files:
  gcc-6_6.1.1-12.dsc
  gcc-6_6.1.1-12.diff.gz
  gcc-6-locales_6.1.1-12_all.deb
  gcc-6-source_6.1.1-12_all.deb
  gcj-6-jre-lib_6.1.1-12_all.deb
  gcj-6-source_6.1.1-12_all.deb
  libgccjit-6-doc_6.1.1-12_all.deb
  libgcj-doc_6.1.1-12_all.deb
  libstdc++-6-doc_6.1.1-12_all.deb

Greetings,

Your Debian queue daemon (running on host franck.debian.org)



gcc-6_6.1.1-12_all.changes ACCEPTED into unstable

2016-08-15 Thread Debian FTP Masters
 GNU Fortran applications (x32 
development fil
 libx32gfortran3 - Runtime library for GNU Fortran applications (x32)
 libx32gfortran3-dbg - Runtime library for GNU Fortran applications (x32 debug 
symbols)
 libx32go9  - Runtime library for GNU Go applications (x32)
 libx32go9-dbg - Runtime library for GNU Go applications (x32 debug symbols)
 libx32gomp1 - GCC OpenMP (GOMP) support library (x32)
 libx32gomp1-dbg - GCC OpenMP (GOMP) support library (x32 debug symbols)
 libx32itm1 - GNU Transactional Memory Library (x32)
 libx32itm1-dbg - GNU Transactional Memory Library (x32 debug symbols)
 libx32lsan0 - LeakSanitizer -- a memory leak detector (x32)
 libx32lsan0-dbg - LeakSanitizer -- a memory leak detector (x32 debug symbols)
 libx32objc-6-dev - Runtime library for GNU Objective-C applications (x32 
development
 libx32objc4 - Runtime library for GNU Objective-C applications (x32)
 libx32objc4-dbg - Runtime library for GNU Objective-C applications (x32 debug 
symbo
 libx32phobos-6-dev - Phobos D standard library (x32 development files)
 libx32quadmath0 - GCC Quad-Precision Math Library (x32)
 libx32quadmath0-dbg - GCC Quad-Precision Math Library (x32 debug symbols)
 libx32stdc++-6-dev - GNU Standard C++ Library v3 (development files)
 libx32stdc++6 - GNU Standard C++ Library v3 (x32)
 libx32stdc++6-6-dbg - GNU Standard C++ Library v3 (debugging files)
 libx32ubsan0 - UBSan -- undefined behaviour sanitizer (x32)
 libx32ubsan0-dbg - UBSan -- undefined behaviour sanitizer (x32 debug symbols)
Changes:
 gcc-6 (6.1.1-12) unstable; urgency=medium
 .
   * GCC 6.2 release candidate 1.
   * Update to SVN 20160815 (r239482, 6.1.1) from the gcc-6-branch.
 Fix PR target/71869 (PPC), PR target/72805 (x86), PR target/70677 (AVR),
 PR c++/72415, PR sanitizer/71042, PR libstdc++/71964, PR libstdc++/70940,
 PR c/67410, PR c/72816, PR driver/72765, PR debug/71906,
 PR tree-optimization/73434, PR tree-optimization/72824, PR target/76342,
 PR target/72843, PR c/71512, PR tree-optimization/71083, PR target/72819,
 PR target/72853, PR tree-optimization/72824, PR ipa/71981, PR ipa/68273,
 PR tree-optimization/71881, PR target/72802, PR target/72802,
 PR rtl-optimization/71976, PR c++/71972, PR c++/72868, PR c++/73456,
 PR c++/72800, PR c++/68724, PR debug/71906, PR fortran/71936,
 PR fortran/72698, PR fortran/70524, PR fortran/71795, PR libgfortran/71123,
 PR libgfortran/73142.
 .
   [ Matthias Klose ]
   * Fix running the libjava testsuite.
   * Revert fix for PR target/55947, causing PR libstdc++/72813. LP: #1610220.
   * Update the Linaro support to the 6-2016.07 snapshot.
 .
   [ Aurelien Jarno ]
   * Replace proposed fix for PR ipa/68273 by the corresponding patch taken
 from trunk.
Checksums-Sha1:
 59027ca319ab2cbeef84f0da2309c0cce10c3f31 26160 gcc-6_6.1.1-12.dsc
 a2a476ba6654f68e3689990932cd56663590e0f3 5953578 gcc-6_6.1.1-12.diff.gz
 845470ccd0c97c3ced087d28e67863dedd88aa5c 1270946 gcc-6-locales_6.1.1-12_all.deb
 45c38b234cdc34d2480e2545e32f35f0b54bc48d 83850284 gcc-6-source_6.1.1-12_all.deb
 9063b3fe80afe954a11cac3cd442d2de0f843969 10349844 
gcj-6-jre-lib_6.1.1-12_all.deb
 ac0d79043520ffc4cf1121000de414f1ba1a36c1 11660532 gcj-6-source_6.1.1-12_all.deb
 9226ad62ddc9bc2fd9d85ef635868c9fa6ef7077 96756 libgccjit-6-doc_6.1.1-12_all.deb
 04346add170cf26bf581c1163c0761c04a2d8c8b 18455510 libgcj-doc_6.1.1-12_all.deb
 de8bb3d6e407cfcec31cbb8020e8ab718cfe5b35 10024776 
libstdc++-6-doc_6.1.1-12_all.deb
Checksums-Sha256:
 4f20bfc740d0fee88dff77612ce59ce8e94309e681f8ca0bce59880d6e9f7657 26160 
gcc-6_6.1.1-12.dsc
 2b09908c053cb39c1a6aa2fa79210b004fdacc54bb866cc2928ae0bbdcd1a840 5953578 
gcc-6_6.1.1-12.diff.gz
 b6eb1fc2cdcc72e8f9426c31c8c471edf6a596f17b956ca30a9c25f33e6fb3d7 1270946 
gcc-6-locales_6.1.1-12_all.deb
 bb809faca40830c9766a4cdb289b7335055bb392412649874d66d4cd356058ef 83850284 
gcc-6-source_6.1.1-12_all.deb
 f65c3bb7306700fc7b6548aea84c5aec4cf585676649a98907ce3c96fdfb98a7 10349844 
gcj-6-jre-lib_6.1.1-12_all.deb
 068199156c6a9b0115bb89be2f010c8918bdbb16c0449eaaa8450ff70375be5d 11660532 
gcj-6-source_6.1.1-12_all.deb
 2b1f23173e85e6d46d02ae09261c8070ca4939a76160abc2afbc76255817bfa1 96756 
libgccjit-6-doc_6.1.1-12_all.deb
 997bed4b6e5b0f13201e9d67577321481e10866cd8238b025b2e3b92ced7 18455510 
libgcj-doc_6.1.1-12_all.deb
 a06aa934b7d3ca16307472075c397736ea1e4160d06f4468fa200fe74276c85b 10024776 
libstdc++-6-doc_6.1.1-12_all.deb
Files:
 9d4d1e73bdda0a7f53e3317edc10ef68 26160 devel optional gcc-6_6.1.1-12.dsc
 9963a8bf8c9506b5282bb85c3ce64d54 5953578 devel optional gcc-6_6.1.1-12.diff.gz
 f617d42db64a2bcf3bcf4d7ef5e34693 1270946 devel optional 
gcc-6-locales_6.1.1-12_all.deb
 c94841318b7a04d142fb4d8b999085a8 83850284 devel optional 
gcc-6-source_6.1.1-12_all.deb
 8e9de4ee03dc1e4c08a0f0127f783fc2 10349844 java optional 
gcj-6-jre-lib_6.1.1-12_all.deb
 47e8f9562683c2ff3bd77ddf8f4f154c 11660532 java optional 
gcj-6-source_6.1.1-12_all.deb
 646a2a42fc7143804bcbcc4dd705c2d9 96756 doc

Processed: Fwd:

2016-08-15 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> # upstream : 1e407ee3b21f
> user debian-powe...@lists.debian.org
Setting user to debian-powe...@lists.debian.org (was ma...@debian.org).
> usertags 833592 powerpc
There were no usertags set.
Usertags are now: powerpc.
> tags 833592 + patch upstream fixed-upstream
Bug #833592 [gcc-6] powerpc: kernel 4.4.(16|13) don't build with gcc-6 but with 
gcc-5
Added tag(s) fixed-upstream, upstream, and patch.
> forwarded 833592 https://bugzilla.kernel.org/show_bug.cgi?id=151651
Bug #833592 [gcc-6] powerpc: kernel 4.4.(16|13) don't build with gcc-6 but with 
gcc-5
Set Bug forwarded-to-address to 
'https://bugzilla.kernel.org/show_bug.cgi?id=151651'.
>
End of message, stopping processing here.

Please contact me if you need assistance.
-- 
833592: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833592
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems