On Wed, Nov 11, 2015 at 04:48:07PM +0100, Petr Mladek wrote:
> On Mon 2015-11-09 23:45:55, Jessica Yu wrote:
> > Architecture-specific relocation code no longer needed, since symbol
> > resolution and relocation work will be offloaded to module loader.
>
>
On Thu, Nov 12, 2015 at 04:03:45PM +0100, Petr Mladek wrote:
> On Thu 2015-11-12 14:22:28, Miroslav Benes wrote:
> > On Thu, 12 Nov 2015, Petr Mladek wrote:
> > > > >Maybe I am missing something but isn't it necessary to call vfree() on
> > > > >info somewhere in the end?
> > > >
> > > > So
On Thu, Nov 12, 2015 at 04:27:01PM +0100, Miroslav Benes wrote:
> On Wed, 11 Nov 2015, Jessica Yu wrote:
>
> > +++ Miroslav Benes [11/11/15 15:30 +0100]:
> > > On Mon, 9 Nov 2015, Jessica Yu wrote:
> > >
> > > So I guess we don't need klp_reloc anymore.
> >
> > Yes, that's correct. I am noticing
On Thu, Nov 12, 2015 at 11:58:25AM +1030, Rusty Russell wrote:
> Josh Poimboeuf <jpoim...@redhat.com> writes:
> > On Tue, Nov 10, 2015 at 12:27:34PM +1030, Rusty Russell wrote:
> >> Josh Poimboeuf <jpoim...@redhat.com> writes:
> >> > On Mon, Nov 09, 201
On Mon, Nov 09, 2015 at 11:45:52PM -0500, Jessica Yu wrote:
> In livepatch modules, preserve section, symbol, string information from
> the load_info struct in the module loader. This information is used to
> patch modules that are not loaded in memory yet; specifically it is used
> to resolve
On Mon, Nov 09, 2015 at 11:45:52PM -0500, Jessica Yu wrote:
> In livepatch modules, preserve section, symbol, string information from
> the load_info struct in the module loader. This information is used to
> patch modules that are not loaded in memory yet; specifically it is used
> to resolve
On Fri, Nov 06, 2015 at 02:25:00PM +0800, Zhou Chengming wrote:
> When enable KASLR, livepatch will adjust old_addr of changed
> function accordingly. So do the same thing for reloc.
>
> [PATCH v1] https://lkml.org/lkml/2015/11/4/91
>
> Reported-by: Cyril B.
>
On Tue, Nov 10, 2015 at 09:15:54AM +0100, Jiri Slaby wrote:
> On 11/10/2015, 05:45 AM, Jessica Yu wrote:
> > Intialize the list of relocation sections in the sample
> > klp_object (even if the list will be empty in this case).
> > Also mark module as a livepatch module so that the module
> >
On Tue, Nov 10, 2015 at 09:49:09AM +0100, Miroslav Benes wrote:
> On Mon, 9 Nov 2015, Josh Poimboeuf wrote:
>
> > On Mon, Nov 09, 2015 at 05:01:18PM -0600, Chris J Arges wrote:
> > > On 11/09/2015 02:56 PM, Josh Poimboeuf wrote:
> > > > I'd recommend splitting
On Mon, Nov 02, 2015 at 02:16:16PM -0600, Chris J Arges wrote:
> On Mon, Nov 02, 2015 at 01:52:44PM -0600, Josh Poimboeuf wrote:
> > On Mon, Nov 02, 2015 at 11:58:47AM -0600, Chris J Arges wrote:
> > > The following directory structure will allow for cases when the same
> >
On Mon, Nov 02, 2015 at 11:58:47AM -0600, Chris J Arges wrote:
> The following directory structure will allow for cases when the same
> function name exists in a single object.
> /sys/kernel/livepatch///
>
> The number is incremented on each known initialized func kobj thus creating
>
in a page fault when load_module() does
"mod->state = MODULE_STATE_LIVE".
Reported-by: Cyril B. <c...@alwaysdata.com>
Tested-by: Cyril B. <c...@alwaysdata.com>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/kernel/livepatch.c | 9 +
1 f
On Tue, Nov 03, 2015 at 01:44:41PM +0100, Petr Mladek wrote:
> Also I would omit the suffix at all when it is the first occurrence.
> It will cause that unique symbols will not be numbered.
That would make parsing the entry unnecessarily harder and more
error-prone. I think it should always have
On Tue, Nov 03, 2015 at 10:50:05AM +0100, Miroslav Benes wrote:
> On Mon, 2 Nov 2015, Chris J Arges wrote:
>
> > The following directory structure will allow for cases when the same
> > function name exists in a single object.
> > /sys/kernel/livepatch///
>
> There is still a period here and
On Tue, Nov 03, 2015 at 11:22:12AM +0100, Miroslav Benes wrote:
> On Mon, 2 Nov 2015, Josh Poimboeuf wrote:
>
> > When loading a patch module on a kernel with
> > !CONFIG_DEBUG_SET_MODULE_RONX, the following crash occurs:
> >
> > [ 205.988776] livepatch: enablin
On Wed, Oct 21, 2015 at 11:11:39AM -0500, Josh Poimboeuf wrote:
> This is v14 of the compile-time stack metadata validation patch set,
> along with proposed fixes for many of the warnings it found. It's based
> on the tip/master branch.
>
> v13 can be found here:
>
> http
On Wed, Nov 04, 2015 at 11:56:13PM +0100, Jiri Kosina wrote:
> On Tue, 3 Nov 2015, Josh Poimboeuf wrote:
>
> > Subject: [PATCH] livepatch: Cleanup page permission changes
> >
> > Calling set_memory_rw() and set_memory_ro() for every iteration of the
> > loop i
ter
the loop.
Suggested-by: Miroslav Benes <mbe...@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/kernel/livepatch.c | 25 ++---
kernel/livepatch/core.c | 42 +-
2 files changed, 39 insertions(+
On Thu, Nov 05, 2015 at 09:17:59AM -0600, Josh Poimboeuf wrote:
> On Thu, Nov 05, 2015 at 10:40:26AM +0100, Jiri Kosina wrote:
> > On Thu, 5 Nov 2015, Jiri Kosina wrote:
> >
> > > > > > +#ifdef CONFIG_DEBUG_SET_MODULE_RONX
> > > > > > +sta
On Thu, Nov 05, 2015 at 04:18:12PM +0100, Miroslav Benes wrote:
> On Wed, 4 Nov 2015, Josh Poimboeuf wrote:
>
> > On Wed, Nov 04, 2015 at 10:52:52AM +0100, Miroslav Benes wrote:
> > > On Tue, 3 Nov 2015, Josh Poimboeuf wrote:
> > > > > Object entry would be
On Tue, Nov 03, 2015 at 08:57:24PM +0100, Jiri Kosina wrote:
> On Tue, 3 Nov 2015, Petr Mladek wrote:
>
> > Also I would omit the suffix at all when it is the first occurrence. It
> > will cause that unique symbols will not be numbered.
>
> That'd mean that the names (including suffixes) are
On Wed, Nov 04, 2015 at 10:10:06AM -0600, Josh Poimboeuf wrote:
> On Wed, Nov 04, 2015 at 10:18:29AM +0100, Jiri Kosina wrote:
> > On Tue, 3 Nov 2015, Josh Poimboeuf wrote:
> >
> > > It's probably a good idea to keep the patches bisectable, so I made this
> > &g
On Wed, Nov 04, 2015 at 10:52:52AM +0100, Miroslav Benes wrote:
> On Tue, 3 Nov 2015, Josh Poimboeuf wrote:
> > > Object entry would be empty for not loaded object. I would not
> > > dare to propose to remove such object entries. It would make things
> > > worse
On Wed, Nov 04, 2015 at 10:18:29AM +0100, Jiri Kosina wrote:
> On Tue, 3 Nov 2015, Josh Poimboeuf wrote:
>
> > It's probably a good idea to keep the patches bisectable, so I made this
> > a separate patch which applies on top of the first one.
> >
> > (Note
/3 is a livepatch cleanup for simplification of the livepatch
relocation code.
v2:
- removed set_page_attributes() duplication in livepatch cleanup patch
in favor of using new {un}set_module_core_ro_nx() functions
- changed 'size' from int to size_t
Josh Poimboeuf (3):
livepatch: Fix crash
in a page fault when load_module() does
"mod->state = MODULE_STATE_LIVE".
Reported-by: Cyril B. <c...@alwaysdata.com>
Tested-by: Cyril B. <c...@alwaysdata.com>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/kernel/livepatch.c | 9 +
1 f
() functions are used to change the
page permissions. Toggling NX isn't necessary in this case, but it's
not highly performance sensitive code so it should be fine.
Suggested-by: Miroslav Benes <mbe...@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/kernel/live
asymmetrical.
Instead, use the same logic to do both. Also add some new
set_module_{init,core}_ro_nx() helper functions for more symmetry with
the unset functions.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
kernel/module.c | 57 ++
On Thu, Nov 05, 2015 at 10:40:26AM +0100, Jiri Kosina wrote:
> On Thu, 5 Nov 2015, Jiri Kosina wrote:
>
> > > > > +#ifdef CONFIG_DEBUG_SET_MODULE_RONX
> > > > > +static void set_page_attributes(void *start, void *end,
> > > > > + int (*set)(unsigned long start, int
>
On Fri, Nov 06, 2015 at 02:42:46PM +0100, Petr Mladek wrote:
> On Fri 2015-11-06 06:12:47, Josh Poimboeuf wrote:
> > On Fri, Nov 06, 2015 at 11:40:55AM +0100, Petr Mladek wrote:
> > > On Thu 2015-11-05 15:18:05, Josh Poimboeuf wrote:
> > > > Calling set_memory_rw()
On Fri, Nov 06, 2015 at 11:40:55AM +0100, Petr Mladek wrote:
> On Thu 2015-11-05 15:18:05, Josh Poimboeuf wrote:
> > Calling set_memory_rw() and set_memory_ro() for every iteration of the
> > loop in klp_write_object_relocations() is messy, inefficient, and
> > error-prone
On Tue, Nov 03, 2015 at 11:52:08AM +0100, Miroslav Benes wrote:
> On Mon, 2 Nov 2015, Chris J Arges wrote:
>
> [...]
>
> > +static int klp_get_func_pos_callback(void *data, const char *name,
> > + struct module *mod, unsigned long addr)
> > +{
> > + struct
On Tue, Nov 03, 2015 at 05:09:48PM +0100, Miroslav Benes wrote:
> On Tue, 3 Nov 2015, Josh Poimboeuf wrote:
>
> > On Tue, Nov 03, 2015 at 11:52:08AM +0100, Miroslav Benes wrote:
> > > On Mon, 2 Nov 2015, Chris J Arges wrote:
> > >
> > > [...]
> > >
On Mon, Oct 12, 2015 at 09:41:11AM +0200, Ingo Molnar wrote:
>
> * Josh Poimboeuf <jpoim...@redhat.com> wrote:
>
> > Hi Ingo,
> >
> > Do you have any more objections to these patches? Would you be willing
> > to apply them?
>
> So I still don't
On Tue, Jul 07, 2015 at 09:54:09AM -0500, Josh Poimboeuf wrote:
Also posting a listing of the reported warnings in a reply to this
email.
These are the currently reported stackvalidate warnings on tip/master
with my Fedora-based config. There were over 1400 warnings, in 37 .c
files and 18 .S
On Tue, Jul 07, 2015 at 03:00:38PM -0700, Andy Lutomirski wrote:
On Tue, Jul 7, 2015 at 7:54 AM, Josh Poimboeuf jpoim...@redhat.com wrote:
Add new stackvalidate ignore macros: STACKVALIDATE_IGNORE_INSN and
STACKVALIDATE_IGNORE_FUNC. These can be used to tell stackvalidate to
skip
On Tue, Jul 07, 2015 at 03:57:14PM -0700, Andy Lutomirski wrote:
On Tue, Jul 7, 2015 at 7:54 AM, Josh Poimboeuf jpoim...@redhat.com wrote:
5. A callable function may not jump to a dynamically determined address.
Such jumps can't be validated since the jump destination is unknown
On Tue, Jul 07, 2015 at 04:35:17PM -0700, Andy Lutomirski wrote:
On Tue, Jul 7, 2015 at 4:29 PM, Josh Poimboeuf jpoim...@redhat.com wrote:
On Tue, Jul 07, 2015 at 03:57:14PM -0700, Andy Lutomirski wrote:
On Tue, Jul 7, 2015 at 7:54 AM, Josh Poimboeuf jpoim...@redhat.com wrote
On Tue, Jul 07, 2015 at 09:54:09AM -0500, Josh Poimboeuf wrote:
I did some more looking and it turns out that inline assembly doesn't
play nicely with frame pointers at all. If the inline asm is at the
beginning of the function, gcc sometimes emits the inline asm code
before
On Tue, Jul 07, 2015 at 04:00:54PM -0700, Andy Lutomirski wrote:
On Tue, Jul 7, 2015 at 3:59 PM, Josh Poimboeuf jpoim...@redhat.com wrote:
On Tue, Jul 07, 2015 at 03:00:38PM -0700, Andy Lutomirski wrote:
On Tue, Jul 7, 2015 at 7:54 AM, Josh Poimboeuf jpoim...@redhat.com wrote:
Add new
-independent, as
suggested by H. Peter Anvin
v2:
- Fixed memory leaks reported by Petr Mladek
Josh Poimboeuf (4):
x86/asm: Frame pointer macro cleanup
x86/stackvalidate: Compile-time stack validation
x86/stackvalidate: Add file and directory ignores
stackvalidate: Add ignore macros
The FRAME/ENDFRAME asm macros for setting up and restoring the frame
pointer aren't currently being used. However, they will be needed soon
to help asm functions to comply with stackvalidate.
Make the code more readable and improve the comments.
Signed-off-by: Josh Poimboeuf jpoim...@redhat.com
seconds of total CPU). It hasn't been
optimized for performance yet, so there are probably some opportunities
for better build performance.
Signed-off-by: Josh Poimboeuf jpoim...@redhat.com
---
Documentation/stack-validation.txt| 189
MAINTAINERS | 8 +
arch
Add new stackvalidate ignore macros: STACKVALIDATE_IGNORE_INSN and
STACKVALIDATE_IGNORE_FUNC. These can be used to tell stackvalidate to
skip validation of an instruction or a function, respectively.
Signed-off-by: Josh Poimboeuf jpoim...@redhat.com
---
include/linux/stackvalidate.h | 38
.
Signed-off-by: Josh Poimboeuf jpoim...@redhat.com
---
arch/x86/boot/Makefile| 3 ++-
arch/x86/boot/compressed/Makefile | 3 ++-
arch/x86/entry/vdso/Makefile | 5 -
arch/x86/purgatory/Makefile | 2 ++
arch/x86/realmode/Makefile| 4 +++-
arch/x86
On Tue, Jul 07, 2015 at 04:35:17PM -0700, Andy Lutomirski wrote:
On Tue, Jul 7, 2015 at 4:29 PM, Josh Poimboeuf jpoim...@redhat.com wrote:
On Tue, Jul 07, 2015 at 03:57:14PM -0700, Andy Lutomirski wrote:
On Tue, Jul 7, 2015 at 7:54 AM, Josh Poimboeuf jpoim...@redhat.com wrote
On Wed, Aug 26, 2015 at 09:07:23AM +0200, Ingo Molnar wrote:
* Josh Poimboeuf jpoim...@redhat.com wrote:
BTW, since I'm planning on adding a CFI generation option to this tool, I
wonder
if stackvalidate is a misnomer. I can't think of anything better. Any
naming
ideas
On Wed, Aug 26, 2015 at 04:26:28PM +0200, Andi Kleen wrote:
b) 100% reliable stack traces for DWARF enabled kernels
This is not yet implemented. See Documentation/stack-validation.txt
for more details about what is planned.
The automatic CFI generation tool seems like a bad idea
On Fri, Aug 28, 2015 at 10:21:16AM +0200, Ingo Molnar wrote:
* Josh Poimboeuf jpoim...@redhat.com wrote:
On Wed, Aug 26, 2015 at 09:07:23AM +0200, Ingo Molnar wrote:
* Josh Poimboeuf jpoim...@redhat.com wrote:
BTW, since I'm planning on adding a CFI generation option
the comments.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/include/asm/frame.h | 33 ++---
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/arch/x86/include/asm/frame.h b/arch/x86/include/asm/frame.h
index 793179c..8a6cd26 100644
--- a/ar
Align the x86_energy_perf_policy line with the others and restore the
original alphabetical sorting.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
tools/Makefile | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/tools/Make
clmul_ghash_mul() and clmul_ghash_update() are callable non-leaf
functions which don't honor CONFIG_FRAME_POINTER, which can result in
bad stack traces.
Create stack frames for them when CONFIG_FRAME_POINTER is enabled.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Herbert Xu
type.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/entry/thunk_64.S | 4
1 file changed, 4 insertions(+)
diff --git a/arch/x86/entry/thunk_64.S b/arch/x86/entry/thunk_64.S
index efb2b93..98df1fa 100644
--- a/arch/x86/entry/thunk_64.S
+++ b/arch/x86/entry/thun
rwsem.S has several callable non-leaf functions which don't honor
CONFIG_FRAME_POINTER, which can result in bad stack traces.
Create stack frames for them when CONFIG_FRAME_POINTER is enabled.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/lib/rwsem.S | 11 ++-
is enabled and
give them proper ELF function annotations.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Acked-by: Pavel Machek <pa...@ucw.cz>
Cc: "Rafael J. Wysocki" <r...@rjwysocki.net>
---
arch/x86/power/hibernate_asm_64.S | 7 +++
1 file changed, 7 insertio
efi_call() is a callable non-leaf function which doesn't honor
CONFIG_FRAME_POINTER, which can result in bad stack traces.
Create a stack frame for it when CONFIG_FRAME_POINTER is enabled.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Reviewed-by: Matt Fleming <matt.flem...@
Linus Torvalds <torva...@linux-foundation.org>
Cc: Andi Kleen <a...@firstfloor.org>
Cc: Pedro Alves <pal...@redhat.com>
Cc: Namhyung Kim <namhy...@gmail.com>
Cc: Bernd Petrovitsch <be...@petrovitsch.priv.at>
Cc: "Chris J Arges" <chris.j.ar...@canonical.com>
Cc: Andrew Morton <
Add C versions of the frame pointer macros which can be used to create a
stack frame in inline assembly.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/include/asm/frame.h | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/arch/x86/i
do_suspend_lowlevel() is a callable non-leaf function which doesn't
honor CONFIG_FRAME_POINTER, which can result in bad stack traces.
Create a stack frame for it when CONFIG_FRAME_POINTER is enabled.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Acked-by: Pavel Machek <pa...@u
vide() is a callable function, but is missing the ELF function type,
which confuses tools like stacktool.
Properly annotate it to be a callable function. The generated code is
unchanged.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/kernel/cpu/amd.c | 5 -
1 file c
, 7, 6, 5, 4, 3, 2, 1, 0
Move it to .rodata which is a more appropriate section for read-only
data.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Herbert Xu <herb...@gondor.apana.org.au>
Cc: "David S. Miller" <da...@davemloft.net>
---
arch/x86/crypto/aesn
Add new stacktool ignore macros: STACKTOOL_IGNORE_INSN and
STACKTOOL_IGNORE_FUNC. These can be used to tell stacktool to skip
validation of an instruction or a function, respectively.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/include/asm/stacktool.
if CONFIG_FRAME_POINTER is enabled by
listing the stack pointer as an output operand for the PVOP inline asm
statements.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Jeremy Fitzhardinge <jer...@goop.org>
Cc: Chris Wright <chr...@sous-sol.org>
Cc: Alok Kataria <akata...@vmware.com&g
aesni-intel_asm.S has several callable non-leaf functions which don't
honor CONFIG_FRAME_POINTER, which can result in bad stack traces.
Create stack frames for them when CONFIG_FRAME_POINTER is enabled.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Herbert Xu
use of the instruction.
Add both functions to the stacktool whitelist.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
Cc: Boris Ostrovsky <boris.ostrov...@oracle.com>
Cc: David Vrabel <david.vra...@citrix.com>
---
arch
functions.
Create a stack frame when CONFIG_FRAME_POINTER is enabled and add the
ELF function type.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Jeremy Fitzhardinge <jer...@goop.org>
Cc: Chris Wright <chr...@sous-sol.org>
Cc: Alok Kataria <akata...@vmware.com&g
is enabled by
listing the stack pointer as an output operand for the hypercall inline
asm statements.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
Cc: Boris Ostrovsky <boris.ostrov...@oracle.com>
Cc: David Vrabel <da
stacktool reports a false positive warning for the ljmp instruction in
machine_real_restart(). Normally, ljmp isn't allowed in a function, but
this is a special case where it's jumping into real mode.
Add the jumps to a whitelist which tells stacktool to ignore them.
Signed-off-by: Josh
.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/boot/Makefile| 3 ++-
arch/x86/boot/compressed/Makefile | 3 ++-
arch/x86/entry/vdso/Makefile | 5 -
arch/x86/purgatory/Makefile | 2 ++
arch/x86/realmode/Makefile| 4 +++-
.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Herbert Xu <herb...@gondor.apana.org.au>
Cc: "David S. Miller" <da...@davemloft.net>
---
arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/cryp
On Mon, Sep 14, 2015 at 03:19:52PM +0200, Ingo Molnar wrote:
> > > In this case it would be a simple:
> > >
> > >debuginfo check all
> > >
> > > to check everything. You can also make the selection of debuginfo
> > > components
> > > to check a regular option, not a subcommand.
> >
> >
On Tue, Sep 15, 2015 at 11:57:00AM -0500, Chris J Arges wrote:
> I got the following compiler error when building v12 of this patchset:
>
> DESCEND stacktool
> CC stacktool.o
> CC elf.o
> CC special.o
> CC arch/x86/decode.o
> LD arch/x86/stacktool-in.o
>
On Thu, Oct 01, 2015 at 08:10:26AM +0200, mini...@ld-linux.so wrote:
> On Tue, Sep 22, 2015 at 10:47:04AM -0500, Josh Poimboeuf wrote:
> > aesni-intel_asm.S has several callable non-leaf functions which don't
> > honor CONFIG_FRAME_POINTER, which can result in bad stack traces.
On Thu, Oct 01, 2015 at 09:50:51AM -0500, Chris J Arges wrote:
>
> > +
> > +$(STACKTOOL_IN): FORCE
> > + @$(MAKE) $(build)=stacktool
> > +
> > +$(STACKTOOL): $(STACKTOOL_IN)
> > + @(test -d ../../kernel -a -d ../../tools -a -d ../stacktool && (( \
> > + diff -I'^#include'
On Thu, Oct 01, 2015 at 07:36:54PM +0200, Mathias Krause wrote:
> On Do, Okt 01, 2015 at 08:29:50 -0500, Josh Poimboeuf wrote:
> > On Thu, Oct 01, 2015 at 08:10:26AM +0200, mini...@ld-linux.so wrote:
> > > On Tue, Sep 22, 2015 at 10:47:04AM -0500, Josh Poimboeuf wrote:
> >
Hi Ingo,
Do you have any more objections to these patches? Would you be willing
to apply them?
Thanks!
Josh
On Tue, Sep 22, 2015 at 10:46:51AM -0500, Josh Poimboeuf wrote:
> This is v13 of the compile-time stack metadata validation patch set,
> along with proposed fixes fo
the comments.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/include/asm/frame.h | 33 ++---
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/arch/x86/include/asm/frame.h b/arch/x86/include/asm/frame.h
index 793179c..8a6cd26 100644
--- a/ar
t;
Cc: Chris J Arges <chris.j.ar...@canonical.com>
Cc: Andrew Morton <a...@linux-foundation.org>
Chris J Arges (2):
x86/uaccess: Add stack frame output operand in get_user inline asm
x86/stacktool: Ignore head_$(BITS) files.
Josh Poimboeuf (21):
tools: Fix formatting of the
Add C versions of the frame pointer macros which can be used to create a
stack frame in inline assembly.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/include/asm/frame.h | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/arch/x86/i
, 7, 6, 5, 4, 3, 2, 1, 0
Move it to .rodata which is a more appropriate section for read-only
data.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Herbert Xu <herb...@gondor.apana.org.au>
Cc: David S. Miller <da...@davemloft.net>
---
arch/x86/crypto/aesni-intel_as
aesni-intel_asm.S has several callable non-leaf functions which don't
honor CONFIG_FRAME_POINTER, which can result in bad stack traces.
Create stack frames for them when CONFIG_FRAME_POINTER is enabled.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Herbert Xu
.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/boot/Makefile| 3 ++-
arch/x86/boot/compressed/Makefile | 3 ++-
arch/x86/entry/vdso/Makefile | 5 -
arch/x86/purgatory/Makefile | 2 ++
arch/x86/realmode/Makefile| 4 +++-
is enabled by
listing the stack pointer as an output operand for the hypercall inline
asm statements.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Reviewed-by: David Vrabel <david.vra...@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
Cc: Boris Ostro
Add new stacktool ignore macros: STACKTOOL_IGNORE_INSN and
STACKTOOL_IGNORE_FUNC. These can be used to tell stacktool to skip
validation of an instruction or a function, respectively.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/include/asm/stacktool.
if CONFIG_FRAME_POINTER is enabled by
listing the stack pointer as an output operand for the PVOP inline asm
statements.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Jeremy Fitzhardinge <jer...@goop.org>
Cc: Chris Wright <chr...@sous-sol.org>
Cc: Alok Kataria <akata...@vmware.com&g
functions.
Create a stack frame when CONFIG_FRAME_POINTER is enabled and add the
ELF function type.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Jeremy Fitzhardinge <jer...@goop.org>
Cc: Chris Wright <chr...@sous-sol.org>
Cc: Alok Kataria <akata...@vmware.com&g
do_suspend_lowlevel() is a callable non-leaf function which doesn't
honor CONFIG_FRAME_POINTER, which can result in bad stack traces.
Create a stack frame for it when CONFIG_FRAME_POINTER is enabled.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Acked-by: Pavel Machek <pa...@u
stacktool reports a false positive warning for the ljmp instruction in
machine_real_restart(). Normally, ljmp isn't allowed in a function, but
this is a special case where it's jumping into real mode.
Add the jumps to a whitelist which tells stacktool to ignore them.
Signed-off-by: Josh
use of the instruction.
Add both functions to the stacktool whitelist.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Reviewed-by: David Vrabel <david.vra...@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
Cc: Boris Ostrovsky <boris.ostrov...@oracle.c
stack frame to be created before the inline asm code if
CONFIG_FRAME_POINTER is enabled by listing the stack pointer as an output
operand for the get_user inline assembly statement.
Signed-off-by: Chris J Arges <chris.j.ar...@canonical.com>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat
rwsem.S has several callable non-leaf functions which don't honor
CONFIG_FRAME_POINTER, which can result in bad stack traces.
Create stack frames for them when CONFIG_FRAME_POINTER is enabled.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/lib/rwsem.S | 11 ++-
efi_call() is a callable non-leaf function which doesn't honor
CONFIG_FRAME_POINTER, which can result in bad stack traces.
Create a stack frame for it when CONFIG_FRAME_POINTER is enabled.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Reviewed-by: Matt Fleming <matt.flem...@
From: Chris J Arges <chris.j.ar...@canonical.com>
Tell stacktool to skip validation of head_64, head_32 as they don't affect
runtime kernel stack traces.
Signed-off-by: Chris J Arges <chris.j.ar...@canonical.com>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x
is enabled and
give them proper ELF function annotations.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Acked-by: Pavel Machek <pa...@ucw.cz>
Cc: Rafael J. Wysocki <r...@rjwysocki.net>
---
arch/x86/power/hibernate_asm_64.S | 7 +++
1 file changed, 7 insertions(+)
diff --gi
vide() is a callable function, but is missing the ELF function type,
which confuses tools like stacktool.
Properly annotate it to be a callable function. The generated code is
unchanged.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/kernel/cpu/amd.c | 5 -
1 file c
Align the x86_energy_perf_policy line with the others and restore the
original alphabetical sorting.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
tools/Makefile | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/tools/Make
type.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/entry/thunk_64.S | 4
1 file changed, 4 insertions(+)
diff --git a/arch/x86/entry/thunk_64.S b/arch/x86/entry/thunk_64.S
index efb2b93..98df1fa 100644
--- a/arch/x86/entry/thunk_64.S
+++ b/arch/x86/entry/thun
.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Herbert Xu <herb...@gondor.apana.org.au>
Cc: David S. Miller <da...@davemloft.net>
---
arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/crypto/crc32c-
clmul_ghash_mul() and clmul_ghash_update() are callable non-leaf
functions which don't honor CONFIG_FRAME_POINTER, which can result in
bad stack traces.
Create stack frames for them when CONFIG_FRAME_POINTER is enabled.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Cc: Herbert Xu
On Thu, Sep 17, 2015 at 05:14:36PM -0500, Chris J Arges wrote:
> Tell stacktool to skip validation of head_64, head_32 as they don't affect
> runtime kernel stack traces.
>
> Signed-off-by: Chris J Arges <chris.j.ar...@canonical.com>
Reviewed-by: Josh Poimboeuf &l
501 - 600 of 7776 matches
Mail list logo