All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] mprotect04: fix powerpc crash when copying exec_func
Date: Wed, 9 Sep 2015 14:37:37 +0200	[thread overview]
Message-ID: <20150909123737.GA13664@rei.suse.cz> (raw)
In-Reply-To: <dde73925917fe3524a598d859fdb66ca95711fc3.1441798744.git.jstancek@redhat.com>

Hi!
> Testcase tried to copy page size area starting at &exec_func.
> This results in crash on powerpc, because &exec_func is too close
> to end of page and subsequent page is not mapped:

I was wondering about this problem when I was fixing the test, but could
not actually hit it.

> -static void *get_func(void *mem)
> +static int page_present(void *p)
>  {
> -	memcpy(mem, exec_func, getpagesize());
> +	int fd;
> +
> +	fd = SAFE_OPEN(cleanup, "page_present", O_WRONLY|O_CREAT, 0644);

Why don't we use "/dev/null"?


The rest looks good to me.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2015-09-09 12:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 11:39 [LTP] [PATCH] mprotect04: fix powerpc crash when copying exec_func Jan Stancek
2015-09-09 12:37 ` Cyril Hrubis [this message]
     [not found]   ` <559206696.7848057.1441803641337.JavaMail.zimbra@redhat.com>
2015-09-09 13:09     ` Cyril Hrubis
     [not found]       ` <870837936.7873040.1441805002410.JavaMail.zimbra@redhat.com>
2015-09-09 13:26         ` 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=20150909123737.GA13664@rei.suse.cz \
    --to=chrubis@suse.cz \
    --cc=jstancek@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.