From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/4] lib/get_high_address.c: Add tst_get_high_address.h for new API
Date: Mon, 12 Feb 2018 17:22:58 +0100 [thread overview]
Message-ID: <20180212162258.GA26897@rei> (raw)
In-Reply-To: <1518163011-23322-1-git-send-email-yangx.jy@cn.fujitsu.com>
Hi!
> Make sure get_high_address() can be used by new API.
I would he happier if we created better API for the new library. If
nothing else the function name is poorly choosen.
I would suggest naming it as tst_get_bad_addr() which better explains
what the return value.
Also looking at the code we seem to use several different ways of
triggering EFAULT:
* (void*)-1;
* get_high_address() which is sbrk(0) + 4 * PAGE_SIZE
* mmap() with PROT_NONE
I gueess that we may as well unify on one of these, all of them should
work but I suppose that mmap() with PROT_NONE would be safest bet here.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2018-02-12 16:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-09 7:56 [LTP] [PATCH 1/4] lib/get_high_address.c: Add tst_get_high_address.h for new API Xiao Yang
2018-02-09 7:56 ` [LTP] [PATCH 2/4] syscalls/unlink05, 06: Cleanup && Convert to " Xiao Yang
2018-02-09 7:56 ` [LTP] [PATCH 3/4] syscalls/unlink07: " Xiao Yang
2018-02-09 7:56 ` [LTP] [PATCH 4/4] syscalls/unlink08: " Xiao Yang
2018-02-12 16:22 ` Cyril Hrubis [this message]
2018-02-13 8:41 ` [LTP] [PATCH v2 1/5] syscalls/mremap03: Do not pass MAP_FAILED into mremap() Xiao Yang
2018-02-13 8:41 ` [LTP] [PATCH v2 2/5] lib/get_high_address.c: Add tst_get_bad_addr.h for new API Xiao Yang
2018-02-13 13:42 ` Cyril Hrubis
2018-02-14 6:19 ` [LTP] [PATCH v3 1/4] " Xiao Yang
2018-02-14 6:19 ` [LTP] [PATCH v3 2/4] syscalls/unlink05, 06: Cleanup && Convert to " Xiao Yang
2018-02-14 6:19 ` [LTP] [PATCH v3 3/4] syscalls/unlink07: " Xiao Yang
2018-02-14 6:19 ` [LTP] [PATCH v3 4/4] syscalls/unlink08: " Xiao Yang
2018-02-20 16:08 ` [LTP] [PATCH v3 1/4] lib/get_high_address.c: Add tst_get_bad_addr.h for " Cyril Hrubis
2018-02-22 5:48 ` [LTP] [PATCH v4 " Xiao Yang
2018-02-22 5:48 ` [LTP] [PATCH v4 2/4] syscalls/unlink05, 06: Cleanup && Convert to " Xiao Yang
2018-02-27 10:24 ` Cyril Hrubis
2018-02-22 5:48 ` [LTP] [PATCH v4 3/4] syscalls/unlink07: " Xiao Yang
2018-02-27 10:25 ` Cyril Hrubis
2018-02-22 5:48 ` [LTP] [PATCH v4 4/4] syscalls/unlink08: " Xiao Yang
2018-02-27 10:26 ` Cyril Hrubis
2018-02-27 10:23 ` [LTP] [PATCH v4 1/4] lib/get_high_address.c: Add tst_get_bad_addr.h for " Cyril Hrubis
2018-02-13 8:41 ` [LTP] [PATCH v2 3/5] syscalls/unlink05, 06: Cleanup && Convert to " Xiao Yang
2018-02-13 8:41 ` [LTP] [PATCH v2 4/5] syscalls/unlink07: " Xiao Yang
2018-02-13 8:41 ` [LTP] [PATCH v2 5/5] syscalls/unlink08: " Xiao Yang
2018-02-13 13:04 ` [LTP] [PATCH v2 1/5] syscalls/mremap03: Do not pass MAP_FAILED into mremap() Cyril Hrubis
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=20180212162258.GA26897@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