From: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
To: Mimi Zohar <zohar@linux.ibm.com>, linux-integrity@vger.kernel.org
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
lkp@lists.01.org
Subject: Re: [PATCH] ima: fix mprotect checking
Date: Thu, 11 Jun 2020 07:11:44 -0700 [thread overview]
Message-ID: <b9b75002-8c46-16c2-ba09-d7ff6b3d9889@linux.microsoft.com> (raw)
In-Reply-To: <1591874363-28939-1-git-send-email-zohar@linux.ibm.com>
On 6/11/20 4:19 AM, Mimi Zohar wrote:
> Make sure IMA is enabled before checking mprotect change. Addresses
> report of a 3.7% regression of boot-time.dhcp.
>
> Fixes: 8eb613c0b8f1 ("ima: verify mprotect change is consistent with mmap policy")
> Reported-by: kernel test robot <rong.a.chen@intel.com>
> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
> ---
> security/integrity/ima/ima_main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
> index 800fb3bba418..c1583d98c5e5 100644
> --- a/security/integrity/ima/ima_main.c
> +++ b/security/integrity/ima/ima_main.c
> @@ -419,7 +419,8 @@ int ima_file_mprotect(struct vm_area_struct *vma, unsigned long prot)
> int pcr;
>
> /* Is mprotect making an mmap'ed file executable? */
> - if (!vma->vm_file || !(prot & PROT_EXEC) || (vma->vm_flags & VM_EXEC))
> + if (!(ima_policy_flag & IMA_APPRAISE) || !vma->vm_file ||
> + !(prot & PROT_EXEC) || (vma->vm_flags & VM_EXEC))
> return 0;
>
> security_task_getsecid(current, &secid);
>
Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
prev parent reply other threads:[~2020-06-11 14:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 11:19 [PATCH] ima: fix mprotect checking Mimi Zohar
2020-06-11 14:11 ` Lakshmi Ramasubramanian [this message]
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=b9b75002-8c46-16c2-ba09-d7ff6b3d9889@linux.microsoft.com \
--to=nramas@linux.microsoft.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@lists.01.org \
--cc=zhengjun.xing@linux.intel.com \
--cc=zohar@linux.ibm.com \
/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