complete test-amd64-amd64-xl-pvh-intel
branch xen-unstable
xenbranch xen-unstable
job test-amd64-amd64-xl-pvh-intel
testid xen-boot
Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git
Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git
Tree: qemuu git://xenbits.xen.org/qemu-xen.git
Tree: xen git://xenbits.xen.org/xen.git
*** Found and reproduced problem changeset ***
Bug is in tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Bug introduced: 639ab3eb38c6e92e27e061551dddee6dd3bbb5d2
Bug not present: 4302d506d5f3419109abdd0d6e400ed6e8148209
Last fail repro: http://logs.test-lab.xenproject.org/osstest/logs/63895/
commit 639ab3eb38c6e92e27e061551dddee6dd3bbb5d2
Merge: 4302d50 e1a5832
Author: Linus Torvalds <[email protected]>
Date: Tue Nov 3 21:23:56 2015 -0800
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm changes from Ingo Molnar:
"The main changes are: continued PAT work by Toshi Kani, plus a new
boot time warning about insecure RWX kernel mappings, by Stephen Smalley.
The new CONFIG_DEBUG_WX=y warning is marked default-y if CONFIG_DEBUG_RODATA=y is already eanbled, as a special exception, as these bugs are hard to notice and this check already found several live bugs"
* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Warn on W^X mappings
x86/mm: Fix no-change case in try_preserve_large_page() x86/mm: Fix __split_large_page() to handle large PAT bit x86/mm: Fix try_preserve_large_page() to handle large PAT bit x86/mm: Fix gup_huge_p?d() to handle large PAT bit
x86/mm: Fix slow_virt_to_phys() to handle large PAT bit x86/mm: Fix page table dump to show PAT bit
x86/asm: Add pud_pgprot() and pmd_pgprot()
x86/asm: Fix pud/pmd interfaces to handle large PAT bit x86/asm: Add pud/pmd mask interfaces to handle large PAT bit x86/asm: Move PUD_PAGE macros to page_types.h
x86/vdso32: Define PGTABLE_LEVELS to 32bit VDSO
commit e1a58320a38dfa72be48a0f1a3a92273663ba6db
Author: Stephen Smalley <[email protected]>
Date: Mon Oct 5 12:55:20 2015 -0400
x86/mm: Warn on W^X mappings
Warn on any residual W+X mappings after setting NX if DEBUG_WX is enabled. Introduce a separate X86_PTDUMP_CORE config that enables the code for dumping the page tables without enabling the debugfs interface, so that DEBUG_WX can be enabled without exposing the debugfs interface. Switch EFI_PGT_DUMP to using X86_PTDUMP_CORE so that it also does not require enabling the debugfs interface.
On success it prints this to the kernel log:
x86/mm: Checked W+X mappings: passed, no W+X pages found.
On failure it prints a warning and a count of the failed pages:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 1 at arch/x86/mm/dump_pagetables.c:226 note_page+0x610/0x7b0() x86/mm: Found insecure W+X mapping at address ffffffff81755000/__stop___ex_table+0xfa8/0xabfa8 [...]
Call Trace:
[<ffffffff81380a5f>] dump_stack+0x44/0x55
[<ffffffff8109d3f2>] warn_slowpath_common+0x82/0xc0
[<ffffffff8109d48c>] warn_slowpath_fmt+0x5c/0x80
[<ffffffff8106cfc9>] ? note_page+0x5c9/0x7b0
[<ffffffff8106d010>] note_page+0x610/0x7b0
[<ffffffff8106d409>] ptdump_walk_pgd_level_core+0x259/0x3c0 [<ffffffff8106d5a7>] ptdump_walk_pgd_level_checkwx+0x17/0x20 [<ffffffff81063905>] mark_rodata_ro+0xf5/0x100
[<ffffffff817415a0>] ? rest_init+0x80/0x80
[<ffffffff817415bd>] kernel_init+0x1d/0xe0
[<ffffffff8174cd1f>] ret_from_fork+0x3f/0x70
[<ffffffff817415a0>] ? rest_init+0x80/0x80
---[ end trace a1f23a1e42a2ac76 ]---
x86/mm: Checked W+X mappings: FAILED, 171 W+X pages found.
[ Improved the Kconfig help text and made the new option default-y
if CONFIG_DEBUG_RODATA=y, because it already found buggy mappings, so we really want people to have this on by default. ]
commit 38a413cbc2b2834683b21823d964bc2d2f0abb82
Merge: 55696b1 9ffecb1
Author: Ingo Molnar <[email protected]>
Date: Tue Oct 6 10:56:54 2015 +0200
Merge tag 'v4.3-rc3' into x86/mm, to pick up fixes before applying new changes
commit 55696b1f664e52b3036f21631f9c2247b667f587
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:24 2015 -0600
x86/mm: Fix no-change case in try_preserve_large_page()
try_preserve_large_page() checks if new_prot is the same as old_prot. If so, it simply sets do_split to 0, and returns with no-operation. However, old_prot is set as a 4KB pgprot value while new_prot is a large page pgprot value.
Now that old_prot is initially set from p?d_pgprot() as a large page pgprot value, fix it by not overwriting old_prot with a 4KB pgprot value.
commit d551aaa2f7e1387fa66093ce9914c2e91f283a50
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:23 2015 -0600
x86/mm: Fix __split_large_page() to handle large PAT bit
__split_large_page() is called from __change_page_attr() to change the mapping attribute by splitting a given large page into smaller pages. This function uses pte_pfn() and pte_pgprot() for PUD/PMD, which do not handle the large PAT bit properly.
Fix __split_large_page() by using the corresponding pud/pmd pfn/ pgprot interfaces.
Also remove '#ifdef CONFIG_X86_64', which is not necessary.
commit 3a19109efbfa7d887996a74257556a46e00525c2
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:22 2015 -0600
x86/mm: Fix try_preserve_large_page() to handle large PAT bit
try_preserve_large_page() is called from __change_page_attr() to change the mapping attribute of a given large page. This function uses pte_pfn() and pte_pgprot() for PUD/PMD, which do not handle the large PAT bit properly.
Fix try_preserve_large_page() by using the corresponding pud/pmd prot/pfn interfaces.
Also remove '#ifdef CONFIG_X86_64', which is not necessary.
commit daf3e35c5888e8bd6a2f5ed15ed392b2df362ecf
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:21 2015 -0600
x86/mm: Fix gup_huge_p?d() to handle large PAT bit
gup_huge_pud() and gup_huge_pmd() cast *pud and *pmd to *pte, and use pte_xxx() interfaces to obtain the flags and PFN. However, the pte_xxx() interface does not handle the large PAT bit properly for PUD/PMD.
Fix gup_huge_pud() and gup_huge_pmd() to use pud_xxx() and pmd_xxx() interfaces according to their type.
commit 34437e67a6727885bdf6cbfd8441b1ac43a1ee65
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:20 2015 -0600
x86/mm: Fix slow_virt_to_phys() to handle large PAT bit
slow_virt_to_phys() calls lookup_address() to obtain *pte and its level. It then calls pte_pfn() to obtain a physical address for any level. However, this physical address is not correct when the large PAT bit is set because pte_pfn() does not mask the large PAT bit properly for PUD/PMD.
Fix slow_virt_to_phys() to use pud_pfn() and pmd_pfn() for 1GB and 2MB mapping levels.
commit da25e628c4c231a281b1c1de3168a36ab9bfe473
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:19 2015 -0600
x86/mm: Fix page table dump to show PAT bit
/sys/kernel/debug/kernel_page_tables does not show the PAT bit for PUD/PMD mappings. This is because walk_pud_level(), walk_pmd_level() and note_page() mask the flags with PTE_FLAGS_MASK, which does not cover their PAT bit, _PAGE_PAT_LARGE.
Fix it by replacing the use of PTE_FLAGS_MASK with p?d_flags(), which masks the flags properly.
Also change to show the PAT bit as "PAT" to be consistent with other bits.
commit bbac8c6deadab921f4b7d00ce675ffa4f358ec7f
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:18 2015 -0600
x86/asm: Add pud_pgprot() and pmd_pgprot()
pte_pgprot() returns a pgprot_t value by calling pte_flags(). Now that pud_flags() and pmd_flags() work specifically for the pud/pmd levels, define pud_pgprot() and pmd_pgprot() for PUD/PMD.
Also update pte_pgprot() to remove the unnecessary mask with PTE_FLAGS_MASK as pte_flags() takes care of it.
commit f70abb0fc3da1b2945c92751ccda2744081bf2b7
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:17 2015 -0600
x86/asm: Fix pud/pmd interfaces to handle large PAT bit
Now that we have pud/pmd mask interfaces, which handle pfn & flags mask properly for the large PAT bit.
Fix pud/pmd pfn & flags interfaces by replacing PTE_PFN_MASK and PTE_FLAGS_MASK with the pud/pmd mask interfaces.
commit 4be4c1fb9a754b100466ebaec50f825be0b2050b
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:16 2015 -0600
x86/asm: Add pud/pmd mask interfaces to handle large PAT bit
The PAT bit gets relocated to bit 12 when PUD and PMD mappings are used. This bit 12, however, is not covered by PTE_FLAGS_MASK, which is used for masking pfn and flags for all levels.
Add pud/pmd mask interfaces to handle pfn and flags properly by using P?D_PAGE_MASK when PUD/PMD mappings are used, i.e. PSE bit is set.
commit 832102671855f73962e7a04fdafd48b9385ea5c6
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:15 2015 -0600
x86/asm: Move PUD_PAGE macros to page_types.h
PUD_SHIFT is defined according to a given kernel configuration, which allows it be commonly used by any x86 kernels. However, PUD_PAGE_SIZE and PUD_PAGE_MASK, which are set from PUD_SHIFT, are defined in page_64_types.h, which can be used by 64-bit kernel only.
Move PUD_PAGE_SIZE and PUD_PAGE_MASK to page_types.h so that they can be used by any x86 kernels as well.
commit fb535ccb30845fe0b7bd09caa37a838985b72ff9
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:14 2015 -0600
x86/vdso32: Define PGTABLE_LEVELS to 32bit VDSO
In case of CONFIG_X86_64, vdso32/vclock_gettime.c fakes a 32-bit non-PAE kernel configuration by re-defining it to CONFIG_X86_32. However, it does not re-define CONFIG_PGTABLE_LEVELS leaving it as 4 levels.
This mismatch leads <asm/pgtable_type.h> to NOT include <asm-generic/ pgtable-nopud.h> and <asm-generic/pgtable-nopmd.h>, which will cause compile errors when a later patch enhances <asm/pgtable_type.h> to use PUD_SHIFT and PMD_SHIFT. These -nopud & -nopmd headers define these SHIFTs for the 32-bit non-PAE kernel.
Fix it by re-defining CONFIG_PGTABLE_LEVELS to 2 levels.
For bisection revision-tuple graph see:
http://logs.test-lab.xenproject.org/osstest/results/bisect/linux-linus/test-amd64-amd64-xl-pvh-intel.xen-boot.html
Revision IDs in each graph node refer, respectively, to the Trees above.
----------------------------------------
Running cs-bisection-step --graph-out=/home/logs/results/bisect/linux-linus/test-amd64-amd64-xl-pvh-intel.xen-boot --summary-out=tmp/63895.bisection-summary --basis-template=59254 --blessings=real,real-bisect linux-linus test-amd64-amd64-xl-pvh-intel xen-boot
Searching for failure / basis pass:
63654 fail [host=fiano0] / 63536 ok.
Failure / basis pass flights: 63654 / 63536
(tree with no url: ovmf)
(tree with no url: seabios)
Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git
Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git
Tree: qemuu git://xenbits.xen.org/qemu-xen.git
Tree: xen git://xenbits.xen.org/xen.git
Latest 2dc10ad81fc017837037e60439662e1b16bdffb9 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
Basis pass 5062ecdb662bf3aed6dc975019c53ffcd3b01d1c c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
Generating revisions with ./adhoc-revtuple-generator git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git#5062ecdb662bf3aed6dc975019c53ffcd3b01d1c-2dc10ad81fc017837037e60439662e1b16bdffb9 git://xenbits.xen.org/osstest/linux-firmware.git#c530a75c1e6a472b0eb9558310b518f0dfcd8860-c530a75c1e6a472b0eb9558310b518f0dfcd8860 git://xenbits.xen.org/qemu-xen-traditional.git#bc00cad75d8bcc3ba696992bec219c21db8406aa-bc00cad75d8bcc3ba696992bec219c21db8406aa git://xenbits.xen.org/qemu-xen.git#816609b2841297925a223ec377c336360e044ee5-816609b2841297925a223ec377c336360e044ee5 git://xenbits.xen.org/xen.git#e294a0c3af9f4443dc692b180fb1771b1cb075e8-e294a0c3af9f4443dc692b180fb1771b1cb075e8
Loaded 1088 nodes in revision graph
Searching for test results:
63536 pass 5062ecdb662bf3aed6dc975019c53ffcd3b01d1c c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63654 fail 2dc10ad81fc017837037e60439662e1b16bdffb9 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63837 pass 5062ecdb662bf3aed6dc975019c53ffcd3b01d1c c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63853 pass 4302d506d5f3419109abdd0d6e400ed6e8148209 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63842 fail 2dc10ad81fc017837037e60439662e1b16bdffb9 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63865 fail 66ef3493d4bb387f5a83915e33dc893102fd1b43 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63846 pass 53528695ff6d8b77011bc818407c13e30914a946 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63858 fail b0f85fa11aefc4f3e03306b4cd47f113bd57dcba c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63871 fail 639ab3eb38c6e92e27e061551dddee6dd3bbb5d2 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63878 pass 4302d506d5f3419109abdd0d6e400ed6e8148209 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63881 fail 639ab3eb38c6e92e27e061551dddee6dd3bbb5d2 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63891 pass 4302d506d5f3419109abdd0d6e400ed6e8148209 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
63895 fail 639ab3eb38c6e92e27e061551dddee6dd3bbb5d2 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
Searching for interesting versions
Result found: flight 63536 (pass), for basis pass
Result found: flight 63654 (fail), for basis failure
Repro found: flight 63837 (pass), for basis pass
Repro found: flight 63842 (fail), for basis failure
0 revisions at 4302d506d5f3419109abdd0d6e400ed6e8148209 c530a75c1e6a472b0eb9558310b518f0dfcd8860 bc00cad75d8bcc3ba696992bec219c21db8406aa 816609b2841297925a223ec377c336360e044ee5 e294a0c3af9f4443dc692b180fb1771b1cb075e8
No revisions left to test, checking graph state.
Result found: flight 63853 (pass), for last pass
Result found: flight 63871 (fail), for first failure
Repro found: flight 63878 (pass), for last pass
Repro found: flight 63881 (fail), for first failure
Repro found: flight 63891 (pass), for last pass
Repro found: flight 63895 (fail), for first failure
*** Found and reproduced problem changeset ***
Bug is in tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Bug introduced: 639ab3eb38c6e92e27e061551dddee6dd3bbb5d2
Bug not present: 4302d506d5f3419109abdd0d6e400ed6e8148209
Last fail repro: http://logs.test-lab.xenproject.org/osstest/logs/63895/
commit 639ab3eb38c6e92e27e061551dddee6dd3bbb5d2
Merge: 4302d50 e1a5832
Author: Linus Torvalds <[email protected]>
Date: Tue Nov 3 21:23:56 2015 -0800
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm changes from Ingo Molnar:
"The main changes are: continued PAT work by Toshi Kani, plus a new
boot time warning about insecure RWX kernel mappings, by Stephen Smalley.
The new CONFIG_DEBUG_WX=y warning is marked default-y if CONFIG_DEBUG_RODATA=y is already eanbled, as a special exception, as these bugs are hard to notice and this check already found several live bugs"
* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Warn on W^X mappings
x86/mm: Fix no-change case in try_preserve_large_page() x86/mm: Fix __split_large_page() to handle large PAT bit x86/mm: Fix try_preserve_large_page() to handle large PAT bit x86/mm: Fix gup_huge_p?d() to handle large PAT bit
x86/mm: Fix slow_virt_to_phys() to handle large PAT bit x86/mm: Fix page table dump to show PAT bit
x86/asm: Add pud_pgprot() and pmd_pgprot()
x86/asm: Fix pud/pmd interfaces to handle large PAT bit x86/asm: Add pud/pmd mask interfaces to handle large PAT bit x86/asm: Move PUD_PAGE macros to page_types.h
x86/vdso32: Define PGTABLE_LEVELS to 32bit VDSO
commit e1a58320a38dfa72be48a0f1a3a92273663ba6db
Author: Stephen Smalley <[email protected]>
Date: Mon Oct 5 12:55:20 2015 -0400
x86/mm: Warn on W^X mappings
Warn on any residual W+X mappings after setting NX if DEBUG_WX is enabled. Introduce a separate X86_PTDUMP_CORE config that enables the code for dumping the page tables without enabling the debugfs interface, so that DEBUG_WX can be enabled without exposing the debugfs interface. Switch EFI_PGT_DUMP to using X86_PTDUMP_CORE so that it also does not require enabling the debugfs interface.
On success it prints this to the kernel log:
x86/mm: Checked W+X mappings: passed, no W+X pages found.
On failure it prints a warning and a count of the failed pages:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 1 at arch/x86/mm/dump_pagetables.c:226 note_page+0x610/0x7b0() x86/mm: Found insecure W+X mapping at address ffffffff81755000/__stop___ex_table+0xfa8/0xabfa8 [...]
Call Trace:
[<ffffffff81380a5f>] dump_stack+0x44/0x55
[<ffffffff8109d3f2>] warn_slowpath_common+0x82/0xc0
[<ffffffff8109d48c>] warn_slowpath_fmt+0x5c/0x80
[<ffffffff8106cfc9>] ? note_page+0x5c9/0x7b0
[<ffffffff8106d010>] note_page+0x610/0x7b0
[<ffffffff8106d409>] ptdump_walk_pgd_level_core+0x259/0x3c0 [<ffffffff8106d5a7>] ptdump_walk_pgd_level_checkwx+0x17/0x20 [<ffffffff81063905>] mark_rodata_ro+0xf5/0x100
[<ffffffff817415a0>] ? rest_init+0x80/0x80
[<ffffffff817415bd>] kernel_init+0x1d/0xe0
[<ffffffff8174cd1f>] ret_from_fork+0x3f/0x70
[<ffffffff817415a0>] ? rest_init+0x80/0x80
---[ end trace a1f23a1e42a2ac76 ]---
x86/mm: Checked W+X mappings: FAILED, 171 W+X pages found.
[ Improved the Kconfig help text and made the new option default-y
if CONFIG_DEBUG_RODATA=y, because it already found buggy mappings, so we really want people to have this on by default. ]
commit 38a413cbc2b2834683b21823d964bc2d2f0abb82
Merge: 55696b1 9ffecb1
Author: Ingo Molnar <[email protected]>
Date: Tue Oct 6 10:56:54 2015 +0200
Merge tag 'v4.3-rc3' into x86/mm, to pick up fixes before applying new changes
commit 55696b1f664e52b3036f21631f9c2247b667f587
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:24 2015 -0600
x86/mm: Fix no-change case in try_preserve_large_page()
try_preserve_large_page() checks if new_prot is the same as old_prot. If so, it simply sets do_split to 0, and returns with no-operation. However, old_prot is set as a 4KB pgprot value while new_prot is a large page pgprot value.
Now that old_prot is initially set from p?d_pgprot() as a large page pgprot value, fix it by not overwriting old_prot with a 4KB pgprot value.
commit d551aaa2f7e1387fa66093ce9914c2e91f283a50
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:23 2015 -0600
x86/mm: Fix __split_large_page() to handle large PAT bit
__split_large_page() is called from __change_page_attr() to change the mapping attribute by splitting a given large page into smaller pages. This function uses pte_pfn() and pte_pgprot() for PUD/PMD, which do not handle the large PAT bit properly.
Fix __split_large_page() by using the corresponding pud/pmd pfn/ pgprot interfaces.
Also remove '#ifdef CONFIG_X86_64', which is not necessary.
commit 3a19109efbfa7d887996a74257556a46e00525c2
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:22 2015 -0600
x86/mm: Fix try_preserve_large_page() to handle large PAT bit
try_preserve_large_page() is called from __change_page_attr() to change the mapping attribute of a given large page. This function uses pte_pfn() and pte_pgprot() for PUD/PMD, which do not handle the large PAT bit properly.
Fix try_preserve_large_page() by using the corresponding pud/pmd prot/pfn interfaces.
Also remove '#ifdef CONFIG_X86_64', which is not necessary.
commit daf3e35c5888e8bd6a2f5ed15ed392b2df362ecf
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:21 2015 -0600
x86/mm: Fix gup_huge_p?d() to handle large PAT bit
gup_huge_pud() and gup_huge_pmd() cast *pud and *pmd to *pte, and use pte_xxx() interfaces to obtain the flags and PFN. However, the pte_xxx() interface does not handle the large PAT bit properly for PUD/PMD.
Fix gup_huge_pud() and gup_huge_pmd() to use pud_xxx() and pmd_xxx() interfaces according to their type.
commit 34437e67a6727885bdf6cbfd8441b1ac43a1ee65
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:20 2015 -0600
x86/mm: Fix slow_virt_to_phys() to handle large PAT bit
slow_virt_to_phys() calls lookup_address() to obtain *pte and its level. It then calls pte_pfn() to obtain a physical address for any level. However, this physical address is not correct when the large PAT bit is set because pte_pfn() does not mask the large PAT bit properly for PUD/PMD.
Fix slow_virt_to_phys() to use pud_pfn() and pmd_pfn() for 1GB and 2MB mapping levels.
commit da25e628c4c231a281b1c1de3168a36ab9bfe473
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:19 2015 -0600
x86/mm: Fix page table dump to show PAT bit
/sys/kernel/debug/kernel_page_tables does not show the PAT bit for PUD/PMD mappings. This is because walk_pud_level(), walk_pmd_level() and note_page() mask the flags with PTE_FLAGS_MASK, which does not cover their PAT bit, _PAGE_PAT_LARGE.
Fix it by replacing the use of PTE_FLAGS_MASK with p?d_flags(), which masks the flags properly.
Also change to show the PAT bit as "PAT" to be consistent with other bits.
commit bbac8c6deadab921f4b7d00ce675ffa4f358ec7f
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:18 2015 -0600
x86/asm: Add pud_pgprot() and pmd_pgprot()
pte_pgprot() returns a pgprot_t value by calling pte_flags(). Now that pud_flags() and pmd_flags() work specifically for the pud/pmd levels, define pud_pgprot() and pmd_pgprot() for PUD/PMD.
Also update pte_pgprot() to remove the unnecessary mask with PTE_FLAGS_MASK as pte_flags() takes care of it.
commit f70abb0fc3da1b2945c92751ccda2744081bf2b7
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:17 2015 -0600
x86/asm: Fix pud/pmd interfaces to handle large PAT bit
Now that we have pud/pmd mask interfaces, which handle pfn & flags mask properly for the large PAT bit.
Fix pud/pmd pfn & flags interfaces by replacing PTE_PFN_MASK and PTE_FLAGS_MASK with the pud/pmd mask interfaces.
commit 4be4c1fb9a754b100466ebaec50f825be0b2050b
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:16 2015 -0600
x86/asm: Add pud/pmd mask interfaces to handle large PAT bit
The PAT bit gets relocated to bit 12 when PUD and PMD mappings are used. This bit 12, however, is not covered by PTE_FLAGS_MASK, which is used for masking pfn and flags for all levels.
Add pud/pmd mask interfaces to handle pfn and flags properly by using P?D_PAGE_MASK when PUD/PMD mappings are used, i.e. PSE bit is set.
commit 832102671855f73962e7a04fdafd48b9385ea5c6
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:15 2015 -0600
x86/asm: Move PUD_PAGE macros to page_types.h
PUD_SHIFT is defined according to a given kernel configuration, which allows it be commonly used by any x86 kernels. However, PUD_PAGE_SIZE and PUD_PAGE_MASK, which are set from PUD_SHIFT, are defined in page_64_types.h, which can be used by 64-bit kernel only.
Move PUD_PAGE_SIZE and PUD_PAGE_MASK to page_types.h so that they can be used by any x86 kernels as well.
commit fb535ccb30845fe0b7bd09caa37a838985b72ff9
Author: Toshi Kani <[email protected]>
Date: Thu Sep 17 12:24:14 2015 -0600
x86/vdso32: Define PGTABLE_LEVELS to 32bit VDSO
In case of CONFIG_X86_64, vdso32/vclock_gettime.c fakes a 32-bit non-PAE kernel configuration by re-defining it to CONFIG_X86_32. However, it does not re-define CONFIG_PGTABLE_LEVELS leaving it as 4 levels.
This mismatch leads <asm/pgtable_type.h> to NOT include <asm-generic/ pgtable-nopud.h> and <asm-generic/pgtable-nopmd.h>, which will cause compile errors when a later patch enhances <asm/pgtable_type.h> to use PUD_SHIFT and PMD_SHIFT. These -nopud & -nopmd headers define these SHIFTs for the 32-bit non-PAE kernel.
Fix it by re-defining CONFIG_PGTABLE_LEVELS to 2 levels.
Revision graph left in /home/logs/results/bisect/linux-linus/test-amd64-amd64-xl-pvh-intel.xen-boot.{dot,ps,png,html,svg}.
----------------------------------------
63895: tolerable ALL FAIL
flight 63895 linux-linus real-bisect [real]
http://logs.test-lab.xenproject.org/osstest/logs/63895/
Failures :-/ but no regressions.
Tests which did not succeed,
including tests which could not be run:
test-amd64-amd64-xl-pvh-intel 6 xen-boot fail baseline untested
jobs:
test-amd64-amd64-xl-pvh-intel fail
------------------------------------------------------------
sg-report-flight on osstest.test-lab.xenproject.org
logs: /home/logs/logs
images: /home/logs/images
Logs, config files, etc. are available at
http://logs.test-lab.xenproject.org/osstest/logs
Explanation of these reports, and of osstest in general, is at
http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README.email;hb=master
http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README;hb=master
Test harness code can be found at
http://xenbits.xen.org/gitweb?p=osstest.git;a=summary