[Group.of.nepali.translators] [Bug 1695093] Re: arm64: "unsupported RELA relocation: 275" loading certain modules

2018-11-21 Thread Bug Watch Updater
Launchpad has imported 18 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79041.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.


On 2017-01-10T11:17:05+00:00 Robert Schiele wrote:

Created attachment 40487
test case to reproduce the problem

To support older Cortex A53 CPUs that suffer from erratum 843419 the
Linux kernel has some option not to allow certain relocations in kernel
modules. To achieve that it utilizes the options -mcmodel=large -mpc-
relative-literal-loads.

Unfortunately we found a case where gcc does still produce such
relocations despite the options being used if optimization level is at
least -O2.

The code in question is attached and the problem can be reproduced like
this:

$ aarch64-linux-gnu-gcc -O2 -mcmodel=large -mpc-relative-literal-loads -c t.c
$ aarch64-linux-gnu-objdump -r t.o

t.o: file format elf64-littleaarch64

RELOCATION RECORDS FOR [.text]:
OFFSET   TYPE  VALUE
0018 R_AARCH64_CALL26  strcmp
0030 R_AARCH64_ADR_PREL_PG_HI21  .text+0x0060
0034 R_AARCH64_ADD_ABS_LO12_NC  .text+0x0060
0050 R_AARCH64_ABS64   .rodata.str1.8


Obviously the attached code by itself might not be very useful but it is a 
stripped-down code example of a real-world kernel driver just to demonstrate 
the problem.

Some observations:
1. The problem did reproduce with the latest patches from Linaro and with the 
upstream version (without the Linaro patches) of latest gcc 6 branch.
2. The problem did also reproduce with the gcc 5 branch including the Linaro 
patches on that branch. I did not check the gcc 5 branch without the Linaro 
patches.
3. The problem disappears if the useless (not used in the code) second entry in 
the array gets removed from the code.
4. The problem seems to be in the code that is generated for the strcpy by the 
compiler.
5. The problem disappears if the string is made longer. In that case the string 
ends up in .rodata.str1.8 section like the other string, while in the 
problematic case it is stored as .xword type in .text section.

So my personal conclusion is that some code in the backend involved in
this strcpy optimization does not honor the -mpc-relative-literal-loads
option properly.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1695093/comments/0


On 2017-01-10T11:36:04+00:00 Ktkachov wrote:

Confirmed on GCC 6.3.1
This doesn't appear on trunk. Trunk generates a pc-relative load.

aarch64-none-elf-objdump -r t.o

reloc.o: file format elf64-littleaarch64

RELOCATION RECORDS FOR [.text]:
OFFSET   TYPE  VALUE 
0018 R_AARCH64_CALL26  strcmp
0038 R_AARCH64_ABS64   .rodata.str1.8
0040 R_AARCH64_ABS64   .rodata.str1.8+0x0008

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1695093/comments/1


On 2017-01-10T16:22:55+00:00 Ktkachov wrote:

This was fixed by a trunk patch that has been only partially backported to GCC 
6.
Testing a patch to fix it.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1695093/comments/2


On 2017-01-11T06:25:55+00:00 Robert Schiele wrote:

If you point me to the specific patch that you have in mind I can in
parallel already test whether besides the test case I provided it also
fixes the original problem this was detected with.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1695093/comments/3


On 2017-01-11T16:34:07+00:00 Ktkachov wrote:

(In reply to Robert Schiele from comment #3)
> If you point me to the specific patch that you have in mind I can in
> parallel already test whether besides the test case I provided it also fixes
> the original problem this was detected with.

I've posted a patch for review at:
https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00736.html
It should apply to a GCC 6-based tree (but not GCC 7 trunk which doesn't 
exhibit this bug)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1695093/comments/4


On 2017-01-12T07:39:19+00:00 Robert Schiele wrote:

Thanks! I can confirm that this also fixes the original problem for all
cases we observed so far.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1695093/comments/5


On 2017-01-12T17:42:22+00:00 Ktkachov wrote:

thanks 

[Group.of.nepali.translators] [Bug 1695093] Re: arm64: "unsupported RELA relocation: 275" loading certain modules

2018-05-09 Thread dann frazier
** Changed in: linux (Ubuntu Zesty)
   Status: Fix Committed => Won't Fix

** Changed in: linux (Ubuntu Xenial)
   Status: Fix Committed => Fix Released

** Changed in: linux (Ubuntu)
   Status: Triaged => Fix Released

** Changed in: gcc-6 (Ubuntu Zesty)
   Status: Triaged => Won't Fix

** Changed in: gcc-5 (Ubuntu Zesty)
   Status: Triaged => Won't Fix

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1695093

Title:
  arm64: "unsupported RELA relocation: 275" loading certain modules

Status in Linux:
  In Progress
Status in gcc-5 package in Ubuntu:
  Fix Released
Status in gcc-6 package in Ubuntu:
  Fix Released
Status in linux package in Ubuntu:
  Fix Released
Status in gcc-5 source package in Xenial:
  Fix Released
Status in gcc-6 source package in Xenial:
  Invalid
Status in linux source package in Xenial:
  Fix Released
Status in gcc-5 source package in Yakkety:
  Won't Fix
Status in gcc-6 source package in Yakkety:
  Won't Fix
Status in linux source package in Yakkety:
  Won't Fix
Status in gcc-5 source package in Zesty:
  Won't Fix
Status in gcc-6 source package in Zesty:
  Won't Fix
Status in linux source package in Zesty:
  Won't Fix

Bug description:
  [Impact]
  Certain kernel modules are unloadable (libceph & scsi_debug) due to the 
compiler generating unsupported relocations.

  This symptom is similar to LP: #1533009 but, in that case it impacted
  all modules, and the fix for that appears to remain in place.

  [Test Case]

  With the hwe-z kernel:

  ubuntu@grotian:~$ sudo modprobe libceph
  modprobe: ERROR: could not insert 'libceph': Exec format error
  ubuntu@grotian:~$ dmesg
  [66988.470307] module libceph: unsupported RELA relocation: 275

  [Regression Risk]
  The scope of the fix is restricted to aarch64, so regressions should only 
impact the arm64 port of Ubuntu. Regressions could impact when literal loads 
are used - which may have performance impacts or possibly cause software to 
fail to build/run where it previously did. This is somewhat mitigated by the 
fact that this has been fixed in artful gcc-5/gcc-6 and used on our buildds for 
some time. Only "somewhat", because gcc-7 is now the default.

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1695093/+subscriptions

___
Mailing list: https://launchpad.net/~group.of.nepali.translators
Post to : group.of.nepali.translators@lists.launchpad.net
Unsubscribe : https://launchpad.net/~group.of.nepali.translators
More help   : https://help.launchpad.net/ListHelp


[Group.of.nepali.translators] [Bug 1695093] Re: arm64: "unsupported RELA relocation: 275" loading certain modules

2017-10-04 Thread Launchpad Bug Tracker
This bug was fixed in the package gcc-5 - 5.4.0-6ubuntu1~16.04.5

---
gcc-5 (5.4.0-6ubuntu1~16.04.5) xenial-proposed; urgency=medium

  * SRU
  * Fix PR target/77267 (x86), taken from the trunk. LP: #1623418.
  * Fix hangs w/ asan binaries on arm64 (Dann Frazier). LP: #1709727.
  * Linaro branch only: Fix PR target/79041, aarch64 backend emitting
R_AARCH64_ADR_PREL_PG_HI21 relocation despite -mpc-relative-literal-loads
option being used (Dan Frazier). LP: #1695093.

 -- Matthias Klose   Wed, 23 Aug 2017 11:35:00 +0200

** Changed in: gcc-5 (Ubuntu Xenial)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1695093

Title:
  arm64: "unsupported RELA relocation: 275" loading certain modules

Status in Linux:
  In Progress
Status in gcc-5 package in Ubuntu:
  Fix Released
Status in gcc-6 package in Ubuntu:
  Fix Released
Status in linux package in Ubuntu:
  Triaged
Status in gcc-5 source package in Xenial:
  Fix Released
Status in gcc-6 source package in Xenial:
  Invalid
Status in linux source package in Xenial:
  Triaged
Status in gcc-5 source package in Yakkety:
  Won't Fix
Status in gcc-6 source package in Yakkety:
  Won't Fix
Status in linux source package in Yakkety:
  Won't Fix
Status in gcc-5 source package in Zesty:
  Triaged
Status in gcc-6 source package in Zesty:
  Triaged
Status in linux source package in Zesty:
  Triaged

Bug description:
  [Impact]
  Certain kernel modules are unloadable (libceph & scsi_debug) due to the 
compiler generating unsupported relocations.

  This symptom is similar to LP: #1533009 but, in that case it impacted
  all modules, and the fix for that appears to remain in place.

  [Test Case]

  With the hwe-z kernel:

  ubuntu@grotian:~$ sudo modprobe libceph
  modprobe: ERROR: could not insert 'libceph': Exec format error
  ubuntu@grotian:~$ dmesg
  [66988.470307] module libceph: unsupported RELA relocation: 275

  [Regression Risk]
  The scope of the fix is restricted to aarch64, so regressions should only 
impact the arm64 port of Ubuntu. Regressions could impact when literal loads 
are used - which may have performance impacts or possibly cause software to 
fail to build/run where it previously did. This is somewhat mitigated by the 
fact that this has been fixed in artful gcc-5/gcc-6 and used on our buildds for 
some time. Only "somewhat", because gcc-7 is now the default.

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1695093/+subscriptions

___
Mailing list: https://launchpad.net/~group.of.nepali.translators
Post to : group.of.nepali.translators@lists.launchpad.net
Unsubscribe : https://launchpad.net/~group.of.nepali.translators
More help   : https://help.launchpad.net/ListHelp


[Group.of.nepali.translators] [Bug 1695093] Re: arm64: "unsupported RELA relocation: 275" loading certain modules

2017-08-21 Thread Launchpad Bug Tracker
This bug was fixed in the package gcc-5 - 5.4.1-12ubuntu2

---
gcc-5 (5.4.1-12ubuntu2) artful; urgency=medium

  * Merge with Debian; remaining changes:
- Build from upstream sources.

gcc-5 (5.4.1-12) unstable; urgency=medium

  * Update to SVN 20170820 (r251205, 5.4.1) from the gcc-5-branch.
- Fix PR libgomp/80394, PR sanitizer/77396, PR sanitizer/80166,
  PR c++/78761, PR gcov-profile/78783, PR c++/79641, PR c/80097,
  PR c++/79512, PR c/77767, PR c/67410, PR c/72816, PR libgomp/80394,
  PR rtl-optimization/80385, PR target/80286 (x86), PR debug/80025,
  PR sanitizer/80168, PR rtl-optimization/80112, PR c++/80129,
  PR sanitizer/79944, PR target/79932 (x86), PR target/79932 (x86),
  PR rtl-optimization/79901, PR rtl-optimization/79901, PR target/79807,
  PR target/79729 (x86), PR middle-end/79396, PR target/79570,
  PR target/79494 (x86), PR target/79568 (x86), PR target/79559 (x86),
  PR tree-optimization/79411, PR middle-end/79399, PR target/79197 (PPC),
  PR ipa/77905, PR target/78796 (AArch64), PR fortran/78298,
  PR middle-end/69183, PR middle-end/78416, PR middle-end/67335,
  PR rtl-optimization/78378, PR target/78227 (x86), PR sanitizer/66343,
  PR rtl-optimization/77919, PR fortran/77665, PR middle-end/77624,
  PR target/77587, PR middle-end/77594, PR sanitizer/68260,
  PR fortran/77516, PR debug/77363, PR middle-end/77377, PR target/71910,
  PR tree-optimization/72824, PR tree-optimization/72824,
  PR sanitizer/71953, PR middle-end/79931, PR ipa/65972, PR lto/50345,
  PR gcov-profile/78783, PR gcov-profile/80413, PR ipa/80212,
  PR sanitizer/70878, PR gcov-profile/80224, PR ipa/80205, PR ipa/80104,
  PR c++/80363, PR c++/80176, PR c++/80141, PR c++/79896, PR c++/79664,
  PR c++/79512, PR c++/78341, PR c++/78949, PR c++/78649, PR c++/77739,
  PR c++/77285, PR c++/78089, PR c++/77467, PR c++/77722, PR c++/77637,
  PR c++/77375, PR c++/72868, PR fortran/78866, PR fortran/77666,
  PR fortran/77500, PR middle-end/50199, PR sanitizer/78992,
  PR sanitizer/78532, PR libstdc++/81002, PR c/81006, PR target/81894 (x86),
  PR target/81861 (x86), PR tree-optimization/81354, PR sanitizer/81604,
  PR tree-optimization/81555, PR tree-optimization/81556,
  PR tree-optimization/81162, PR target/80569 (x86), PR target/81471 (x86),
  PR target/81375 (x86), PR target/81300 (x86), PR tree-optimization/81192,
  PR target/80382 (PPC), PR target/80966 (PPC), PR rtl-optimization/73650,
  PR target/61729 (PPC), PR target/77850 (PPC), PR target/80382 (PPC),
  PR middle-end/80692, PR target/80966 (PPC), PR middle-end/80902,
  PR target/79155 (x86), PR other/80909, PR ipa/80663, PR ipa/79850,
  PR driver/31468, PR other/80589, PR gcov-profile/53915, PR driver/56469,
  PR target/80968 (SPARC), PR target/80968 (SPARC), PR c/81006,
  PR fortran/70601.
- Fix PR sanitizer/66343. LP: #1704401.
  * Don't build the gc enabled libobjc for cross compilers. Closes: #872233.
  * Fix hangs w/ asan binaries on arm64 (Dann Frazier). LP: #1709727.
  * Linaro branch only: Fix PR target/79041, aarch64 backend emitting
R_AARCH64_ADR_PREL_PG_HI21 relocation despite -mpc-relative-literal-loads
option being used (Dan Frazier). LP: #1695093.

 -- Matthias Klose   Sun, 20 Aug 2017 16:34:04 +0200

** Changed in: gcc-5 (Ubuntu)
   Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1695093

Title:
  arm64: "unsupported RELA relocation: 275" loading certain modules

Status in Linux:
  In Progress
Status in gcc-5 package in Ubuntu:
  Fix Released
Status in gcc-6 package in Ubuntu:
  Fix Released
Status in linux package in Ubuntu:
  Triaged
Status in gcc-5 source package in Xenial:
  Triaged
Status in gcc-6 source package in Xenial:
  Invalid
Status in linux source package in Xenial:
  Triaged
Status in gcc-5 source package in Yakkety:
  Won't Fix
Status in gcc-6 source package in Yakkety:
  Won't Fix
Status in linux source package in Yakkety:
  Won't Fix
Status in gcc-5 source package in Zesty:
  Triaged
Status in gcc-6 source package in Zesty:
  Triaged
Status in linux source package in Zesty:
  Triaged

Bug description:
  With the hwe-z kernel:

  ubuntu@grotian:~$ sudo modprobe libceph
  modprobe: ERROR: could not insert 'libceph': Exec format error
  ubuntu@grotian:~$ dmesg
  [66988.470307] module libceph: unsupported RELA relocation: 275

  This symptom is similar to LP: #1533009 but, in that case it impacted
  all modules, and the fix for that appears to remain in place.

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1695093/+subscriptions

___
Mailing list: 

[Group.of.nepali.translators] [Bug 1695093] Re: arm64: "unsupported RELA relocation: 275" loading certain modules

2017-08-20 Thread Matthias Klose
fixed in gcc-6 6.3.0-21ubuntu1 in artful


** Changed in: gcc-6 (Ubuntu)
   Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1695093

Title:
  arm64: "unsupported RELA relocation: 275" loading certain modules

Status in Linux:
  In Progress
Status in gcc-5 package in Ubuntu:
  Triaged
Status in gcc-6 package in Ubuntu:
  Fix Released
Status in linux package in Ubuntu:
  Triaged
Status in gcc-5 source package in Xenial:
  Triaged
Status in gcc-6 source package in Xenial:
  Invalid
Status in linux source package in Xenial:
  Triaged
Status in gcc-5 source package in Yakkety:
  Won't Fix
Status in gcc-6 source package in Yakkety:
  Won't Fix
Status in linux source package in Yakkety:
  Won't Fix
Status in gcc-5 source package in Zesty:
  Triaged
Status in gcc-6 source package in Zesty:
  Triaged
Status in linux source package in Zesty:
  Triaged

Bug description:
  With the hwe-z kernel:

  ubuntu@grotian:~$ sudo modprobe libceph
  modprobe: ERROR: could not insert 'libceph': Exec format error
  ubuntu@grotian:~$ dmesg
  [66988.470307] module libceph: unsupported RELA relocation: 275

  This symptom is similar to LP: #1533009 but, in that case it impacted
  all modules, and the fix for that appears to remain in place.

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1695093/+subscriptions

___
Mailing list: https://launchpad.net/~group.of.nepali.translators
Post to : group.of.nepali.translators@lists.launchpad.net
Unsubscribe : https://launchpad.net/~group.of.nepali.translators
More help   : https://help.launchpad.net/ListHelp


[Group.of.nepali.translators] [Bug 1695093] Re: arm64: "unsupported RELA relocation: 275" loading certain modules

2017-06-28 Thread dann frazier
** Changed in: gcc-6 (Ubuntu Xenial)
   Status: Confirmed => Invalid

** Also affects: gcc-5 (Ubuntu)
   Importance: Undecided
   Status: New

** Changed in: gcc-5 (Ubuntu Xenial)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1695093

Title:
  arm64: "unsupported RELA relocation: 275" loading certain modules

Status in Linux:
  In Progress
Status in gcc-5 package in Ubuntu:
  New
Status in gcc-6 package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Confirmed
Status in gcc-5 source package in Xenial:
  Confirmed
Status in gcc-6 source package in Xenial:
  Invalid
Status in linux source package in Xenial:
  Confirmed
Status in gcc-5 source package in Yakkety:
  New
Status in gcc-6 source package in Yakkety:
  Confirmed
Status in linux source package in Yakkety:
  Confirmed
Status in gcc-5 source package in Zesty:
  New
Status in gcc-6 source package in Zesty:
  Confirmed
Status in linux source package in Zesty:
  Confirmed

Bug description:
  With the hwe-z kernel:

  ubuntu@grotian:~$ sudo modprobe libceph
  modprobe: ERROR: could not insert 'libceph': Exec format error
  ubuntu@grotian:~$ dmesg
  [66988.470307] module libceph: unsupported RELA relocation: 275

  This symptom is similar to LP: #1533009 but, in that case it impacted
  all modules, and the fix for that appears to remain in place.

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1695093/+subscriptions

___
Mailing list: https://launchpad.net/~group.of.nepali.translators
Post to : group.of.nepali.translators@lists.launchpad.net
Unsubscribe : https://launchpad.net/~group.of.nepali.translators
More help   : https://help.launchpad.net/ListHelp


[Group.of.nepali.translators] [Bug 1695093] Re: arm64: "unsupported RELA relocation: 275" loading certain modules

2017-06-21 Thread Matthias Klose
** Bug watch added: GCC Bugzilla #79041
   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79041

** Also affects: linux via
   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79041
   Importance: Unknown
   Status: Unknown

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1695093

Title:
  arm64: "unsupported RELA relocation: 275" loading certain modules

Status in Linux:
  Unknown
Status in gcc-6 package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Confirmed
Status in gcc-6 source package in Xenial:
  Confirmed
Status in linux source package in Xenial:
  Confirmed
Status in gcc-6 source package in Yakkety:
  Confirmed
Status in linux source package in Yakkety:
  Confirmed
Status in gcc-6 source package in Zesty:
  Confirmed
Status in linux source package in Zesty:
  Confirmed

Bug description:
  With the hwe-z kernel:

  ubuntu@grotian:~$ sudo modprobe libceph
  modprobe: ERROR: could not insert 'libceph': Exec format error
  ubuntu@grotian:~$ dmesg
  [66988.470307] module libceph: unsupported RELA relocation: 275

  This symptom is similar to LP: #1533009 but, in that case it impacted
  all modules, and the fix for that appears to remain in place.

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1695093/+subscriptions

___
Mailing list: https://launchpad.net/~group.of.nepali.translators
Post to : group.of.nepali.translators@lists.launchpad.net
Unsubscribe : https://launchpad.net/~group.of.nepali.translators
More help   : https://help.launchpad.net/ListHelp