linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Jay Lan <jay.j.lan@nasa.gov>
Cc: Christoph Hellwig <hch@infradead.org>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] export symbol mount_lock
Date: Thu, 13 Jul 2017 11:58:40 -0700	[thread overview]
Message-ID: <20170713185840.GB4469@bombadil.infradead.org> (raw)
In-Reply-To: <dafd3884-6815-9a55-052b-4acab70f956f@nasa.gov>

On Thu, Jul 13, 2017 at 11:24:01AM -0700, Jay Lan wrote:
> On 07/13/2017 12:15 AM, Christoph Hellwig wrote:
> > On Wed, Jul 12, 2017 at 02:40:11PM -0700, Jay Lan wrote:
> > > Hi all,
> > > 
> > > I was writing a livepatch patch, but compilation failed in creating the .ko
> > > because mount_lock is "undefined."
> > > 
> > > The mount_lock is defined globally in fs/namespace.c
> > > __cacheline_aligned_in_smp DEFINE_SEQLOCK(mount_lock);
> > > 
> > > and extern in fs/mount.h.
> > > extern seqlock_t mount_lock;
> > > 
> > > If there is a reason that mount_lock should not be EXPORT_SYMBOL_GPL, please
> > > advise; otherwise, I propose the patch to export this symbol.
> > Because there is no %$^$^ reason to use it from a module ever?
> Is livepatch a good reason? Besides security fixes, livepatch is a good tool
> to use for debugging and providing a temporary fix on production systems
> (until next release from vendors) I know this argument is not strong, but at
> least mount_lock is declared globally. Yes?

Something I've done in the past as a local hack when a symbol I wanted
wasn't exported is:

extern seqlock_t *mount_lock_p;
module_param(mount_lock_p, charp, 0);

and then pass the address (from /proc/kallsyms) as a module parameter
at load time.

  reply	other threads:[~2017-07-13 18:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 21:40 [PATCH] export symbol mount_lock Jay Lan
2017-07-13  7:15 ` Christoph Hellwig
2017-07-13 18:24   ` Jay Lan
2017-07-13 18:58     ` Matthew Wilcox [this message]
2017-07-13 19:09       ` Jay Lan
2017-07-14  1:19     ` Al Viro

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=20170713185840.GB4469@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=hch@infradead.org \
    --cc=jay.j.lan@nasa.gov \
    --cc=linux-fsdevel@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 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).