RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 821463 - SEP CPU flag is disabled on Intel 64 bit when exec_shield is on
Summary: SEP CPU flag is disabled on Intel 64 bit when exec_shield is on
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.3
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Larry Woodman
QA Contact: Petr Beňas
URL:
Whiteboard:
Depends On:
Blocks: 821741
TreeView+ depends on / blocked
 
Reported: 2012-05-14 15:02 UTC by Orit Wasserman
Modified: 2015-01-04 23:02 UTC (History)
10 users (show)

Fixed In Version: kernel-2.6.32-315.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 06:12:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0496 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 6 kernel update 2013-02-20 21:40:54 UTC

Description Orit Wasserman 2012-05-14 15:02:21 UTC
Description of problem:
SEP cpu flag is disabled on Intel 64 bit when exec_shield is set (which is the default)

Version-Release number of selected component (if applicable):
2.6.32-251.el6.x86_64

How reproducible:
check cpuinfo after install of RHEL6 64 bit.

Steps to Reproduce:
1.check exec_shield is set. cat /proc/sys/kernel/exec-shield returns 1.
2.cat /proc/cpuinfo 
3.
  
Actual results:
sep is not set

Expected results:
sep should be set

Additional info:
this looks like a problem with the exec_shield code in arch/x86/kernel/cpu/common.c :

	if (exec_shield != 0) {
#ifdef CONFIG_X86_PAE
		if (!test_cpu_cap(c, X86_FEATURE_NX))
#endif
			clear_cpu_cap(c, X86_FEATURE_SEP);
	}

CONFIG_X86_PAE is not set for 64 bit so we clear SEP.

Comment 4 Paolo Bonzini 2012-09-04 08:23:13 UTC
What is really the effect of the bug?  The kernel only uses X86_FEATURE_SEP in 32-bit mode.

In 64-bit mode, sysenter/sysexit are assumed to be present on all Intel CPUs.

arch/x86/kernel/cpu/intel.c:

#ifdef CONFIG_X86_64
        set_cpu_cap(c, X86_FEATURE_SYSENTER32);
#endif

arch/x86/vdso/vdso32-setup.c

#ifdef CONFIG_X86_64
#define vdso32_sysenter()       (boot_cpu_has(X86_FEATURE_SYSENTER32))
#define vdso32_syscall()        (boot_cpu_has(X86_FEATURE_SYSCALL32))
...
#else  /* CONFIG_X86_32 */
#define vdso32_sysenter()       (boot_cpu_has(X86_FEATURE_SEP))
#define vdso32_syscall()        (0)
#endif

I suppose this only affects virtualization of 32-bit guests with -cpu host, where the guest would have to fallback to int $0x80?

Comment 5 Larry Woodman 2012-09-13 15:13:16 UTC
Sorry but I dont understand what the problem is here.  


In RHEL5 we have:
----------------------------------------------------------------
        if (exec_shield != 0) {
#ifdef CONFIG_HIGHMEM64G   /* NX implies PAE */
                if (!test_bit(X86_FEATURE_NX, c->x86_capability))
#endif
                clear_bit(X86_FEATURE_SEP, c->x86_capability);
        }
----------------------------------------------------------------

In RHEL6 we have:
----------------------------------------------------------------
        if (exec_shield != 0) {
#ifdef CONFIG_X86_PAE
                if (!test_cpu_cap(c, X86_FEATURE_NX))
#endif
                        clear_cpu_cap(c, X86_FEATURE_SEP);
        }
----------------------------------------------------------------

In RHEL5 CONFIG_HIGHMEM64G is set in x86 only and in RHEL6 CONFIG_X86_PAE is set in x86 only.  So the functionality should be the same for x86 & x86_64 in both cases, no?

Larry

Comment 6 Paolo Bonzini 2012-09-13 15:18:32 UTC
> In RHEL5 CONFIG_HIGHMEM64G is set in x86 only and in RHEL6 CONFIG_X86_PAE is 
> set in x86 only.  So the functionality should be the same for x86 & x86_64 in 
> both cases, no?

The snippet you quoted for RHEL5 is not compiled for x86_64, only i386.  See comment 2.

Comment 7 Larry Woodman 2012-09-13 15:24:46 UTC
So the whole RHEL6 snipit should be this so we only do this for x86?:

----------------------------------------------------------------
#ifdef CONFIG_X86_PAE
        if (exec_shield != 0) {
                if (!test_cpu_cap(c, X86_FEATURE_NX))
                        clear_cpu_cap(c, X86_FEATURE_SEP);
        }
#endif
----------------------------------------------------------------

Larry

Comment 8 Paolo Bonzini 2012-09-13 15:26:28 UTC
Yes, that should do it.

Comment 9 RHEL Program Management 2012-09-21 17:11:07 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 12 Jarod Wilson 2012-10-01 17:14:57 UTC
Patch(es) available on kernel-2.6.32-315.el6

Comment 16 Petr Beňas 2012-10-04 09:21:10 UTC
Reproduced in 2.6.32-313.el6.x86_64 and verified in 2.6.32-314.el6.x86_64.

Comment 18 errata-xmlrpc 2013-02-21 06:12:47 UTC
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.

http://rhn.redhat.com/errata/RHSA-2013-0496.html


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