Announcement

Collapse
No announcement yet.

Page Table Check Feature Merged For Linux 5.17 To Help Fight Memory Corruption

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Page Table Check Feature Merged For Linux 5.17 To Help Fight Memory Corruption

    Phoronix: Page Table Check Feature Merged For Linux 5.17 To Help Fight Memory Corruption

    Merged into Linux 5.17 this weekend is the Google-developed Page Table Check feature that can help combat some forms of memory corruption...

    https://www.phoronix.com/scan.php?pa...ge-Table-Check

  • #2
    Would be great if screenshots of text were saved as PNG opposed to JPEG.

    Code:
    ================
    Page Table Check
    ================
    
    Introduction
    ============
    
    Page table check allows to hardern the kernel by ensuring that some types of
    the memory corruptions are prevented.
    
    Page table check performs extra verifications at the time when new pages become
    accessible from the userspace by getting their page table entries (PTEs PMDs
    etc.) added into the table.
    
    In case of detected corruption, the kernel is crashed. There is a small
    performance and memory overhead associated with the page table check. Therefore,
    it is disabled by default, but can be optionally enabled on systems where the
    extra hardening outweighs the performance costs. Also, because page table check
    is synchronous, it can help with debugging double map memory corruption issues,
    by crashing kernel at the time wrong mapping occurs instead of later which is
    often the case with memory corruptions bugs.
    
    Double mapping detection logic
    ==============================
    
    +-------------------+-------------------+-------------------+------------------+
    | Current Mapping   | New mapping       | Permissions       | Rule             |
    +===================+===================+===================+==================+
    | Anonymous         | Anonymous         | Read              | Allow            |
    +-------------------+-------------------+-------------------+------------------+
    | Anonymous         | Anonymous         | Read / Write      | Prohibit         |
    +-------------------+-------------------+-------------------+------------------+
    | Anonymous         | Named             | Any               | Prohibit         |
    +-------------------+-------------------+-------------------+------------------+
    | Named             | Anonymous         | Any               | Prohibit         |
    +-------------------+-------------------+-------------------+------------------+
    | Named             | Named             | Any               | Allow            |
    +-------------------+-------------------+-------------------+------------------+
    
    Enabling Page Table Check
    =========================
    
    Build kernel with:
    
    - PAGE_TABLE_CHECK=y
      Note, it can only be enabled on platforms where ARCH_SUPPORTS_PAGE_TABLE_CHECK
      is available.
    
    - Boot with 'page_table_check=on' kernel parameter.
    
    Optionally, build kernel with PAGE_TABLE_CHECK_ENFORCED in order to have page
    table support without extra kernel parameter.

    Comment


    • #3
      Originally posted by birdie View Post
      screenshots of text
      That drives me mad every time I see it. WTF is wrong with you people ...


      Comment


      • #4
        Originally posted by pegasus View Post
        That drives me mad every time I see it. WTF is wrong with you people ...

        I'm not sure average people deserve the blame. First, JPEG isn't as universal as it could have been, secondly PNG was too late to the party, lastly, too many applications save to JPEG by default. It's only in the 00s or even tens that we started to have picture formats which work with pretty much any data, i.e. WEBP, JPEG XL, JPEG 2000. And then you can misuse even them by setting the compression level too high.

        Comment


        • #5
          Originally posted by pegasus View Post
          That drives me mad every time I see it. WTF is wrong with you people ...

          Yeah. Couldn't the thumbnail be a person checking sheets (pages) on a table?

          Comment


          • #6
            Originally posted by birdie View Post
            I'm not sure average people deserve the blame. First, JPEG isn't as universal as it could have been, secondly PNG was too late to the party,
            I think the point wasn't JPEG vs. PNG. And even for limited-palette images, I often find that a reasonable-looking JPEG yields a smaller file than even 8-bit PNG.

            Comment


            • #7
              Is there significant performance cost to this?

              Comment


              • #8
                Originally posted by geearf View Post
                Is there significant performance cost to this?
                That's what the article says. Maybe someone will benchmark it, for us.

                Comment


                • #9
                  Originally posted by coder View Post
                  That's what the article says. Maybe someone will benchmark it, for us.
                  Hopefully.

                  Comment

                  Working...
                  X