- Compat register fault reporting fix

- Documentation clarification on tagged pointers
 - hwcap widened to 64-bit (user space already reading it as 64-bit)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (GNU/Linux)
 
 iQIcBAABAgAGBQJSPEd3AAoJEGvWsS0AyF7xHFwQAIZZq6qbhEuojbrRxRSU1/Il
 4VuPIJIdFW+T09uzE9d9ER1LJkQlG9+RkffOZWZaqQ+kVpwtH8YImWpvKBA+JHc+
 IgwTOFEQ8c6JJS/g1XzJdm/0ykR/ZzOhavqbgWDpuJsjsw4aXbxTlWoE34/ZlVeo
 zn4QiirbzkUEsMNlV/Di6EdVkwdJ8WTvrFWxpyR2teSokgTKNACv2fwdxYz+ggS+
 +dwoqcQD122SogT72ti5LriGRucOynH1gjHETRTEfXkdAeCdMgjJ6jnVRLJEX9Je
 Qv7Q9YHI8eCFpv4rGKvSJ7GtYJWY3Vsjp/t1dSmXtw5+ctFQgKqpT5tyG4yHC1DU
 huR2/Ui5RuEYHHiMMBCFp9JOvceab9lBFbTrsLTJto6kRg8E3nkEAdVNcgb5MLRE
 jcgwquK4HfF1JW3+l9rKClKz7fo3eVoA/cR92i5VdBjwzoL6pqKSk3pbPro+557k
 q/gbQhiggX4kTcv16tfVvzcfWwi7xRRJyFMm1W/VqniJa+gkEptpzfdtvdZOxKCx
 bUDp7LRwejRAMPTVp8MJZY4NvA68jJucRuenYDKZ6UVN5LQl0rcCPTvfOtafy44M
 CwArqPpP9/wUInqYQhjBLvp0yMSndthhatoCjLUdee+YkhMbvLqAzOyu2Vp2CVqf
 ib5Roul1AuFWqWFRqJrN
 =OICB
 -----END PGP SIGNATURE-----

Merge tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64

Pull ARM64 fixes from Catalin Marinas:
 - Compat register fault reporting fix
 - Documentation clarification on tagged pointers
 - hwcap widened to 64-bit (user space already reading it as 64-bit)

* tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
  arm64: Widen hwcap to be 64 bit
  arm64: Correctly report LR and SP for compat tasks
  arm64: documentation: tighten up tagged pointer documentation
  arm64: Make do_bad_area() function static
This commit is contained in:
Linus Torvalds 2013-09-20 08:18:51 -05:00
commit dcb30e6592
5 changed files with 26 additions and 15 deletions

View File

@ -18,17 +18,17 @@ this byte for application use, with the following caveats:
parameters containing user virtual addresses *must* have
their top byte cleared before trapping to the kernel.
(2) Tags are not guaranteed to be preserved when delivering
signals. This means that signal handlers in applications
making use of tags cannot rely on the tag information for
user virtual addresses being maintained for fields inside
siginfo_t. One exception to this rule is for signals raised
in response to debug exceptions, where the tag information
(2) Non-zero tags are not preserved when delivering signals.
This means that signal handlers in applications making use
of tags cannot rely on the tag information for user virtual
addresses being maintained for fields inside siginfo_t.
One exception to this rule is for signals raised in response
to watchpoint debug exceptions, where the tag information
will be preserved.
(3) Special care should be taken when using tagged pointers,
since it is likely that C compilers will not hazard two
addresses differing only in the upper bits.
virtual addresses differing only in the upper byte.
The architecture prevents the use of a tagged PC, so the upper byte will
be set to a sign-extension of bit 55 on exception return.

View File

@ -43,6 +43,6 @@
COMPAT_HWCAP_VFPv3|COMPAT_HWCAP_VFPv4|\
COMPAT_HWCAP_NEON|COMPAT_HWCAP_IDIV)
extern unsigned int elf_hwcap;
extern unsigned long elf_hwcap;
#endif
#endif

View File

@ -143,15 +143,26 @@ void machine_restart(char *cmd)
void __show_regs(struct pt_regs *regs)
{
int i;
int i, top_reg;
u64 lr, sp;
if (compat_user_mode(regs)) {
lr = regs->compat_lr;
sp = regs->compat_sp;
top_reg = 12;
} else {
lr = regs->regs[30];
sp = regs->sp;
top_reg = 29;
}
show_regs_print_info(KERN_DEFAULT);
print_symbol("PC is at %s\n", instruction_pointer(regs));
print_symbol("LR is at %s\n", regs->regs[30]);
print_symbol("LR is at %s\n", lr);
printk("pc : [<%016llx>] lr : [<%016llx>] pstate: %08llx\n",
regs->pc, regs->regs[30], regs->pstate);
printk("sp : %016llx\n", regs->sp);
for (i = 29; i >= 0; i--) {
regs->pc, lr, regs->pstate);
printk("sp : %016llx\n", sp);
for (i = top_reg; i >= 0; i--) {
printk("x%-2d: %016llx ", i, regs->regs[i]);
if (i % 2 == 0)
printk("\n");

View File

@ -57,7 +57,7 @@
unsigned int processor_id;
EXPORT_SYMBOL(processor_id);
unsigned int elf_hwcap __read_mostly;
unsigned long elf_hwcap __read_mostly;
EXPORT_SYMBOL_GPL(elf_hwcap);
static const char *cpu_name;

View File

@ -130,7 +130,7 @@ static void __do_user_fault(struct task_struct *tsk, unsigned long addr,
force_sig_info(sig, &si, tsk);
}
void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs)
static void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs)
{
struct task_struct *tsk = current;
struct mm_struct *mm = tsk->active_mm;