How to avoid kernel Oops 0x81F in function do_alignment() ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi experts:
 
      an user application generates a un-alignment data abort, then in function do_alignment,
kernel read the instruction from the address where data abort occurs by:
  fault = __get_user(instr, (u32 *)instrptr);
 
   after this sentence, instr is the error instruction that generate data abort.
   i change this instruction from strict alignment check instruction to not strict alignment
check instruction by:
   instr = instr&030;
 
   at last i write this instruction back to ram, and let cpu execute this instruction again:
    *((u32*)instrptr) = instr;
 
   it works on kernel 2.6.35, but on version 3.0, it failed, the last sentence above generates a Oops:
 
[   58.966552] Unable to handle kernel paging request at virtual address 000084ec
[   58.974029] pgd = db9f4000
[   58.976806] [000084ec] *pgd=1b9db831, *pte=0ae5f59f, *ppte=0ae5fe7e
[   58.986877] Internal error: Oops: 81f [#1] PREEMPT SMP
 
   1. it seems that kernel 3.0 can not modify user mode program instructions directly even under
SVC mode.
   2. how can i change the page permisson before write back instruction of user mode application?
      for example, find out the page tables of current application, find out the pte which represents
the instruction that generate data abort, then modify pte, write back instruction, restore pte, done.
    how to do these?
 
    please advise, thanks very much.
 
 
Best Regards
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux