All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>
Cc: Tejun Heo <tj@kernel.org>, Steven Rostedt <rostedt@goodmis.org>,
	Dave Young <dyoung@redhat.com>, Andi Kleen <ak@linux.intel.com>,
	Greentime Hu <green.hu@gmail.com>,
	Vincent Chen <deanbo422@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	adi-buildroot-devel@lists.sourceforge.net,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH] dump_stack: convert generic dump_stack into a weak symbol
Date: Wed, 7 Mar 2018 09:49:31 +0100	[thread overview]
Message-ID: <20180307084931.txou4vo5qj27anhe@pathway.suse.cz> (raw)
In-Reply-To: <20180307022127.GB802@jagdpanzerIV>

On Wed 2018-03-07 11:21:27, Sergey Senozhatsky wrote:
> Hello Arnd,
> 
> On (03/06/18 14:27), Arnd Bergmann wrote:
> [..]
> > As we are now removing blackfin, based on the latest discussion, this
> > part should no longer be necessary.
> 
> When is this going to happen? 4.17?
> 
> [..]
> > nds32 currently only exists in linux-next, not in the mainline kernel.
> > If it's the only architecture that does something different from everyone
> > else, I think we should change nds32.
> > 
> > I looked at the nds32 show_stack() implementation now and it
> > seems to me that it is completely unnecessary, as the implementation
> > from lib/dump_stack.c does basically the same thing (by calling
> > show_stack(NULL, NULL)).
> 
> Interesting point. I'll leave it to nds32 maintainers.
> OTOH blackfin is still in linux-next, so I assume we need
> that __weak dump_stack() for the time being.

My understanding is that blacfin will not be removed in the first
wave. Therefore we would need to do something about it for 4.17.
Or is there any new info, Arnd?


> [..]
> > > +asmlinkage __weak __visible void dump_stack(void)
> > >  {
> > >         __dump_stack();
> > >  }
> > 
> > Weak symbols are generally discouraged in the kernel. We have
> > them in a couple of places, but I find them rather confusing as they
> > make it harder to figure out what is actually going on.

I agree that using weak symbols might be confusing. But I wonder what
is the preferred alternative when only few architectures do something
slightly different.


> Honestly, I kind of find __weak less confusing than EXPORT_SYMBOL(dump_stack)
> in 3 different places. __weak hints that the symbol likely will be overridden
> somewhere, while EXPORT_SYMBOL() does not (at least not to me). Dunno.

The trick used for dump_stack() is really confusing. I mean the
linking of lib/dump_stack.o only when there is no arch-specific
variant.

Best Regards,
Petr

      parent reply	other threads:[~2018-03-07  8:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-05  5:37 [PATCH] dump_stack: convert generic dump_stack into a weak symbol Sergey Senozhatsky
2018-03-05 14:48 ` Petr Mladek
2018-03-06  2:50   ` Greentime Hu
2018-03-06  4:31     ` Sergey Senozhatsky
2018-03-06  5:34       ` Greentime Hu
2018-03-06  4:29   ` Sergey Senozhatsky
2018-03-06 12:43     ` Petr Mladek
2018-03-06 22:52       ` Stephen Rothwell
2018-03-06 13:27 ` Arnd Bergmann
2018-03-07  2:21   ` Sergey Senozhatsky
2018-03-07  8:46     ` Arnd Bergmann
2018-03-07  9:09       ` Petr Mladek
2018-03-07  9:44         ` Greentime Hu
2018-03-07  9:50           ` Arnd Bergmann
2018-03-07 10:40       ` Sergey Senozhatsky
2018-03-07 10:57         ` Arnd Bergmann
2018-03-07 11:48           ` Sergey Senozhatsky
2018-03-07 12:41             ` Stephen Rothwell
2018-03-07 12:48               ` Arnd Bergmann
2018-03-07 12:53                 ` Stephen Rothwell
2018-03-07 12:58                   ` Arnd Bergmann
2018-03-07 13:10                     ` Stephen Rothwell
2018-03-07 13:40                 ` Sergey Senozhatsky
2018-03-07 14:01               ` Sergey Senozhatsky
2018-03-09  9:50             ` Petr Mladek
2018-03-14 23:42               ` Steven Rostedt
2018-03-14 23:58                 ` Stephen Rothwell
2018-03-07  8:49     ` Petr Mladek [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=20180307084931.txou4vo5qj27anhe@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=adi-buildroot-devel@lists.sourceforge.net \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=deanbo422@gmail.com \
    --cc=dyoung@redhat.com \
    --cc=green.hu@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=sfr@canb.auug.org.au \
    --cc=tj@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.