| Summary: | PPC64 set/swapcontext do not restore the CCR | ||
|---|---|---|---|
| Product: | glibc | Reporter: | Steven Munroe <sjmunroe> |
| Component: | libc | Assignee: | Steven Munroe <sjmunroe> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | drepper.fsp, fweimer, glibc-bugs |
| Priority: | P2 | Flags: | fweimer:
security-
|
| Version: | 2.3.4 | ||
| Target Milestone: | --- | ||
| Host: | powerpc64-linux | Target: | powerpc64-linux |
| Build: | powerpc64-linux | Last reconfirmed: | |
| Project(s) to access: | ssh public key: | ||
| Bug Depends on: | |||
| Bug Blocks: | 724 | ||
| Attachments: |
Patch for PPC64 set/swapcontext CCR restore bug
Improved patch per Jakub Newer more improved patch per Jakub |
||
|
Description
Steven Munroe
2005-01-31 23:35:04 UTC
Created attachment 391 [details]
Patch for PPC64 set/swapcontext CCR restore bug
This should also be applied to the 2-3-branch I don't think this should be RESOLVED/FIXED, given that it has not been applied to CVS. Anyway, there are grep lwz.*MSR sysdeps/unix/sysv/linux/powerpc64/*.S shows 2 occurrences in setcontext.S and 2 in swapcontext.S. Are you sure you want to patch just one and not the other one in each of those files? Created attachment 396 [details]
Improved patch per Jakub
Sorry different bugzilla's have different rules. Improved patch above per Jakub's comments. Is it appropriate to assign this bug to myself at thsi point as I am supplying the fix? Looks good to me, except the ChangeLog entry:
1) setcontext.S contains {__novec_,__}setcontext, not *getcontext
2) updating of Copyright year does not belong to ChangeLog, unless the year
change is e.g. in the messages printed by some program or library
3) When the description is identical for multiple functions and/or files,
you should just write it for the first one and use Likewise. for the rest.
So IMHO you want something like:
2005-02-07 Steven Munroe <sjmunroe@us.ibm.com>
[BZ #700]
* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
(__novec_setcontext, __setcontext): Fix a typo so CCR is restored.
Load MSR as a doubleword.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
(__novec_swapcontext, __swapcontext): Likewise.
Surely you can assign the bug to yourself, even already when you start
working on the fix to prevent others from duplicating the work.
Created attachment 397 [details]
Newer more improved patch per Jakub
Dyslexics R us... Also may be time for new bifocals ;-)
Applied. Subject: Bug 700 CVSROOT: /cvs/glibc Module name: libc Branch: glibc-2_3-branch Changes by: roland@sources.redhat.com 2005-02-16 11:18:21 Modified files: sysdeps/unix/sysv/linux/powerpc/powerpc64: setcontext.S swapcontext.S Log message: 2005-02-07 Steven Munroe <sjmunroe@us.ibm.com> [BZ #700] * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S (__novec_setcontext, __setcontext): Fix typo so CCR is restored. Load MSR as a doubleword. * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S (__novec_swapcontext, __swapcontext): Likewise. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.9&r2=1.9.2.1 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.12&r2=1.12.2.1 No documented application impact, so flagging as security-. |