Bug 152440

Summary: ppc64 arches can crash when single setpping a debugger through syscall return code
Product: Red Hat Enterprise Linux 4 Reporter: Neil Horman <nhorman>
Component: kernelAssignee: Neil Horman <nhorman>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: davej, jbaron, riel, tao
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Fixed In Version: RHSA-2005-514 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-05 12:55:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 154907, 156322    
Description Flags
patch to swap stack restore/RI clear ordering none

Description Neil Horman 2005-03-29 15:25:58 UTC
Description of problem:
ppc64 arches can crash when single setpping a debugger through syscall return
code.  Currently the ppc64 user stack is restored before clearing the RI bit in
the MSR.  Before the RI bit is cleared, traps are allowed, and if one is taken
after the stack is resored, but before the RI bit is cleared, unpredictable and
fatal results (oopses) can occur.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Use a hardware/jtag debugger to write software interrupt instructions
(software breakpoints), to the code addresses between the instructions in
entry.S where the user stack is restored and the RI bit is cleared in the
syscall_exit code.

2. execute a syscall in user space.
Actual results:
System will crash

Expected results:
Breakpoint is handled, system does not crash

Additional info:

Comment 1 Neil Horman 2005-03-29 15:25:59 UTC
Created attachment 112418 [details]
patch to swap stack restore/RI clear ordering

Comment 2 Neil Horman 2005-03-29 15:26:53 UTC
attached patch has been accepted on rhkernel-list for RHEL4-U2.

Comment 6 Red Hat Bugzilla 2005-10-05 12:55:12 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.