public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3] syscalls/mmap17.c: Add new regression test
Date: Wed, 4 Apr 2018 16:31:57 +0200	[thread overview]
Message-ID: <20180404143157.GA30264@rei> (raw)
In-Reply-To: <1519284767-1758-1-git-send-email-yangx.jy@cn.fujitsu.com>

Hi!
> We add a regression test to check if mmap() can't map invalid physical
> addresses.  If mmap() maps /dev/mem offsets outside of the addressable
> limits of a system, setting reserved bits corrupts the page table and
> may trigger a kernel crash.

I wonder if we can address Jan's comment and make it more generic by
trying to mmap a certain sequence of offsets in /dev/mem and either
expect them to return a valid pointer or fail with MAP_FAILED. We would
have to make sure that we got the 1ULL<<phys_addr_bits there for the x86
case but we wouldn't have to skip the test on non-x86 hardware.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2018-04-04 14:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 10:03 [LTP] [PATCH] syscalls/mmap17.c: Add new regression test Xiao Yang
2018-02-02 10:20 ` Jan Stancek
2018-02-05 10:45   ` Xiao Yang
2018-02-05 11:42     ` Jan Stancek
2018-02-06  6:41       ` Xiao Yang
2018-02-06 19:53         ` Jan Stancek
2018-02-06 21:15           ` Jan Stancek
2018-02-07 12:05             ` Xiao Yang
2018-02-11 21:47               ` Jan Stancek
2018-02-14  7:34                 ` Xiao Yang
2018-02-22  7:32                 ` [LTP] [PATCH v3] " Xiao Yang
2018-04-04 14:31                   ` Cyril Hrubis [this message]
2019-04-16 10:42                     ` xuyang
2018-02-06  6:43       ` [LTP] [PATCH v2] " Xiao Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180404143157.GA30264@rei \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox