[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190208141309.GA2215@JAVRIS.in.ibm.com>
Date: Fri, 8 Feb 2019 19:43:09 +0530
From: Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>
To: Petr Mladek <pmladek@...e.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>,
Alice Ferrazzi <alicef@...cef.me>, jeyu@...nel.org,
jikos@...nel.org, mbenes@...e.cz, live-patching@...r.kernel.org,
linux-kernel@...r.kernel.org,
Alice Ferrazzi <alice.ferrazzi@...aclelinux.com>
Subject: Re: [PATCH v2] livepatch: core: Return EOPNOTSUPP instead of ENOSYS
On Fri, Feb 08, 2019 at 10:34:45AM +0100, Petr Mladek wrote:
> On Fri 2019-02-08 11:50:05, Kamalesh Babulal wrote:
> > On Wed, Feb 06, 2019 at 11:28:32AM +0100, Petr Mladek wrote:
> > > On Tue 2019-02-05 09:59:33, Josh Poimboeuf wrote:
> > > > On Tue, Feb 05, 2019 at 03:33:28AM +0900, Alice Ferrazzi wrote:
> > > > > From: Alice Ferrazzi <alice.ferrazzi@...aclelinux.com>
> > > > >
> > > > > As a result of an unsupported operation is better to use EOPNOTSUPP
> > > > > as error code.
> > > > > ENOSYS is only used for 'invalid syscall nr' and nothing else.
> > > > >
> > > > > Signed-off-by: Alice Ferrazzi <alice.ferrazzi@...aclelinux.com>
> > > >
> > > > Acked-by: Josh Poimboeuf <jpoimboe@...hat.com>
> > >
> > > I have applied the patch into for-5.1/atomic-replace branch.
[...]
> > After removal of the immediate flag by
> > commit d0807da78e11 ("livepatch: Remove immediate feature"), every
> > architecture enabling livepatching is required to have implemented
> > reliable stack trace. Is it a better idea to make
> > HAVE_RELIABLE_STACKTRACE a config dependency, which will disable
> > livepatching support for architectures without reliable stack trace
> > function during kernel build?
> >
> > The idea is to remove klp_have_reliable_stack() by moving
> > CONFIG_HAVE_RELIABLE_STACKTRACE as a config dependency to Kconfig
> > file
>
> Looks like a nice cleanup.
Thanks
>
> > and adding the other CONFIG_STACKTRACE as a config dependency is not
> > required, as it's selected via CONFIG_DYNAMIC_FTRACE_WITH_REGS
> > dependency chain. With the patch on architecture without
> > HAVE_RELIABLE_STACKTRACE, the user should see:
>
> Hmm, I see the following in kernel/trace/Kconfig:
>
> config TRACING
> [...]
> select STACKTRACE if STACKTRACE_SUPPORT
>
> It seems that the depency is not guaranted. Or do I miss anything?
I should have tried drawing the config dependency of CONFIG_STACKTRACE
in the mail. It would saved me from nagivating wrong indirections in
tricky Kconfigs. You are right, CONFIG_STACKTRACE is not selected via
CONFIG_DYNAMIC_FTRACE_WITH_REGS config dependency chain.
>
> Anyway, it is pretty indirect. I would prefer to add dependency
> on STACKTRACE explicitly into config LIVEPATCH.
Agree, explicitly listing CONFIG_STACKTRACE as one of the dependencies
under config LIVEPATCH will guarantee the dependency is met. On the
curious note, digging through the git logs, CONFIG_STACKTRACE_SUPPORT
is enabled by default on x86/PowerPC for quite long now.
Thanks,
Kamalesh
Powered by blists - more mailing lists