Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   jym
Date:           Sun Apr 18 23:47:52 UTC 2010

Modified Files:
        src/sys/arch/amd64/amd64: locore.S machdep.c mptramp.S procfs_machdep.c
        src/sys/arch/i386/i386: genassym.cf machdep.c procfs_machdep.c
        src/sys/arch/i386/isa: npx.c
        src/sys/arch/x86/include: cpu.h cpuvar.h mpbiosreg.h specialreg.h
        src/sys/arch/x86/x86: cpu.c cpu_topology.c identcpu.c mpbios.c patch.c
            pmap.c tsc.c via_padlock.c x86_machdep.c
        src/sys/arch/xen/x86: cpu.c
        src/sys/compat/linux32/arch/amd64: linux32_exec.h
        src/sys/compat/linux32/common: linux32_exec_elf32.c

Log Message:
This patch fixes the NX regression issue observed on amd64 kernels, where
per-page execution right was disabled (therefore leading to the inability
of the kernel to detect fraudulent use of memory mappings marked as not
being executable).

- replace cpu_feature and ci_feature_flags variables by cpu_feature and
ci_feat_val arrays. This makes it cleaner and brings kernel code closer
to the design of cpuctl(8). A warning will be raised for each CPU that
does not expose the same features as the Boot Processor (BP).

- the blacklist of CPU features is now a macro defined in the
specialreg.h header, instead of hardcoding it inside MD initialization
code; fix comments.

- replace checks against CPUID_TSC with the cpu_hascounter() function.

- clean up the code in init_x86_64(), as cpu_feature variables are set
inside cpu_probe().

- use cpu_init_msrs() for i386. It will be eventually used later for NX
feature under i386 PAE kernels.

- remove code that checks for CPUID_NOX in amd64 mptramp.S, this is already
performed by cpu_hatch() through cpu_init_msrs().

- remove cpu_signature and feature_flags members from struct mpbios_proc
(they were never used).

This patch was tested with i386 MONOLITHIC, XEN3PAE_DOM0 and XEN3_DOM0 under
a native i386 host, and amd64 GENERIC, XEN3_DOM0 via QEMU virtual machines.

XXX Should kernel rev be bumped?

XXX A similar patch should be pulled-up for NetBSD-5, hopefully tomorrow.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/amd64/amd64/locore.S
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/amd64/amd64/mptramp.S
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/amd64/amd64/procfs_machdep.c
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/i386/i386/genassym.cf
cvs rdiff -u -r1.684 -r1.685 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/i386/i386/procfs_machdep.c
cvs rdiff -u -r1.135 -r1.136 src/sys/arch/i386/isa/npx.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x86/include/cpuvar.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/mpbiosreg.h
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/x86/cpu_topology.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x86/x86/identcpu.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/x86/x86/mpbios.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x86/x86/patch.c
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x86/x86/tsc.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x86/x86/via_padlock.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/x86/x86/x86_machdep.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/xen/x86/cpu.c
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/linux32/arch/amd64/linux32_exec.h
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/linux32/common/linux32_exec_elf32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index