All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Oleg Kutkov <elenbert@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: Fwd: Problem with set_memory_rw
Date: Thu, 4 Feb 2010 20:12:50 +1100	[thread overview]
Message-ID: <20100204091250.GD13318@laptop> (raw)
In-Reply-To: <20100204175133.790251c8.kamezawa.hiroyu@jp.fujitsu.com>

On Thu, Feb 04, 2010 at 05:51:33PM +0900, KAMEZAWA Hiroyuki wrote:
> On Thu, 4 Feb 2010 10:09:57 +0200
> Oleg Kutkov <elenbert@gmail.com> wrote:
> > Thank for answer!
> > But this is a very strange, because 0x0509940 - it a virtual memory
> > address (i got it from System.map, this is a system call table, on my
> > machine). set_memory_rw return zero, anyway. Maybe, system call table
> > is much write protected, so i can't change attribute of memory page?
> > One more interesting thing:
> > 
> > 
> > 
> > struct page *pg;
> > pg = virt_to_page(addr);
> > unsigned long page_addr;
> > page_addr = (unsigned long) page_address(pg);
> > 
> > 
> > addr - this is my virtual address (provided by System.map)
> > But page_addr got another value!
> > What wrong?
> > Sorry, if my questions is to stupid.
> > 
> 
> Below is only about virt_to_page() etc... (not about set_memory_rw())
> Maybe my answer for set_memory_rw() was pointless.
> 
> I think system call table is on .rodata section and set_memory_rw() doesn't
> allow change attributes on .rodata sections(not .text)
> ..I'm sorry if I'm wrong.

You are right. static_protections() forbids rodata from being marked RW.


      reply	other threads:[~2010-02-04  9:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-04  5:26 Problem with set_memory_rw Oleg Kutkov
2010-02-04  5:45 ` KAMEZAWA Hiroyuki
     [not found]   ` <5e9821061002040006p258c2738y87a26c769c04bcfd@mail.gmail.com>
2010-02-04  8:09     ` Fwd: " Oleg Kutkov
2010-02-04  8:51       ` KAMEZAWA Hiroyuki
2010-02-04  9:12         ` Nick Piggin [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=20100204091250.GD13318@laptop \
    --to=npiggin@suse.de \
    --cc=elenbert@gmail.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.