public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] mlock_8-1, munlock_10-1: don't use LONG_MAX as invalid pointer
Date: Fri, 18 Oct 2019 15:37:33 +0200	[thread overview]
Message-ID: <20191018133733.GA31681@dell5510> (raw)
In-Reply-To: <2e51e5453562001b5b6992ccc897d9177e6673ca.1571053661.git.jstancek@redhat.com>

Hi Jan,

> arm64 kernel with commit 057d3389108e ("mm: untag user pointers passed to
> memory syscalls") will assume this is tagged user pointer and will
> attempt to clear first byte. This leads to test hitting different error
> (EINVAL instead of ENOMEM).

> Add a helper function which provides invalid/unused pointer from user
> address space.

> Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Agree with Cyril points (double underscores at the beginning are reserved for
libc and putting very brief info at get_invalid_ptr(().

Kind regards,
Petr

  parent reply	other threads:[~2019-10-18 13:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 12:42 [LTP] [PATCH] mlock_8-1, munlock_10-1: don't use LONG_MAX as invalid pointer Jan Stancek
2019-10-14 12:50 ` Cyril Hrubis
2019-10-18 13:37 ` Petr Vorel [this message]
2019-10-18 13:39   ` Jan Stancek
2019-10-18 13:46     ` Petr Vorel
2021-01-20  3:10 ` Li Wang
2021-01-20  9:32   ` Jan Stancek
2021-01-20  9:46     ` Li Wang

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=20191018133733.GA31681@dell5510 \
    --to=pvorel@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