Re: [PATCH v2] tracing: precise log info for kretprobe addr err

2021-01-20 Thread Masami Hiramatsu
t; > Signed-off-by: Jianlin Lv > > > > v2:add !strchr(symbol, ':') to check really bad symbol or not. > > Also, the "changes since" section should be below the "---" so that they > don't get pulled into the commit. Except that, this looks good to me.

Re: [PATCH] tracing: precise log info for kretprobe addr err

2021-01-19 Thread Masami Hiramatsu
On Wed, 20 Jan 2021 12:24:15 +0900 Masami Hiramatsu wrote: > Hi, > > On Tue, 19 Jan 2021 10:41:06 -0500 > Steven Rostedt wrote: > > > Masami, > > > > Looks fine to me. What do you think? > > Agreed. Since register_kretprobe() checks

Re: [PATCH] tracing: precise log info for kretprobe addr err

2021-01-19 Thread Masami Hiramatsu
Hi, On Tue, 19 Jan 2021 10:41:06 -0500 Steven Rostedt wrote: > Masami, > > Looks fine to me. What do you think? Agreed. Since register_kretprobe() checks the address by kprobe_on_func_entry(), if it is not passed, it should always fail to register at last. Acked-by: Masami Hiramats

Re: [PATCH] tools/bootconfig: Add tracing_on support to helper scripts

2021-01-13 Thread Masami Hiramatsu
gt; > On Wed, 9 Dec 2020 14:27:44 +0900 > Masami Hiramatsu wrote: > > > Add ftrace.instance.INSTANCE.tracing_on support to ftrace2bconf.sh > > and bconf2ftrace.sh. > > > > commit 8490db06f914 ("tracing/boot: Add per-instance tracing_on > > option s

Re: [PATCH] kretprobe: avoid re-registration of the same kretprobe earlier

2021-01-13 Thread Masami Hiramatsu
eusing it. (I recommend to re-alloc new data structure each time) For example, if you re-register your driver/filesystem without releasing, it will break the kernel. Thank you, > > -- Steve > > > On Tue, 22 Dec 2020 20:03:56 +0900 > Masami Hiramatsu wrote: > > > O

Re: [PATCH v1 03/19] x86/insn: Add an insn_decode() API

2021-01-12 Thread Masami Hiramatsu
On Fri, 8 Jan 2021 19:59:50 +0100 Borislav Petkov wrote: > On Wed, Jan 06, 2021 at 02:21:14PM +0900, Masami Hiramatsu wrote: > > So I think it is possible to introduce a keyword in a comment > > for ignoring sync check something like below. This will allow us > > a gen

[PATCH v2] tracing/kprobes: Do the notrace functions check without kprobes on ftrace

2021-01-07 Thread Masami Hiramatsu
kprobes on ftrace. This also changes the dependency of Kconfig. Because kprobe event uses the function tracer's address list for identifying notrace function, if the CONFIG_DYNAMIC_FTRACE=n, it can not check whether the target function is notrace or not. Signed-off-by: Masami Hiramatsu Acked

Re: [PATCH] tracing/kprobes: Do the notrace functions check without kprobes on ftrace

2021-01-07 Thread Masami Hiramatsu
On Thu, 7 Jan 2021 09:13:30 -0500 Steven Rostedt wrote: > On Wed, 6 Jan 2021 12:20:40 +0900 > Masami Hiramatsu wrote: > > > Enable the notrace function check on the architecture which doesn't > > support kprobes on ftrace. This notrace function check is not only > >

Re: [PATCH v1 03/19] x86/insn: Add an insn_decode() API

2021-01-05 Thread Masami Hiramatsu
arch/x86/include/asm/inat.h +++ b/arch/x86/include/asm/inat.h @@ -6,7 +6,7 @@ * * Written by Masami Hiramatsu */ -#include +#include /* Different from tools */ /* * Internal bits. Don't use bitmasks directly, because these bits are diff --git a/arch/x86/include/asm/insn.h b/arch

[PATCH] tracing/kprobes: Do the notrace functions check without kprobes on ftrace

2021-01-05 Thread Masami Hiramatsu
. This also changes the dependency of Kconfig. Because kprobe event uses the function tracer's address list for identifying notrace function, if the CONFIG_FUNCTION_TRACER=n, it can not check whether the target function is notrace or not. Signed-off-by: Masami Hiramatsu Acked-by: Naveen N. Rao --- kernel

[tip: perf/kprobes] x86/kprobes: Do not decode opcode in resume_execution()

2021-01-05 Thread tip-bot2 for Masami Hiramatsu
The following commit has been merged into the perf/kprobes branch of tip: Commit-ID: abd82e533d88df1521e3da6799b83ce88852ab88 Gitweb: https://git.kernel.org/tip/abd82e533d88df1521e3da6799b83ce88852ab88 Author:Masami Hiramatsu AuthorDate:Fri, 18 Dec 2020 23:12:05 +09:00

Re: [PATCH] selftests/ftrace: Disable multiple_kprobes test on powerpc

2021-01-05 Thread Masami Hiramatsu
On Tue, 05 Jan 2021 15:42:44 +0530 "Naveen N. Rao" wrote: > Masami Hiramatsu wrote: > > On Tue, 5 Jan 2021 12:27:30 +0530 > > "Naveen N. Rao" wrote: > > > >> Not all symbols are blacklisted on powerpc. Disable multiple_kprobes > >> t

Re: [PATCH] selftests/ftrace: Disable multiple_kprobes test on powerpc

2021-01-05 Thread Masami Hiramatsu
On Tue, 05 Jan 2021 16:51:50 +0530 "Naveen N. Rao" wrote: > Masami Hiramatsu wrote: > > On Tue, 5 Jan 2021 19:01:56 +0900 > > Masami Hiramatsu wrote: > > > >> On Tue, 5 Jan 2021 12:27:30 +0530 > >> "Naveen N. Rao" wrote: >

Re: [PATCH] selftests/ftrace: Disable multiple_kprobes test on powerpc

2021-01-05 Thread Masami Hiramatsu
On Tue, 5 Jan 2021 19:01:56 +0900 Masami Hiramatsu wrote: > On Tue, 5 Jan 2021 12:27:30 +0530 > "Naveen N. Rao" wrote: > > > Not all symbols are blacklisted on powerpc. Disable multiple_kprobes > > test until that is sorted, so that rest of ftrace and

Re: [PATCH] selftests/ftrace: Disable multiple_kprobes test on powerpc

2021-01-05 Thread Masami Hiramatsu
ppc*) exit_unsupported;; >*) OFFS=0;; > esac > > > base-commit: 36bbbd0e234d817938bdc52121a0f5473b3e58f5 > -- > 2.25.4 > -- Masami Hiramatsu

Re: [PATCH -tip v2] x86/kprobes: Do not decode opcode in resume_execution()

2021-01-03 Thread Masami Hiramatsu
On Thu, 31 Dec 2020 17:09:23 +0100 Borislav Petkov wrote: > On Fri, Dec 18, 2020 at 11:12:05PM +0900, Masami Hiramatsu wrote: > > @@ -467,8 +489,8 @@ static int arch_copy_kprobe(struct kprobe *p) > > */ > > len = prepare_boost(buf, p, ); > > > > -

Re: Unicode output with uprobe?

2021-01-02 Thread Masami Hiramatsu
se the > +0(%x0):string notation, I get only the first character. > > Do you know if there's a way around this? maybe use another function in the > sysfs framework that I could use? I'm debugging a third-party, user-mode *.so > file. > > Best, > Bar -- Masami Hiramatsu

Re: [PATCH v1 03/19] x86/insn: Add an insn_decode() API

2020-12-30 Thread Masami Hiramatsu
On Tue, 29 Dec 2020 21:06:54 +0100 Borislav Petkov wrote: > On Mon, Dec 28, 2020 at 10:15:10AM +0900, Masami Hiramatsu wrote: > > BTW, insn_decode() can return -EINVAL if !insn_complete(), is that OK? > > It does with this change. Or are you asking whether it returning -EINVAL

Re: [PATCH v1 02/19] x86/insn: Add @buf_len param to insn_init() kernel-doc comment

2020-12-27 Thread Masami Hiramatsu
On Wed, 23 Dec 2020 18:42:16 +0100 Borislav Petkov wrote: > From: Borislav Petkov > > It wasn't documented so add it. No functional changes. > Thank you for fixing! Acked-by: Masami Hiramatsu > Signed-off-by: Borislav Petkov > --- > arch/x86/lib/insn.c | 1 +

Re: [PATCH v1 03/19] x86/insn: Add an insn_decode() API

2020-12-27 Thread Masami Hiramatsu
tching the next insn byte and > the insn falls short, return -ENODATA to denote that. -ENODATA sounds good to me :) Acked-by: Masami Hiramatsu BTW, insn_decode() can return -EINVAL if !insn_complete(), is that OK? > > While at it, make insn_get_opcode() more stricter as to whethe

Re: [PATCH v5 2/5] tracing: Rework synthetic event command parsing

2020-12-24 Thread Masami Hiramatsu
On Wed, 23 Dec 2020 17:17:27 -0600 Tom Zanussi wrote: > Hi Masami, > > On Tue, 2020-12-22 at 21:42 +0900, Masami Hiramatsu wrote: > > Hi Tom, > > > > On Mon, 21 Dec 2020 15:44:28 -0600 > > Tom Zanussi wrote: > > > > > &

Re: [PATCH v1 0/2] perf arm64: Support SDT

2020-12-24 Thread Masami Hiramatsu
p the arguments for this special > case. Patch 02 is to add argument support for Arm64 SDT. Both patches look good to me. Acked-by: Masami Hiramatsu for the seires. Thank you! > > This patch set has been verified on Arm64/x86_64 platforms with a > testing program usdt_test [1

Re: [PATCH v5 2/5] tracing: Rework synthetic event command parsing

2020-12-22 Thread Masami Hiramatsu
rgv = argv_split(GFP_KERNEL, raw_command, ); > - if (!argv) > - return -ENOMEM; > + raw_command = skip_spaces(raw_command); > + if (raw_command[0] == '\0') > + return ret; > > - if (!argc) > - goto free; > + last_cmd_set(raw_command); > > - name = argv[0]; > + p = strpbrk(raw_command, " \t"); > + if (!p) > + return -EINVAL; Hmm, this may drop the ability to delete an event with "!name", it always requires some spaces after the name. Thank you, -- Masami Hiramatsu

Re: [PATCH] kretprobe: avoid re-registration of the same kretprobe earlier

2020-12-22 Thread Masami Hiramatsu
setting). How about this code? Is this work for you? diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 41fdbb7953c6..73500be564be 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -2103,6 +2103,14 @@ int register_kretprobe(struct kretprobe *rp) int i; void *addr; + /* It is not allowed to specify addr and symbol_name at the same time */ + if (rp->kp.addr && rp->kp.symbol_name) + return -EINVAL; + + /* If only rp->kp.addr is specified, check reregistering kprobes */ + if (rp->kp.addr && check_kprobe_rereg(>kp)) + return -EINVAL; + if (!kprobe_on_func_entry(rp->kp.addr, rp->kp.symbol_name, rp->kp.offset)) return -EINVAL; Thank you, -- Masami Hiramatsu

[PATCH -tip v2] x86/kprobes: Do not decode opcode in resume_execution()

2020-12-18 Thread Masami Hiramatsu
the opcode for resuming process. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) --- Changes in v2: - Fix the timing of memset() for avoiding unexpected cleanup of kprobe.ainsn.insn. --- arch/x86/include/asm/kprobes.h | 11 ++- arch/x86/kernel/kprobes/core.c | 167

Re: [x86/kprobes] 413d31338f: kernel_BUG_at_mm/vmalloc.c

2020-12-18 Thread Masami Hiramatsu
n()") > url: > https://github.com/0day-ci/linux/commits/Masami-Hiramatsu/x86-kprobes-Classify-opcode-while-preparing-kprobe/20201206-221324 > base: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git > 238c91115cd05c71447ea071624a4c9fe661f970 > > in testcase: trinity > v

Re: [BUG] perf probe can't remove probes

2020-12-15 Thread Masami Hiramatsu
On Thu, 26 Nov 2020 14:26:03 -0300 Arnaldo Carvalho de Melo wrote: > Em Thu, Nov 26, 2020 at 09:21:25AM +0900, Masami Hiramatsu escreveu: > > Hi Arnaldo, > > > > On Wed, 25 Nov 2020 14:27:55 -0300 > > Arnaldo Carvalho de Melo wrote: > > > > > >

Re: [PATCH] kretprobe: avoid re-registration of the same kretprobe earlier

2020-12-14 Thread Masami Hiramatsu
ShaoBo > > 在 2020/12/2 7:32, Masami Hiramatsu 写道: > > On Mon, 30 Nov 2020 16:18:50 -0500 > > Steven Rostedt wrote: > > > >> Masami, > >> > >> Can you review this patch, and also, should this go to -rc and stable? > >> > >> --

[tip: x86/urgent] x86/kprobes: Fix optprobe to detect INT3 padding correctly

2020-12-12 Thread tip-bot2 for Masami Hiramatsu
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 0d07c0ec4381f630c801539c79ad8dcc627f6e4a Gitweb: https://git.kernel.org/tip/0d07c0ec4381f630c801539c79ad8dcc627f6e4a Author:Masami Hiramatsu AuthorDate:Fri, 11 Dec 2020 16:04:17 +09:00

[PATCH] x86/kprobes: Fix optprobe to detect padding int3 correctly

2020-12-10 Thread Masami Hiramatsu
for linker fill bytes") Cc: sta...@vger.kernel.org Reported-by: Adam Zabrocki Signed-off-by: Masami Hiramatsu --- arch/x86/kernel/kprobes/opt.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel

Re: KRETPROBES are broken since kernel 5.8

2020-12-10 Thread Masami Hiramatsu
sidered. > > > > Looks like it's a default behavior now. OK, let me fix that. If the int3 is only used for the padding between functions, those int3 should continue to the end of the function. So kprobes can distinguish the int3 comes from other subsystems or linker. Thank you, > > > Thank you, > > > > > If it is OK, we should backport those to stable tree. > > > > Agreed. > > It is also important to make sure that distro kernels would pick-up such > backported fix. > > Thanks, > Adam > > -- > pi3 (pi3ki31ny) - pi3 (at) itsec pl > http://pi3.com.pl > -- Masami Hiramatsu

[PATCH 2/2] kprobes: Tell lockdep about kprobe nesting

2020-12-10 Thread Masami Hiramatsu
kernel.org # 5.9.x Cc: Peter Zijlstra Acked-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) --- kernel/kprobes.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index b885d884603d..1b7fd1ab8

[PATCH 1/2] kprobes: Remove NMI context check

2020-12-10 Thread Masami Hiramatsu
ger in_nmi() check. Cc: sta...@vger.kernel.org # 5.9.x Signed-off-by: Masami Hiramatsu Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/159870615628.1229682.6087311596892125907.stgit@devnote2 --- kernel/kprobes.c | 16 1 file

Re: KRETPROBES are broken since kernel 5.8

2020-12-10 Thread Masami Hiramatsu
Hi Adam, On Thu, 10 Dec 2020 08:17:42 +0100 Adam Zabrocki wrote: > Hi, > > On Thu, Dec 10, 2020 at 10:25:07AM +0900, Masami Hiramatsu wrote: > > Hi Adam, > > > > Thank you for reporting and debugging, actually we had investigated this > > issue in Aug. Please

Re: [RFC][PATCH] ftrace/selftests: Add binary test to verify ring buffer timestamps

2020-12-09 Thread Masami Hiramatsu
On Wed, 9 Dec 2020 09:49:19 -0500 Steven Rostedt wrote: > On Wed, 9 Dec 2020 08:39:54 +0900 > Masami Hiramatsu wrote: > > > > OK. I'll look at how to make this for both cases (embedded and not). > > > Because, my current case is to copy the selftests to the machine a

Re: KRETPROBES are broken since kernel 5.8

2020-12-09 Thread Masami Hiramatsu
> return 0; > } > > Essentially, exc_int3() calls nmi_enter(), and pre_handler_kretprobe() before > invoking any registered kprobe verifies if it is not in NMI via in_nmi() call. > > This bug was masked by OPTIMIZER which was turning most of the KPROBES to be > FTRACE so essentially if someone registered KRETPROBE, buggy code was not > invoked (FTRACE code was executed instead). However, the optimizer was changed > and can't optimize as many functions anymore (probably another bug which might > be worth to investigate) and this bug is more visible. > > Thanks, > Adam > > -- > pi3 (pi3ki31ny) - pi3 (at) itsec pl > http://pi3.com.pl > -- Masami Hiramatsu

[tip: perf/core] x86/kprobes: Restore BTF if the single-stepping is cancelled

2020-12-09 Thread tip-bot2 for Masami Hiramatsu
The following commit has been merged into the perf/core branch of tip: Commit-ID: 78ff2733ff352175eb7f4418a34654346e1b6cd2 Gitweb: https://git.kernel.org/tip/78ff2733ff352175eb7f4418a34654346e1b6cd2 Author:Masami Hiramatsu AuthorDate:Wed, 28 Oct 2020 23:31:10 +09:00

Re: [PATCH v3 3/5] tracing: Update synth command errors

2020-12-09 Thread Masami Hiramatsu
events interface is not self-reproducive*. *) I meant $ cat synthetic_events > saved_events $ cat saved_events > synthetic_events should work. But this does *NOT* mean $ cat user-input > synthetic_events $ cat synthetic_events > saved_events $ diff user-input saved_events # no diff So input and output can be different, but the output can be input again. Thank you, -- Masami Hiramatsu

[PATCH] tools/bootconfig: Add tracing_on support to helper scripts

2020-12-08 Thread Masami Hiramatsu
Add ftrace.instance.INSTANCE.tracing_on support to ftrace2bconf.sh and bconf2ftrace.sh. commit 8490db06f914 ("tracing/boot: Add per-instance tracing_on option support") added the per-instance tracing_on option, but forgot to update the helper scripts. Signed-off-by: Masami Hiramatsu

Re: [RFC][PATCH] ftrace/selftests: Add binary test to verify ring buffer timestamps

2020-12-08 Thread Masami Hiramatsu
On Tue, 8 Dec 2020 10:00:24 -0500 Steven Rostedt wrote: > On Tue, 8 Dec 2020 21:14:11 +0900 > Masami Hiramatsu wrote: > > > On Tue, 1 Dec 2020 16:06:56 -0500 > > Steven Rostedt wrote: > > > > > From: Steven Rostedt (VMware) > > > > > >

Re: [RFC][PATCH] ftrace/selftests: Add binary test to verify ring buffer timestamps

2020-12-08 Thread Masami Hiramatsu
pdie("Error loading events"); > + > + events_enable = tracefs_instance_get_file(NULL, "events/enable"); > + current_tracer = tracefs_instance_get_file(NULL, "current_tracer"); > + tracing_on = tracefs_instance_get_file(NULL, "tracing_on"); > + > + if (!events_enable || !current_tracer || !tracing_on) > + pdie("Allocating strings"); > + > + cpus = sysconf(_SC_NPROCESSORS_CONF); > + > + info = calloc(cpus, sizeof(*info)); > + if (!info) > + pdie("Allocating per cpu info"); > + > + efd = open(events_enable, O_WRONLY); > + if (efd < 0) > + pdie(events_enable); > + > + cfd = open(current_tracer, O_WRONLY); > + if (cfd < 0) > + pdie(current_tracer); > + > + tfd = open(tracing_on, O_WRONLY); > + if (tfd < 0) > + pdie(current_tracer); > + > + write(efd, "1", 1); > + write(cfd, "function", 8); > + > + test_buffer(tep, time); > + > + write(efd, "0", 1); > + write(cfd, "nop", 3); > + write(tfd, "1", 1); > + > + close(efd); > + close(cfd); > + close(tfd); > + exit(result); > +} > diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/ring-buffer.tc > b/tools/testing/selftests/ftrace/test.d/ftrace/ring-buffer.tc > new file mode 100644 > index ..05f628124774 > --- /dev/null > +++ b/tools/testing/selftests/ftrace/test.d/ftrace/ring-buffer.tc > @@ -0,0 +1,16 @@ > +#!/bin/sh > +# SPDX-License-Identifier: GPL-2.0 > +# description: ftrace - test ring buffer timestamps > + > +cd $TOP_DIR/test-ring-buffer > +if ! make ; then > + cd $TRACING_DIR > + exit_untested > +fi > + > +./test-ring-buffer 10 > + > +make clean > + > +cd $TRACING_DIR > + -- Masami Hiramatsu

Re: [PATCH v3 1/5] tracing/dynevent: Delegate parsing to create function

2020-12-08 Thread Masami Hiramatsu
On Mon, 7 Dec 2020 18:33:22 -0500 Steven Rostedt wrote: > > Hi Masami, > > You had comments on this patch for v2. Is this one fine for you? Yes, this part is good for me. v2 [1/4] is separated into v3 [1/5] and [2/5]. Acked-by: Masami Hiramatsu Thank you, > > -- Steve

[PATCH] tracing: Disable ftrace selftests when any tracer is running

2020-12-08 Thread Masami Hiramatsu
. Fixes: 4d655281eb1b ("tracing/boot Add kprobe event support") Cc: sta...@vger.kernel.org Signed-off-by: Masami Hiramatsu --- kernel/trace/trace.c | 19 +-- kernel/trace/trace.h |5 + kernel/trace/trace_boot.c |2 ++ kernel/trace/trac

Re: Ftrace startup test and boot-time tracing

2020-12-07 Thread Masami Hiramatsu
Hi Steve, On Mon, 7 Dec 2020 15:25:40 -0500 Steven Rostedt wrote: > On Mon, 7 Dec 2020 23:02:59 +0900 > Masami Hiramatsu wrote: > > > There will be the 2 options, one is to change kconfig so that user can not > > select FTRACE_STARTUP_TEST if BOOTTIME_TRACING=y,

Ftrace startup test and boot-time tracing

2020-12-07 Thread Masami Hiramatsu
ou, >From 00037083baca07a8705da39852480f6f53a8297c Mon Sep 17 00:00:00 2001 From: Masami Hiramatsu Date: Mon, 7 Dec 2020 22:53:16 +0900 Subject: [PATCH] tracing/kprobes: Fix to skip kprobe-events startup test if kprobe-events is used commit b6399cc78934 ("tracing/kprobe: Do not run kprobe boot tests if kprobe_event is on c

[PATCH 1/1] x86/kprobes: Do not decode opcode in resume_execution()

2020-12-06 Thread Masami Hiramatsu
the opcode for resuming process. Signed-off-by: Masami Hiramatsu --- arch/x86/include/asm/kprobes.h | 11 ++- arch/x86/kernel/kprobes/core.c | 166 ++-- 2 files changed, 80 insertions(+), 97 deletions(-) diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86

[PATCH 0/1] x86/kprobes: Classify opcode while preparing kprobe

2020-12-06 Thread Masami Hiramatsu
. So decode the opcode while preparing kprobes (arch_copy_kprobe()) instead of resume_execution() and set some flags for resuming from single stepping. This also removes the custom instruction prefix decoding, which should be done in x86 instruction decoder. Thank you, --- Masami Hiramatsu (1

[tip: x86/urgent] x86/sev-es: Use new for_each_insn_prefix() macro to loop over prefixes bytes

2020-12-06 Thread tip-bot2 for Masami Hiramatsu
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 84da009f06e60cf59d5e861f8e2101d2d3885517 Gitweb: https://git.kernel.org/tip/84da009f06e60cf59d5e861f8e2101d2d3885517 Author:Masami Hiramatsu AuthorDate:Thu, 03 Dec 2020 13:51:01 +09:00

[tip: x86/urgent] x86/insn-eval: Use new for_each_insn_prefix() macro to loop over prefixes bytes

2020-12-06 Thread tip-bot2 for Masami Hiramatsu
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 12cb908a11b2544b5f53e9af856e6b6a90ed5533 Gitweb: https://git.kernel.org/tip/12cb908a11b2544b5f53e9af856e6b6a90ed5533 Author:Masami Hiramatsu AuthorDate:Thu, 03 Dec 2020 13:50:50 +09:00

[tip: x86/urgent] x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes

2020-12-06 Thread tip-bot2 for Masami Hiramatsu
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 4e9a5ae8df5b3365183150f6df49e49dece80d8c Gitweb: https://git.kernel.org/tip/4e9a5ae8df5b3365183150f6df49e49dece80d8c Author:Masami Hiramatsu AuthorDate:Thu, 03 Dec 2020 13:50:37 +09:00

Re: [tip: x86/urgent] x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes

2020-12-05 Thread Masami Hiramatsu
On Sat, 5 Dec 2020 11:17:04 +0100 Borislav Petkov wrote: > On Sat, Dec 05, 2020 at 09:12:56AM +0900, Masami Hiramatsu wrote: > > This may break tools/objtool build. Please keep "inat.h". > > How? Please elaborate. > > Build tests are fine here. Oops, sorry,

Re: [PATCH v3 0/3] x86/insn: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-04 Thread Masami Hiramatsu
On Fri, 4 Dec 2020 16:02:21 +0100 Borislav Petkov wrote: > On Fri, Dec 04, 2020 at 07:55:09PM +0900, Masami Hiramatsu wrote: > > Hi, > > > > Here are the 3rd version of patches to fix the wrong loop boundary > > check on insn.prefixes.bytes[] array. > >

Re: [tip: x86/urgent] x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes

2020-12-04 Thread Masami Hiramatsu
On Fri, 04 Dec 2020 15:04:03 - "tip-bot2 for Masami Hiramatsu" wrote: > The following commit has been merged into the x86/urgent branch of tip: > > Commit-ID: 9dc23f960adb9ce410ef835b32a2398fdb09c828 > Gitweb: > https://git.kernel.org/tip/9dc23f960adb9ce

Re: [PATCH v3 1/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-04 Thread Masami Hiramatsu
On Fri, 4 Dec 2020 16:05:22 +0100 Borislav Petkov wrote: > On Fri, Dec 04, 2020 at 07:55:20PM +0900, Masami Hiramatsu wrote: > > +/** > > + * for_each_insn_prefix() -- Iterate prefixes in the instruction > > + * @insn: Pointer to struct insn. > > + * @idx: Index stora

[tip: x86/urgent] x86/sev-es: Use new for_each_insn_prefix() macro to loop over prefixes bytes

2020-12-04 Thread tip-bot2 for Masami Hiramatsu
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 46a4ad7814fa39971aa6549b30c1a08d5c2ec65f Gitweb: https://git.kernel.org/tip/46a4ad7814fa39971aa6549b30c1a08d5c2ec65f Author:Masami Hiramatsu AuthorDate:Thu, 03 Dec 2020 13:51:01 +09:00

[tip: x86/urgent] x86/insn-eval: Use new for_each_insn_prefix() macro to loop over prefixes bytes

2020-12-04 Thread tip-bot2 for Masami Hiramatsu
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 2d7896c24ec977e91af1ff93c823032a27212700 Gitweb: https://git.kernel.org/tip/2d7896c24ec977e91af1ff93c823032a27212700 Author:Masami Hiramatsu AuthorDate:Thu, 03 Dec 2020 13:50:50 +09:00

[tip: x86/urgent] x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes

2020-12-04 Thread tip-bot2 for Masami Hiramatsu
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 9dc23f960adb9ce410ef835b32a2398fdb09c828 Gitweb: https://git.kernel.org/tip/9dc23f960adb9ce410ef835b32a2398fdb09c828 Author:Masami Hiramatsu AuthorDate:Thu, 03 Dec 2020 13:50:37 +09:00

Re: [PATCH v2 1/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-04 Thread Masami Hiramatsu
On Fri, 4 Dec 2020 12:06:44 +0100 Borislav Petkov wrote: > On Fri, Dec 04, 2020 at 09:56:53AM +0900, Masami Hiramatsu wrote: > > Hmm, there is a difference between Intel SDM and AMD APM. > > > > Intel SDM vol.2 > > > > 2.1.1 Instruction Prefixes > > Ins

[PATCH v3 0/3] x86/insn: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-04 Thread Masami Hiramatsu
ray. Or, if the prefixes.bytes[] is filled with prefix bytes, we can check the index is less than 4. Thank you, --- Masami Hiramatsu (3): x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes x86/insn-eval: Fix not using prefixes.nbytes for loop over prefixes.bytes

[PATCH v3 1/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-04 Thread Masami Hiramatsu
u Signed-off-by: Masami Hiramatsu Cc: sta...@vger.kernel.org --- Changes in v3: - Add NUM_INSN_FIELD_BYTES and MAX_LEGACY_PREFIX_GROUPS macros and comments on it. Changes in v2: - Add for_each_insn_prefix() macro and fix to check index first. --- arch/x86/include/asm/insn.h

[PATCH v3 3/3] x86/sev-es: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-04 Thread Masami Hiramatsu
ceptions") Reported-by: syzbot+9b64b619f10f19d19...@syzkaller.appspotmail.com Debugged-by: Kees Cook Signed-off-by: Masami Hiramatsu --- arch/x86/boot/compressed/sev-es.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/boot/compressed/sev-es.c b/arch/x86/boot/c

[PATCH v3 2/3] x86/insn-eval: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-04 Thread Masami Hiramatsu
segment selector") Reported-by: syzbot+9b64b619f10f19d19...@syzkaller.appspotmail.com Debugged-by: Kees Cook Signed-off-by: Masami Hiramatsu Cc: sta...@vger.kernel.org --- arch/x86/lib/insn-eval.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/lib/insn-

Re: [PATCH v2 1/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-03 Thread Masami Hiramatsu
On Fri, 4 Dec 2020 09:56:53 +0900 Masami Hiramatsu wrote: > On Thu, 3 Dec 2020 12:49:46 -0600 > Tom Lendacky wrote: > > > On 12/3/20 12:17 PM, Borislav Petkov wrote: > > > On Thu, Dec 03, 2020 at 12:10:10PM -0600, Tom Lendacky wrote: > > >> Since that struct

Re: [PATCH v2 1/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-03 Thread Masami Hiramatsu
sp in the prefixes.bytes[], and just increment prefixes.nbytes for the repeated prefixes. Anyway, if there is LOCK-REP prefix combination, I have to introduce new insn_field for legacy prefix. Thank you, -- Masami Hiramatsu

Re: [PATCH v2 1/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-03 Thread Masami Hiramatsu
On Thu, 3 Dec 2020 13:37:57 +0100 Borislav Petkov wrote: > On Thu, Dec 03, 2020 at 01:50:37PM +0900, Masami Hiramatsu wrote: > > Since the insn.prefixes.nbytes can be bigger than the size of > > insn.prefixes.bytes[] when a same prefix is repeated, we have to &g

Re: [PATCH v2 1/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-03 Thread Masami Hiramatsu
On Thu, 3 Dec 2020 10:45:48 -0600 Tom Lendacky wrote: > On 12/3/20 6:48 AM, Borislav Petkov wrote: > > So it ended up like this: > > > > --- > > From 5014e4e902778d63ce392f864b3654baa4b72384 Mon Sep 17 00:00:00 2001 > > From: Masami Hiramatsu > &g

[PATCH v2 3/3] x86/sev-es: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
ceptions") Reported-by: syzbot+9b64b619f10f19d19...@syzkaller.appspotmail.com Debugged-by: Kees Cook Signed-off-by: Masami Hiramatsu --- arch/x86/boot/compressed/sev-es.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/boot/compressed/sev-es.c b/arch/x86/boot/c

[PATCH v2 2/3] x86/insn-eval: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
segment selector") Reported-by: syzbot+9b64b619f10f19d19...@syzkaller.appspotmail.com Debugged-by: Kees Cook Signed-off-by: Masami Hiramatsu Cc: sta...@vger.kernel.org --- arch/x86/lib/insn-eval.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/lib/insn-

[PATCH v2 1/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
xes: 2b1444983508 ("uprobes, mm, x86: Add the ability to install and remove uprobes breakpoints") Reported-by: syzbot+9b64b619f10f19d19...@syzkaller.appspotmail.com Debugged-by: Kees Cook Reviewed-by: Srikar Dronamraju Signed-off-by: Masami Hiramatsu Cc: sta...@vger.kernel.org --- Changes i

[PATCH v2 0/3] x86/insn: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
dex is less than 4. Thank you, --- Masami Hiramatsu (3): x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes x86/insn-eval: Fix not using prefixes.nbytes for loop over prefixes.bytes x86/sev-es: Fix not using prefixes.nbytes for loop over prefixes.bytes arch/

Re: [PATCH 2/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
On Wed, 2 Dec 2020 20:21:35 +0530 Srikar Dronamraju wrote: > * Masami Hiramatsu [2020-12-02 17:51:16]: > > > Since the insn.prefixes.nbytes can be bigger than the size of > > insn.prefixes.bytes[] when a same prefix is repeated, we have to > > check whether the ins

Re: [PATCH 1/3] x86/sev-es: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
On Wed, 2 Dec 2020 11:07:26 -0800 Kees Cook wrote: > On Wed, Dec 02, 2020 at 09:31:57AM -0600, Tom Lendacky wrote: > > On 12/2/20 2:51 AM, Masami Hiramatsu wrote: > > > Since the insn.prefixes.nbytes can be bigger than the size of > > > insn.prefixes.bytes[] when a

Re: [PATCH 2/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
On Wed, 2 Dec 2020 11:04:41 -0800 Kees Cook wrote: > On Wed, Dec 02, 2020 at 05:51:16PM +0900, Masami Hiramatsu wrote: > > Since the insn.prefixes.nbytes can be bigger than the size of > > insn.prefixes.bytes[] when a same prefix is repeated, we have to > > check whether th

[PATCH 2/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
d remove uprobes breakpoints") Cc: sta...@vger.kernel.org Reported-by: Kees Cook Signed-off-by: Masami Hiramatsu --- arch/x86/kernel/uprobes.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c index 3fdaa042823d.

[PATCH 3/3] x86/insn-eval: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
segment selector") Cc: sta...@vger.kernel.org Reported-by: Kees Cook Signed-off-by: Masami Hiramatsu --- arch/x86/lib/insn-eval.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/lib/insn-eval.c b/arch/x86/lib/insn-eval.c index 58f7fb95c7f4..c52c91461f52 100644 -

[PATCH 0/3] x86/insn: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
tes the end of the array. Or, if the prefixes.bytes[] is filled with prefix bytes, we can check the index is less than 4. Thank you, --- Masami Hiramatsu (3): x86/sev-es: Fix not using prefixes.nbytes for loop over prefixes.bytes x86/uprobes: Fix not using prefixes.nbytes for loop o

[PATCH 1/3] x86/sev-es: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
ceptions") Reported-by: Kees Cook Signed-off-by: Masami Hiramatsu --- arch/x86/boot/compressed/sev-es.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/sev-es.c b/arch/x86/boot/compressed/sev-es.c index 954cb2702e23..6a7a3027c9ac 100644 --- a/

Re: UBSAN: array-index-out-of-bounds in arch_uprobe_analyze_insn

2020-12-01 Thread Masami Hiramatsu
; console output: https://syzkaller.appspot.com/x/log.txt?x=1197348d90 > > kernel config: https://syzkaller.appspot.com/x/.config?x=b12e84189082991c > > dashboard link: https://syzkaller.appspot.com/bug?extid=9b64b619f10f19d19a7c > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1573a8ad90 > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=164ee6c590 > > > > Reported-by: syzbot+9b64b619f10f19d19...@syzkaller.appspotmail.com > > Fixes: 4b2bd5fec007 ("proc: fix timerslack_ns CAP_SYS_NICE check when > > adjusting self") > > > > For information about bisection process see: https://goo.gl/tpsmEJ#bisection > > -- > Kees Cook -- Masami Hiramatsu

Re: [PATCH 0/3] bootconfig: Make size and checksum fields le32

2020-12-01 Thread Masami Hiramatsu
On Tue, 1 Dec 2020 10:48:18 -0500 Steven Rostedt wrote: > On Fri, 20 Nov 2020 11:28:55 +0900 > Masami Hiramatsu wrote: > > > Hello, > > > > This is a series of patches to make the size and the checksum fields > > in the footer le32 instead of u32. > > &

Re: [PATCH] kretprobe: avoid re-registration of the same kretprobe earlier

2020-12-01 Thread Masami Hiramatsu
return -EINVAL; addr = kprobe_addr(>kp); if (IS_ERR(addr)) return PTR_ERR(addr); rp->kp.addr = addr; ret = check_kprobe_rereg(>kp); if (WARN_ON(ret)) return ret; if (kretprobe_blacklist_size) { for (i = 0; > > + ret = check_kprobe_rereg(>kp); Thank you, -- Masami Hiramatsu

Re: [RFC PATCH v0 00/19] x86/insn: Add an insn_decode() API

2020-11-30 Thread Masami Hiramatsu
On Mon, 30 Nov 2020 14:44:42 +0100 Borislav Petkov wrote: > On Sun, Nov 29, 2020 at 05:50:05PM +0900, Masami Hiramatsu wrote: > > Good point. I think we can return, e.g. -EFAULT if we failed in > > get_next(). Then, we can read out next page, for example. > > Why -EFAULT?

Re: [RFC PATCH v0 00/19] x86/insn: Add an insn_decode() API

2020-11-29 Thread Masami Hiramatsu
if you pass in garbage? > How hard would it be to teach it to return a different error code when > the buffer is too small? > Good point. I think we can return, e.g. -EFAULT if we failed in get_next(). Then, we can read out next page, for example. Thank you, -- Masami Hiramatsu

Re: [RFC PATCH v0 03/19] x86/insn: Add an insn_decode() API

2020-11-26 Thread Masami Hiramatsu
On Thu, 26 Nov 2020 18:50:11 +0100 Borislav Petkov wrote: > On Thu, Nov 26, 2020 at 10:37:09AM +0900, Masami Hiramatsu wrote: > > BTW, the instruction validation depends on who needs it, because to > > check the all invalid ops, we need more information in the > &g

[PATCH 2/2] perf-probe: Change function definition check due to broken dwarf

2020-11-26 Thread Masami Hiramatsu
. Reported-by: Thomas Richter Signed-off-by: Masami Hiramatsu --- tools/perf/util/dwarf-aux.c| 20 ++-- tools/perf/util/probe-finder.c |3 +-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c index

[PATCH 1/2] perf-probe: Fix to die_entrypc() returns error correctly

2020-11-26 Thread Masami Hiramatsu
Signed-off-by: Masami Hiramatsu --- tools/perf/util/dwarf-aux.c |8 1 file changed, 8 insertions(+) diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c index aa898014ad12..03c1a39c312a 100644 --- a/tools/perf/util/dwarf-aux.c +++ b/tools/perf/util/dwarf-aux.c @@ -373,6 +373

Re: [RFC PATCH v0 03/19] x86/insn: Add an insn_decode() API

2020-11-25 Thread Masami Hiramatsu
On Wed, 25 Nov 2020 20:25:53 +0100 Borislav Petkov wrote: > On Thu, Nov 26, 2020 at 01:53:33AM +0900, Masami Hiramatsu wrote: > > (only from the viewpoint of VEX coding, a bit stricter, but not perfect.) > > Yeah, I wanted to document the fact that it has changed behavior

Re: [BUG] perf probe can't remove probes

2020-11-25 Thread Masami Hiramatsu
ere is non-digit char in line number. > Error: Command Parse Error. > [root@seventh ~]# perf probe probe:security_locked_down__return > Semantic error :There is non-digit char in line number. > Error: Command Parse Error. Since you don't pass any option, both are for adding new probe event. What happen if you run $ perf probe -d "*:*" ? Thank you, -- Masami Hiramatsu

Re: [RFC PATCH v0 10/19] x86/kprobes: Convert to insn_decode()

2020-11-25 Thread Masami Hiramatsu
On Tue, 24 Nov 2020 11:19:43 +0100 Borislav Petkov wrote: > From: Borislav Petkov > > Simplify code, no functional changes. You've made a functional change. Improve decoding error check :) Anyway, this looks good to me. Acked-by: Masami Hiramatsu Thank you! > > Signed-o

Re: [RFC PATCH v0 03/19] x86/insn: Add an insn_decode() API

2020-11-25 Thread Masami Hiramatsu
initialized > + * @kaddr: address (in kernel memory) of instruction (or copy thereof) > + * @buf_len: length of the insn buffer at @kaddr > + * @m: insn mode, see enum insn_mode > + * > + * Returns: > + * 0: if decoding succeeded > + * < 0: otherwise. this return value. Even for the insn_get_*(), I would like to see them returning -EINVAL as same as insn_decode(). Same API group has different return value is confusing. Thank you, -- Masami Hiramatsu

Re: [PATCH] x86/insn: Fix vector instructions decoding on big endian

2020-11-25 Thread Masami Hiramatsu
ies and resend it again. > > > > It all looks good to me, thanks! > > > > Masami, does this patch look good, and also patches 1-2 of the series? > > (I think you previously ACKed patch 2). > > > > Friendly ping... Sorry for replying late. Yes, I think this series and the last patch look good to me. Acked-by: Masami Hiramatsu for this series. Thank you! -- Masami Hiramatsu

Re: [RFC PATCH v0 00/19] x86/insn: Add an insn_decode() API

2020-11-25 Thread Masami Hiramatsu
hank you, > > When you give it a buffer of size smaller than the first instruction: > > supplied buf size: 1, ret -22 > > while the first insn is 2 bytes long: > > 0x48 0xcf (IRETQ) > > then it signals an error. > > Andy, does that work for your use cases? > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette -- Masami Hiramatsu

[PATCH 3/3] docs: bootconfig: Add the endianness of fields

2020-11-19 Thread Masami Hiramatsu
Add a description about the endianness of the size and the checksum fields. Those must be stored as le32 instead of u32. This will allow us to apply bootconfig to the cross build initrd without caring the endianness. Reported-by: Steven Rostedt Suggested-by: Linus Torvalds Signed-off-by: Masami

[PATCH 1/3] bootconfig: Load size and checksum in the footer as le32

2020-11-19 Thread Masami Hiramatsu
Load the size and the checksum fields in the footer as le32 instead of u32. This will allow us to apply bootconfig to the cross build initrd without caring the endianness. Reported-by: Steven Rostedt Suggested-by: Linus Torvalds Signed-off-by: Masami Hiramatsu --- init/main.c |4 ++-- 1

[PATCH 2/3] tools/bootconfig: Store size and checksum in footer as le32

2020-11-19 Thread Masami Hiramatsu
Store the size and the checksum fields in the footer as le32 instead of u32. This will allow us to apply bootconfig to the cross build initrd without caring the endianness. Reported-by: Steven Rostedt Suggested-by: Linus Torvalds Signed-off-by: Masami Hiramatsu --- tools/bootconfig/main.c

[PATCH 0/3] bootconfig: Make size and checksum fields le32

2020-11-19 Thread Masami Hiramatsu
...@gandalf.local.home/ [2] https://lore.kernel.org/linux-doc/CAHk-=wi9redsqogf06dvs2mp7tbp4qoiw8+xzzncdfjr3zo...@mail.gmail.com/ --- Masami Hiramatsu (3): bootconfig: Load size and checksum in the footer as le32 tools/bootconfig: Store size and checksum in footer as le32 docs: bootconfig: Add

[PATCH 0/3] bootconfig: Make size and checksum fields le32

2020-11-19 Thread Masami Hiramatsu
...@gandalf.local.home/ [2] https://lore.kernel.org/linux-doc/CAHk-=wi9redsqogf06dvs2mp7tbp4qoiw8+xzzncdfjr3zo...@mail.gmail.com/ --- Masami Hiramatsu (3): bootconfig: Load size and checksum in the footer as le32 tools/bootconfig: Store size and checksum in footer as le32 docs: bootconfig: Add

Re: [RFC PATCH 0/3] bootconfig: Use hexadecimal ASCII string for size and checksum

2020-11-19 Thread Masami Hiramatsu
On Thu, 19 Nov 2020 12:42:34 -0500 Steven Rostedt wrote: > On Thu, 19 Nov 2020 09:36:47 -0800 > Linus Torvalds wrote: > > > On Thu, Nov 19, 2020 at 6:31 AM Masami Hiramatsu > > wrote: > > > > > > Here is a seires of patches to change the bootco

[RFC PATCH 3/3] docs: bootconfig: Use hexadecimal ASCII string for size and checksum

2020-11-19 Thread Masami Hiramatsu
-off-by: Masami Hiramatsu --- Documentation/admin-guide/bootconfig.rst |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/bootconfig.rst b/Documentation/admin-guide/bootconfig.rst index 363599683784..1c6d6919d9e6 100644 --- a/Documentation/admin

[RFC PATCH 2/3] tools/bootconfig: Use hexadecimal ASCII string for size and checksum

2020-11-19 Thread Masami Hiramatsu
handle new format. Signed-off-by: Masami Hiramatsu --- tools/bootconfig/main.c | 43 ++- tools/bootconfig/test-bootconfig.sh |2 +- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c index

[RFC PATCH 1/3] bootconfig: Use hexadecimal ASCII string for size and checksum

2020-11-19 Thread Masami Hiramatsu
To make the bootconfig format more platform independent, use 8-bytes hexadecimal ASCII string for size and checksum field in the footer. This will allow us to apply bootconfig to the cross build initrd without caring the endianness. Signed-off-by: Masami Hiramatsu --- init/main.c | 20

<    2   3   4   5   6   7   8   9   10   11   >