* [PATCH 0/2] objtool: two seg fault fixes
@ 2017-12-30 20:43 Josh Poimboeuf
2017-12-30 20:43 ` [PATCH 1/2] objtool: Fix seg fault caused by missing parameter Josh Poimboeuf
2017-12-30 20:43 ` [PATCH 2/2] objtool: Fix seg fault with clang-compiled objects Josh Poimboeuf
0 siblings, 2 replies; 5+ messages in thread
From: Josh Poimboeuf @ 2017-12-30 20:43 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Simon Ser
Hi Ingo,
Here are a couple of objtool seg fault fixes from Simon Ser.
Simon Ser (2):
objtool: Fix seg fault caused by missing parameter
objtool: Fix seg fault with clang-compiled objects
tools/objtool/builtin-orc.c | 4 +++-
tools/objtool/orc_gen.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
--
2.13.6
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] objtool: Fix seg fault caused by missing parameter
2017-12-30 20:43 [PATCH 0/2] objtool: two seg fault fixes Josh Poimboeuf
@ 2017-12-30 20:43 ` Josh Poimboeuf
2017-12-30 21:07 ` [tip:core/urgent] " tip-bot for Simon Ser
2017-12-30 20:43 ` [PATCH 2/2] objtool: Fix seg fault with clang-compiled objects Josh Poimboeuf
1 sibling, 1 reply; 5+ messages in thread
From: Josh Poimboeuf @ 2017-12-30 20:43 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Simon Ser
From: Simon Ser <contact@emersion.fr>
Fix a seg fault when no parameter is provided to 'objtool orc'.
Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
tools/objtool/builtin-orc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/objtool/builtin-orc.c b/tools/objtool/builtin-orc.c
index 4c6b5c9ef073..91e8e19ff5e0 100644
--- a/tools/objtool/builtin-orc.c
+++ b/tools/objtool/builtin-orc.c
@@ -44,6 +44,9 @@ int cmd_orc(int argc, const char **argv)
const char *objname;
argc--; argv++;
+ if (argc <= 0)
+ usage_with_options(orc_usage, check_options);
+
if (!strncmp(argv[0], "gen", 3)) {
argc = parse_options(argc, argv, check_options, orc_usage, 0);
if (argc != 1)
@@ -52,7 +55,6 @@ int cmd_orc(int argc, const char **argv)
objname = argv[0];
return check(objname, no_fp, no_unreachable, true);
-
}
if (!strcmp(argv[0], "dump")) {
--
2.13.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] objtool: Fix seg fault with clang-compiled objects
2017-12-30 20:43 [PATCH 0/2] objtool: two seg fault fixes Josh Poimboeuf
2017-12-30 20:43 ` [PATCH 1/2] objtool: Fix seg fault caused by missing parameter Josh Poimboeuf
@ 2017-12-30 20:43 ` Josh Poimboeuf
2017-12-30 21:07 ` [tip:core/urgent] " tip-bot for Simon Ser
1 sibling, 1 reply; 5+ messages in thread
From: Josh Poimboeuf @ 2017-12-30 20:43 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Simon Ser
From: Simon Ser <contact@emersion.fr>
Fix a seg fault which happens when an input file provided to 'objtool
orc generate' doesn't have a '.shstrtab' section (for instance, object
files produced by clang don't have this section).
Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
tools/objtool/orc_gen.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c
index e5ca31429c9b..e61fe703197b 100644
--- a/tools/objtool/orc_gen.c
+++ b/tools/objtool/orc_gen.c
@@ -165,6 +165,8 @@ int create_orc_sections(struct objtool_file *file)
/* create .orc_unwind_ip and .rela.orc_unwind_ip sections */
sec = elf_create_section(file->elf, ".orc_unwind_ip", sizeof(int), idx);
+ if (!sec)
+ return -1;
ip_relasec = elf_create_rela_section(file->elf, sec);
if (!ip_relasec)
--
2.13.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [tip:core/urgent] objtool: Fix seg fault caused by missing parameter
2017-12-30 20:43 ` [PATCH 1/2] objtool: Fix seg fault caused by missing parameter Josh Poimboeuf
@ 2017-12-30 21:07 ` tip-bot for Simon Ser
0 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Simon Ser @ 2017-12-30 21:07 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, tglx, jpoimboe, contact, linux-kernel, torvalds, peterz,
hpa
Commit-ID: d89e426499cf36b96161bd32970d6783f1fbcb0e
Gitweb: https://git.kernel.org/tip/d89e426499cf36b96161bd32970d6783f1fbcb0e
Author: Simon Ser <contact@emersion.fr>
AuthorDate: Sat, 30 Dec 2017 14:43:31 -0600
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 30 Dec 2017 22:04:17 +0100
objtool: Fix seg fault caused by missing parameter
Fix a seg fault when no parameter is provided to 'objtool orc'.
Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/9172803ec7ebb72535bcd0b7f966ae96d515968e.1514666459.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
tools/objtool/builtin-orc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/objtool/builtin-orc.c b/tools/objtool/builtin-orc.c
index 4c6b5c9..91e8e19 100644
--- a/tools/objtool/builtin-orc.c
+++ b/tools/objtool/builtin-orc.c
@@ -44,6 +44,9 @@ int cmd_orc(int argc, const char **argv)
const char *objname;
argc--; argv++;
+ if (argc <= 0)
+ usage_with_options(orc_usage, check_options);
+
if (!strncmp(argv[0], "gen", 3)) {
argc = parse_options(argc, argv, check_options, orc_usage, 0);
if (argc != 1)
@@ -52,7 +55,6 @@ int cmd_orc(int argc, const char **argv)
objname = argv[0];
return check(objname, no_fp, no_unreachable, true);
-
}
if (!strcmp(argv[0], "dump")) {
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [tip:core/urgent] objtool: Fix seg fault with clang-compiled objects
2017-12-30 20:43 ` [PATCH 2/2] objtool: Fix seg fault with clang-compiled objects Josh Poimboeuf
@ 2017-12-30 21:07 ` tip-bot for Simon Ser
0 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Simon Ser @ 2017-12-30 21:07 UTC (permalink / raw)
To: linux-tip-commits
Cc: torvalds, hpa, peterz, tglx, contact, mingo, linux-kernel,
jpoimboe
Commit-ID: ce90aaf5cde4ce057b297bb6c955caf16ef00ee6
Gitweb: https://git.kernel.org/tip/ce90aaf5cde4ce057b297bb6c955caf16ef00ee6
Author: Simon Ser <contact@emersion.fr>
AuthorDate: Sat, 30 Dec 2017 14:43:32 -0600
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 30 Dec 2017 22:04:17 +0100
objtool: Fix seg fault with clang-compiled objects
Fix a seg fault which happens when an input file provided to 'objtool
orc generate' doesn't have a '.shstrtab' section (for instance, object
files produced by clang don't have this section).
Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/c0f2231683e9bed40fac1f13ce2c33b8389854bc.1514666459.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
tools/objtool/orc_gen.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c
index e5ca314..e61fe70 100644
--- a/tools/objtool/orc_gen.c
+++ b/tools/objtool/orc_gen.c
@@ -165,6 +165,8 @@ int create_orc_sections(struct objtool_file *file)
/* create .orc_unwind_ip and .rela.orc_unwind_ip sections */
sec = elf_create_section(file->elf, ".orc_unwind_ip", sizeof(int), idx);
+ if (!sec)
+ return -1;
ip_relasec = elf_create_rela_section(file->elf, sec);
if (!ip_relasec)
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-30 21:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-30 20:43 [PATCH 0/2] objtool: two seg fault fixes Josh Poimboeuf
2017-12-30 20:43 ` [PATCH 1/2] objtool: Fix seg fault caused by missing parameter Josh Poimboeuf
2017-12-30 21:07 ` [tip:core/urgent] " tip-bot for Simon Ser
2017-12-30 20:43 ` [PATCH 2/2] objtool: Fix seg fault with clang-compiled objects Josh Poimboeuf
2017-12-30 21:07 ` [tip:core/urgent] " tip-bot for Simon Ser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox