mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jessica Yu <jeyu@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Freeing alternatives sections after module init?
Date: Mon, 27 Jun 2016 17:07:27 -0400	[thread overview]
Message-ID: <20160627210727.GA27476@packer-debian-8-amd64.digitalocean.com> (raw)

Hi Rusty,

I noticed that the module loader keeps .altinstructions and
.altinstr_replacement (which are normally freed after kernel init) in
core memory after module init, so these sections are never freed for
modules.

In fact, the module loader seems to keep a number of sections normally
marked between __init_begin and __init_end (which are then freed in
free_initmem()) in module core memory, for example on x86, there's
also .parainstructions and .altinstr_aux.

I was just wondering if this discrepancy was intentional :-)
Shouldn't these sections be freed after init? Though it probably
doesn't hurt to keep some of these sections in memory,
.altinstr_replacement is (for whatever reason) an executable section,
and is technically not needed anymore after apply_alternatives()
copies the replacement instructions, so it might be good to free it.

Thanks,
Jessica

             reply	other threads:[~2016-06-27 21:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27 21:07 Jessica Yu [this message]
2016-06-28 20:33 ` Rusty Russell

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=20160627210727.GA27476@packer-debian-8-amd64.digitalocean.com \
    --to=jeyu@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®