[Bug][CLX]assertion failure with util_range_rw using libpmemlog, possible kernel DAX bug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
intel |
Fix Released
|
Medium
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Medium
|
Joseph Salisbury |
Bug Description
Description:
On Mon, Apr 16, 2018 at 8:20 AM, Czurylo, Krzysztof
<email address hidden> wrote:
>
> I suspect the problem is caused by a bug in the kernel.
>
> I did a few experiments and it looks like the issue occurs only if the
> filesystem is mounted with "-o dax". I can reproduce is both for xfs
> and ext4, so it's not FS-specific, but rather DAX-specific. It also
> reproduces on an emulated PMEM - no need to use real AEP DIMMs.
>
> Using the latest kernel (4.16.0) does not help.
>
> What happens:
>
> In debug version of libpmemlog (but also libpmemblk), the entire pool
> is by default write-protected with mprotect(..., PROT_READ).
>
> When the program attempts to write some data to the pool (i.e.
> pmemlog_append, pmemblk_write, ...), the library unprotects the pages
> to be modified (usually just one or two pages) and once the data is
> stored, the pages are protected again.
>
> Inside the kernel, mprotect splits the memory region associated with
> the pool into 3 regions: the read-only head and tail + one r/w page in
> the middle.
>
> The problem is that after the last step, the memory region associated
> with the modified page is not merged with the adjacent regions having
> the same protection flags (ro) to form one big read-only region again.
> This leads to the situation where we have thousands of 4K memory
> mappings per process that are tracked by the kernel separately. When
> the number of maps exceeds the limit (default is 65536 - see:
> /proc/sys/
> the program.
Commitid: e1fb4a0864958fa
dax: remove VM_MIXEDMAP for fsdax and device dax
Target Kernel: 4.19
Target Release: 18.10
CVE References
information type: | Public → Private |
Changed in intel: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in ubuntu: | |
importance: | Undecided → Medium |
status: | New → Triaged |
affects: | ubuntu → linux (Ubuntu) |
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Committed |
information type: | Private → Public |
Changed in intel: | |
status: | Triaged → Fix Released |
tags: |
added: kernel-fixup-verification-needed-bionic removed: verification-needed-bionic |
tags: | added: verification-needed-bionic |
tags: | added: cscc |
this patch is not in 4.18.
If possible, please cherry pick it into Ubuntu 18.10. Thanks