Bug 1688397
| Summary: | libjpeg-turbo: Support running with Intel CET | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Paolo Bonzini <pbonzini> | ||||
| Component: | libjpeg-turbo | Assignee: | Nikola Forró <nforro> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Jan Houska <jhouska> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 8.0 | CC: | blc, bnater, codonell, jhouska, jkejda, mnalband, nforro, nickc, pbonzini | ||||
| Target Milestone: | rc | Keywords: | Patch | ||||
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | libjpeg-turbo-1.5.3-8.el8 | Doc Type: | No Doc Update | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | 1630583 | Environment: | |||||
| Last Closed: | 2019-11-05 22:42:23 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1567218 | ||||||
| Attachments: |
|
||||||
|
Description
Paolo Bonzini
2019-03-13 16:56:27 UTC
> You also need to add endbr32 or endbr64 markers to assembly, and nasm does not support those yet.
As far as I can tell, there are no indirect calls nor indirect jumps in nasm sources. That means nasm-compiled object files are only missing the GNU Property note, which I can force on the resulting library by passing "-Wl,-z,ibt -Wl,-z,shstk" to the linker, am I right?
You still need endbr32 and endbr64 at the beginning of exported routines, because they can be called through an indirect jump via the PLT, and also at the beginning of any assembly routine that can be called via an indirect call. Created attachment 1554180 [details]
Add endbr32/endbr64 instructions to assembly sources
Paolo, does this patch look good to you?
Yes, except for the linker flags of course. You can test that those are applied properly with "readelf -n /usr/lib64/libjpeg.so|grep -A4 prop". Just one nit, perhaps it's better to call the macros _endbr32 and _endbr64 to avoid future conflicts when nasm implements the instructions. I can test it for you when you have an RPM patch ready. And also, don't forget to include it in Fedora too. :) Thanks, here is a private branch commit: http://pkgs.devel.redhat.com/cgit/rpms/libjpeg-turbo/commit/?h=private-nforro-bz1688397-rhel-8.1.0&id=e9c1810b1790a1672db7ecacd36a594eedcee9fb abd here is a scratch build with a repo: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=21354506 http://brew-task-repos.usersys.redhat.com/repos/scratch/nforro/libjpeg-turbo/1.5.3/8.el8/libjpeg-turbo-1.5.3-8.el8-scratch.repo VERIFIED:
bug can be confirmed only for x86_64 now.
NEW PASS:
rpm -qa libjpeg-turbo
libjpeg-turbo-1.5.3-10.el8.x86_64
libjpeg-turbo-1.5.3-10.el8.i686
[root@sweetpig-8 ~]# readelf -n /usr/lib64/libjpeg.so|grep -A4 prop
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
Properties: x86 feature: IBT, SHSTK
OLD FAIL:
[root@sheep-1 ~]# rpm -qa libjpeg-turbo
libjpeg-turbo-1.5.3-7.el8.i686
libjpeg-turbo-1.5.3-7.el8.x86_64
[root@sheep-1 ~]# readelf -n /usr/lib64/libjpeg.so|grep -A4 prop
[root@sheep-1 ~]#
NOTE other architectures:
NEW
[root@ibm-z-128 ~]# rpm -qa libjpeg-turbo
libjpeg-turbo-1.5.3-10.el8.s390x
[root@ibm-z-128 ~]# readelf -n /usr/lib64/libjpeg.so|grep -A4 prop
OLD:
[root@ibm-z-111 ~]# rpm -qa libjpeg-turbo
libjpeg-turbo-1.5.3-7.el8.s390x
[root@ibm-z-111 ~]# readelf -n /usr/lib64/libjpeg.so|grep -A4 prop
[root@ibm-z-111 ~]#
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:3705 |