Bug 387821 - ptrace: AltiVec PTRACE_GETVRREGS returns invalid VRSAVE
Summary: ptrace: AltiVec PTRACE_GETVRREGS returns invalid VRSAVE
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 8
Hardware: ppc64
OS: Linux
low
low
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 367221
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-16 22:48 UTC by Jan Kratochvil
Modified: 2007-12-05 00:10 UTC (History)
2 users (show)

Fixed In Version: 2.6.23.1-49.fc8
Clone Of:
Environment:
Last Closed: 2007-12-05 00:10:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
kernel reportedly-fix by Roland McGrath. (1.98 KB, patch)
2007-11-16 22:48 UTC, Jan Kratochvil
no flags Details | Diff

Description Jan Kratochvil 2007-11-16 22:48:28 UTC
Description of problem:
PTRACE_GETVRREGS call returns value with an invalid VRSAVE value.

Version-Release number of selected component (if applicable):
kernel-2.6.23.1-49.fc8.ppc64

How reproducible:
Always.

Steps to Reproduce:
1. wget -O powerpc-altivec.c
http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/tests/ptrace-tests/tests/powerpc-altivec.c?cvsroot=systemtap
2. gcc -o powerpc-altivec powerpc-altivec.c -Wall -ggdb2 -m64 -D_GNU_SOURCE
3. ./powerpc-altivec;echo $?
  
Actual results:
[132] 0xa5a5a5a5
1

Expected results:
0

Additional info:
-m64 in command `2.' can be replacted with -m32 with the same results.

While it should be fixed since kernel-2.6.23.1-47.fc8.ppc64 according to the CVS
logs my tests do not confirm it.

Comment 1 Jan Kratochvil 2007-11-16 22:48:28 UTC
Created attachment 261921 [details]
kernel reportedly-fix by Roland McGrath.

Comment 3 Roland McGrath 2007-11-19 22:14:18 UTC
2.6.23.1-49.fc8 is the one I've tested.

Comment 5 Jan Kratochvil 2007-11-19 22:33:12 UTC
Roland, while I believe your patch is right there is some problem that
  mtspr 256,0x01010101
value does not get mapped into `thread.vrsave'.  It should be a problem outside
of utrace.


Comment 6 Roland McGrath 2007-11-19 23:40:25 UTC
This flavor of machine simply lacks the Altivec hardware support, though the
ppc64 kernel always supports it when it's there.  I've fixed the test to handle
this.


Note You need to log in before you can comment on or make changes to this bug.