Assembler messages: Error: .err encountered

Bug #1414002 reported by Andy Whitcroft
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
High
Andy Whitcroft

Bug Description

$ gcc -Wp,-MD,arch/arm64/kernel/.psci.o.d -nostdinc -isystem /usr/lib/gcc/aarch64-linux-gnu/4.9/include -I/usr/src/linux-headers-lbm- -I/home/apw/ubuntu-vivid2/arch/arm64/include -Iarch/arm64/include/generated -I/home/apw/ubuntu-vivid2/include -Iinclude -I/home/apw/ubuntu-vivid2/arch/arm64/include/uapi -Iarch/arm64/include/generated/uapi -I/home/apw/ubuntu-vivid2/include/uapi -Iinclude/generated/uapi -include /home/apw/ubuntu-vivid2/include/linux/kconfig.h -Iubuntu/include -I/home/apw/ubuntu-vivid2/ubuntu/include -I/home/apw/ubuntu-vivid2/arch/arm64/kernel -Iarch/arm64/kernel -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mgeneral-regs-only -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -gdwarf-4 -pg -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(psci)" -D"KBUILD_MODNAME=KBUILD_STR(psci)" -c -o arch/arm64/kernel/.tmp_psci.o /home/apw/ubuntu-vivid2/arch/arm64/kernel/psci.c
/tmp/ccEayz7S.s: Assembler messages:
/tmp/ccEayz7S.s:41: Error: .err encountered
/tmp/ccEayz7S.s:42: Error: .err encountered
/tmp/ccEayz7S.s:43: Error: .err encountered
/tmp/ccEayz7S.s:101: Error: .err encountered
/tmp/ccEayz7S.s:102: Error: .err encountered
/tmp/ccEayz7S.s:103: Error: .err encountered

Tags: patch
Revision history for this message
Andy Whitcroft (apw) wrote :
Revision history for this message
Andy Whitcroft (apw) wrote :

psci.E represents the command above with the -c switch to -E.

Revision history for this message
Matthias Klose (doko) wrote :

-pg triggers it

$ gcc -c -g -O2 -pg psci.i
/tmp/ccBtw9zv.s: Assembler messages:
/tmp/ccBtw9zv.s:41: Error: .err encountered
/tmp/ccBtw9zv.s:42: Error: .err encountered
/tmp/ccBtw9zv.s:43: Error: .err encountered
/tmp/ccBtw9zv.s:100: Error: .err encountered
/tmp/ccBtw9zv.s:101: Error: .err encountered
/tmp/ccBtw9zv.s:102: Error: .err encountered

Revision history for this message
Matthias Klose (doko) wrote :
affects: gcc-4.9 (Ubuntu) → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1414002

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Andy Whitcroft (apw) wrote :

Ok. So this is actually a bad piece of assembly triggering, a piece deliberatly placed in the code to catch the compiler not placing things in the registers we expected. Basically we are assuming the ABI placement. When mcount (-pg) is enabled, the compiler adds additional code "inside" the function and all bets are off. The approved mechanism is to inform the compiler of your constraints on the variables using the below form:

int foo (int _arg)
{
    register int arg asm("r0") = _arg;
    [...]
}

Changed in linux (Ubuntu):
status: Incomplete → In Progress
importance: Undecided → High
assignee: nobody → Andy Whitcroft (apw)
milestone: none → ubuntu-15.01
Revision history for this message
Andy Whitcroft (apw) wrote :
  • P Edit (2.5 KiB, text/plain)
Andy Whitcroft (apw)
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.18.0-11.12

---------------
linux (3.18.0-11.12) vivid; urgency=low

  [ Leann Ogasawara ]

  * Release Tracking Bug
    - LP: #1414085

  [ Andy Whitcroft ]

  * SAUCE: arm64 -- psci tell the compiler which registers we are needing
    values in
    - LP: #1414002
 -- Leann Ogasawara <email address hidden> Fri, 23 Jan 2015 09:10:09 -0800

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.