Bug 203123 - MPX is broken
Summary: MPX is broken
Status: RESOLVED OBSOLETE
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-01 13:26 UTC by H.J. Lu
Modified: 2020-09-05 16:34 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.20
Tree: Mainline
Regression: No


Attachments

Description H.J. Lu 2019-04-01 13:26:03 UTC
On machines with MPX, gcc/testsuite/gcc.target/i386/mpx/memmove-1.c
from GCC 8 failed under kernel 4.20:

[hjl@gnu-skl-1 tmp]$ gcc -fcheck-pointer-bounds -mmpx /export/gnu/import/git/sources/gcc-release/gcc/testsuite/gcc.target/i386/mpx/memmove-1.c
[hjl@gnu-skl-1 tmp]$ ./a.out 
Segmentation fault
[hjl@gnu-skl-1 tmp]$ 

[   75.636402] BUG: Bad rss-counter state mm:000000002cc54919 idx:0 val:328
[   75.636431] BUG: Bad rss-counter state mm:000000002cc54919 idx:1 val:28
[   75.636453] BUG: non-zero pgtables_bytes on freeing mm: 24576
Comment 1 Dave Hansen 2019-04-01 14:41:58 UTC
Here's a fix:

http://lkml.kernel.org/r/20190401141549.3F4721FE@viggo.jf.intel.com

Testing would be appreciated.
Comment 2 H.J. Lu 2019-04-01 18:40:35 UTC
This is triggered by

commit dd2283f2605e3b3e9c61bcae844b34f2afa4813f
Author: Yang Shi <yang.shi@linux.alibaba.com>
Date:   Fri Oct 26 15:07:11 2018 -0700

    mm: mmap: zap pages with read mmap_sem in munmap
Comment 3 H.J. Lu 2019-04-01 18:40:59 UTC
(In reply to Dave Hansen from comment #1)
> Here's a fix:
> 
> http://lkml.kernel.org/r/20190401141549.3F4721FE@viggo.jf.intel.com
> 
> Testing would be appreciated.

Yes, it did fix the problem.
Comment 4 H.J. Lu 2020-09-05 16:34:44 UTC
MPX has been deprecated.

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