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 v2] Fix prctl02
Date: Fri, 24 Jan 2020 13:48:47 +0100	[thread overview]
Message-ID: <20200124124847.GB31214@rei.lan> (raw)
In-Reply-To: <b2a63820-656c-de66-cde2-ce91c62e52b6@163.com>

Hi!
> > The prctl() system call takes 5 integer arguments but only 3 of them were
> > passed in the test. This means that the system call read random garbage
> > from stack in place of the two missing arguments and failed even on some
> > perfectly valid combinations of arguments on some platforms.
> > 
> > - Change num_invalid to ULONG_MAX
> > - Fix arguments in test case 9, 13 and 14
> > - Fix test call of prctl() to have all 5 arguments
> looks prctl manpages and kernel code, you are right, Thanks for the fix!
> Feel free to add??
> Reviewed-by: xuyang_jy_0410@163.com
> Tested-by: xuyang_jy_0410@163.com
> 
> Also, do we should use 5 arguments for other prctl test cases?

It depends on the option argument, the PR_CAP_AMBIENT explicitely states
that arg4 and arg5 must be set to 0 as well as the
PR_GET_SPECULATION_CTRL.

Some of the options explicitely say that some arguments are ignored.

And some, including PR_SET_NO_NEW_PRIVS does not say anyting.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2020-01-24 12:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 14:31 [LTP] [PATCH] Fix prctl02 Martin Doucha
2020-01-23 14:55 ` Jan Stancek
2020-01-23 15:18   ` [LTP] [PATCH v2] " Martin Doucha
2020-01-23 23:54     ` Jan Stancek
2020-01-24 11:10     ` Yang Xu
2020-01-24 12:48       ` Cyril Hrubis [this message]
2020-01-24 13:06         ` Yang Xu
2020-01-24 14:14     ` 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=20200124124847.GB31214@rei.lan \
    --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