linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Roberto Sassu <roberto.sassu@huaweicloud.com>,
	dmitry.kasatkin@gmail.com, jmorris@namei.org, serge@hallyn.com
Cc: linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org, stefanb@linux.ibm.com,
	viro@zeniv.linux.org.uk, pvorel@suse.cz,
	Roberto Sassu <roberto.sassu@huawei.com>
Subject: Re: [PATCH ima-evm-utils v4] Add tests for MMAP_CHECK and MMAP_CHECK_REQPROT hooks
Date: Thu, 02 Feb 2023 15:40:06 -0500	[thread overview]
Message-ID: <805425ab66a004b110cf0c33423ba5a4247c5cb4.camel@linux.ibm.com> (raw)
In-Reply-To: <ae83bc62a798180281b2bcf6a469e97586d2af7c.camel@huaweicloud.com>

On Thu, 2023-02-02 at 17:23 +0100, Roberto Sassu wrote:
> > > +   if (ptr == MAP_FAILED) {
> > > +           ret = ERR_SETUP;
> > > +           if (argv[2] && !strcmp(argv[2], "exec_on_writable") &&
> > > +               errno == EACCES)
> > > +                   ret = ERR_TEST;
> > > +
> > 
> > FYI, on an older distro kernel, the mmap fails and results in following
> > without any explanation.
> > 
> > Test: check_mmap (hook="MMAP_CHECK", test_mmap arg: "exec")
> > Unexpected exit status 1 from test_mmap
> > 
> > With some additional debugging, I'm seeing:
> > Failed mmap() /tmp/tmp.4gD2UjSvC4/tmp.PlzUEm09hO, err: -13 (Permission
> > denied)b
> 
> Uhm, ok. Which kernel is failing?

I'm able to reproduce the error on a next-integrity or next-integrity-
testing kernel, by running the tests multiple times.  The error doesn't
occur the first time running the test, but subsequent times.

Mimi


  reply	other threads:[~2023-02-02 20:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 13:51 [PATCH ima-evm-utils v4] Add tests for MMAP_CHECK and MMAP_CHECK_REQPROT hooks Roberto Sassu
2023-02-02 16:15 ` Mimi Zohar
2023-02-02 16:23   ` Roberto Sassu
2023-02-02 20:40     ` Mimi Zohar [this message]
2023-02-03  8:21       ` Roberto Sassu

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=805425ab66a004b110cf0c33423ba5a4247c5cb4.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=jmorris@namei.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=pvorel@suse.cz \
    --cc=roberto.sassu@huawei.com \
    --cc=roberto.sassu@huaweicloud.com \
    --cc=serge@hallyn.com \
    --cc=stefanb@linux.ibm.com \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).