Loading Documentation/x86/pat.txt +32 −0 Original line number Diff line number Diff line Loading @@ -196,3 +196,35 @@ Another, more verbose way of getting PAT related debug messages is with "debugpat" boot parameter. With this parameter, various debug messages are printed to dmesg log. PAT Initialization ------------------ The following table describes how PAT is initialized under various configurations. The PAT MSR must be updated by Linux in order to support WC and WT attributes. Otherwise, the PAT MSR has the value programmed in it by the firmware. Note, Xen enables WC attribute in the PAT MSR for guests. MTRR PAT Call Sequence PAT State PAT MSR ========================================================= E E MTRR -> PAT init Enabled OS E D MTRR -> PAT init Disabled - D E MTRR -> PAT disable Disabled BIOS D D MTRR -> PAT disable Disabled - - np/E PAT -> PAT disable Disabled BIOS - np/D PAT -> PAT disable Disabled - E !P/E MTRR -> PAT init Disabled BIOS D !P/E MTRR -> PAT disable Disabled BIOS !M !P/E MTRR stub -> PAT disable Disabled BIOS Legend ------------------------------------------------ E Feature enabled in CPU D Feature disabled/unsupported in CPU np "nopat" boot option specified !P CONFIG_X86_PAT option unset !M CONFIG_MTRR option unset Enabled PAT state set to enabled Disabled PAT state set to disabled OS PAT initializes PAT MSR with OS setting BIOS PAT keeps PAT MSR with BIOS setting Makefile +1 −1 Original line number Diff line number Diff line VERSION = 4 PATCHLEVEL = 4 SUBLEVEL = 17 SUBLEVEL = 18 EXTRAVERSION = NAME = Blurry Fish Butt Loading arch/arm/kernel/sys_oabi-compat.c +7 −1 Original line number Diff line number Diff line Loading @@ -279,8 +279,12 @@ asmlinkage long sys_oabi_epoll_wait(int epfd, mm_segment_t fs; long ret, err, i; if (maxevents <= 0 || maxevents > (INT_MAX/sizeof(struct epoll_event))) if (maxevents <= 0 || maxevents > (INT_MAX/sizeof(*kbuf)) || maxevents > (INT_MAX/sizeof(*events))) return -EINVAL; if (!access_ok(VERIFY_WRITE, events, sizeof(*events) * maxevents)) return -EFAULT; kbuf = kmalloc(sizeof(*kbuf) * maxevents, GFP_KERNEL); if (!kbuf) return -ENOMEM; Loading Loading @@ -317,6 +321,8 @@ asmlinkage long sys_oabi_semtimedop(int semid, if (nsops < 1 || nsops > SEMOPM) return -EINVAL; if (!access_ok(VERIFY_READ, tsops, sizeof(*tsops) * nsops)) return -EFAULT; sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL); if (!sops) return -ENOMEM; Loading arch/mips/kernel/scall64-n32.S +1 −1 Original line number Diff line number Diff line Loading @@ -344,7 +344,7 @@ EXPORT(sysn32_call_table) PTR sys_ni_syscall /* available, was setaltroot */ PTR sys_add_key PTR sys_request_key PTR sys_keyctl /* 6245 */ PTR compat_sys_keyctl /* 6245 */ PTR sys_set_thread_area PTR sys_inotify_init PTR sys_inotify_add_watch Loading arch/mips/kernel/scall64-o32.S +1 −1 Original line number Diff line number Diff line Loading @@ -500,7 +500,7 @@ EXPORT(sys32_call_table) PTR sys_ni_syscall /* available, was setaltroot */ PTR sys_add_key /* 4280 */ PTR sys_request_key PTR sys_keyctl PTR compat_sys_keyctl PTR sys_set_thread_area PTR sys_inotify_init PTR sys_inotify_add_watch /* 4285 */ Loading Loading
Documentation/x86/pat.txt +32 −0 Original line number Diff line number Diff line Loading @@ -196,3 +196,35 @@ Another, more verbose way of getting PAT related debug messages is with "debugpat" boot parameter. With this parameter, various debug messages are printed to dmesg log. PAT Initialization ------------------ The following table describes how PAT is initialized under various configurations. The PAT MSR must be updated by Linux in order to support WC and WT attributes. Otherwise, the PAT MSR has the value programmed in it by the firmware. Note, Xen enables WC attribute in the PAT MSR for guests. MTRR PAT Call Sequence PAT State PAT MSR ========================================================= E E MTRR -> PAT init Enabled OS E D MTRR -> PAT init Disabled - D E MTRR -> PAT disable Disabled BIOS D D MTRR -> PAT disable Disabled - - np/E PAT -> PAT disable Disabled BIOS - np/D PAT -> PAT disable Disabled - E !P/E MTRR -> PAT init Disabled BIOS D !P/E MTRR -> PAT disable Disabled BIOS !M !P/E MTRR stub -> PAT disable Disabled BIOS Legend ------------------------------------------------ E Feature enabled in CPU D Feature disabled/unsupported in CPU np "nopat" boot option specified !P CONFIG_X86_PAT option unset !M CONFIG_MTRR option unset Enabled PAT state set to enabled Disabled PAT state set to disabled OS PAT initializes PAT MSR with OS setting BIOS PAT keeps PAT MSR with BIOS setting
Makefile +1 −1 Original line number Diff line number Diff line VERSION = 4 PATCHLEVEL = 4 SUBLEVEL = 17 SUBLEVEL = 18 EXTRAVERSION = NAME = Blurry Fish Butt Loading
arch/arm/kernel/sys_oabi-compat.c +7 −1 Original line number Diff line number Diff line Loading @@ -279,8 +279,12 @@ asmlinkage long sys_oabi_epoll_wait(int epfd, mm_segment_t fs; long ret, err, i; if (maxevents <= 0 || maxevents > (INT_MAX/sizeof(struct epoll_event))) if (maxevents <= 0 || maxevents > (INT_MAX/sizeof(*kbuf)) || maxevents > (INT_MAX/sizeof(*events))) return -EINVAL; if (!access_ok(VERIFY_WRITE, events, sizeof(*events) * maxevents)) return -EFAULT; kbuf = kmalloc(sizeof(*kbuf) * maxevents, GFP_KERNEL); if (!kbuf) return -ENOMEM; Loading Loading @@ -317,6 +321,8 @@ asmlinkage long sys_oabi_semtimedop(int semid, if (nsops < 1 || nsops > SEMOPM) return -EINVAL; if (!access_ok(VERIFY_READ, tsops, sizeof(*tsops) * nsops)) return -EFAULT; sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL); if (!sops) return -ENOMEM; Loading
arch/mips/kernel/scall64-n32.S +1 −1 Original line number Diff line number Diff line Loading @@ -344,7 +344,7 @@ EXPORT(sysn32_call_table) PTR sys_ni_syscall /* available, was setaltroot */ PTR sys_add_key PTR sys_request_key PTR sys_keyctl /* 6245 */ PTR compat_sys_keyctl /* 6245 */ PTR sys_set_thread_area PTR sys_inotify_init PTR sys_inotify_add_watch Loading
arch/mips/kernel/scall64-o32.S +1 −1 Original line number Diff line number Diff line Loading @@ -500,7 +500,7 @@ EXPORT(sys32_call_table) PTR sys_ni_syscall /* available, was setaltroot */ PTR sys_add_key /* 4280 */ PTR sys_request_key PTR sys_keyctl PTR compat_sys_keyctl PTR sys_set_thread_area PTR sys_inotify_init PTR sys_inotify_add_watch /* 4285 */ Loading