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
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
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
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
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
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
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-
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
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
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
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
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
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-
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
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/
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
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
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
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.
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
-
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
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/
; 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
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.
> >
&
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
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?
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
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
.
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
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
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
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
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
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
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
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
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
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
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
...@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
...@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
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
-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
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
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
://lore.kernel.org/lkml/20201118112249.30d20...@gandalf.local.home/
---
Masami Hiramatsu (3):
bootconfig: Use hexadecimal ASCII string for size and checksum
tools/bootconfig: Use hexadecimal ASCII string for size and checksum
docs: bootconfig: Use hexadecimal ASCII string for size and checksum
To align the total file size, add padding null character when appending
the bootconfig to initrd image.
Signed-off-by: Masami Hiramatsu
---
0 files changed
diff --git a/Documentation/admin-guide/bootconfig.rst
b/Documentation/admin-guide/bootconfig.rst
index a22024f9175e..363599683784 100644
.
[initrd][bootconfig][(pad)][size][csum]["#BOOTCONFIG\n"]
Signed-off-by: Masami Hiramatsu
---
Changes in v5:
- Sort the local variables by length.
- Remove if from padding size calculation (alignment should be power of two)
- Cleanup footer setup code.
- Fix a bug if write()
-by: Linus Torvalds
Signed-off-by: Masami Hiramatsu
---
Changes in v5:
- Return -ENOSPC for partial write.
---
tools/bootconfig/main.c | 30 ++
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/ma
Fix not to refer the errno variable as the result of previous libc
functions after printf() because printf() can change the errno.
Fixes: 85c46b78da58 ("bootconfig: Add bootconfig magic word for indicating
bootconfig explicitly")
Signed-off-by: Masami Hiramatsu
---
tools/bootcon
| 121 +++
tools/bootconfig/test-bootconfig.sh |6 +-
2 files changed, 85 insertions(+), 42 deletions(-)
--
Masami Hiramatsu (Linaro)
On Thu, 19 Nov 2020 00:35:35 +0900
Masami Hiramatsu wrote:
> Fix to check the write(2) failure including partial write
> correctly and try to rollback the partial write, because
> if there is no BOOTCONFIG_MAGIC string, we can not remove it.
>
> Fixes: 85c46b78da58 ("bootco
On Wed, 18 Nov 2020 11:22:49 -0500
Steven Rostedt wrote:
> On Thu, 19 Nov 2020 00:35:44 +0900
> Masami Hiramatsu wrote:
>
> > +
> > + /* To align up the total size to BOOTCONFIG_ALIGN, get padding size */
> > + total_size = stat.st_size + size + sizeof(u32) * 2
On Wed, 18 Nov 2020 11:04:37 -0500
Steven Rostedt wrote:
> On Thu, 19 Nov 2020 00:35:35 +0900
> Masami Hiramatsu wrote:
>
> > Fix to check the write(2) failure including partial write
> > correctly and try to rollback the partial write, because
> > if there is no
To align the total file size, add padding null character when appending
the bootconfig to initrd image.
Signed-off-by: Masami Hiramatsu
---
0 files changed
diff --git a/Documentation/admin-guide/bootconfig.rst
b/Documentation/admin-guide/bootconfig.rst
index a22024f9175e..363599683784 100644
.
[initrd][bootconfig][(pad)][size][csum]["#BOOTCONFIG\n"]
Signed-off-by: Masami Hiramatsu
Tested-by: Chen Yu
---
Changes in v3:
- Fix patch description
- Fix a typo.
- Consolidate several write()s to 1 time write to fix/simplify
the error check.
Changes in v2:
- Fix to add
-by: Linus Torvalds
Signed-off-by: Masami Hiramatsu
Tested-by: Chen Yu
---
tools/bootconfig/main.c | 27 +++
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 52eb2bbe8966..905bfaefae35 100644
-
Fix not to refer the errno variable as the result of previous libc
functions after printf() because printf() can change the errno.
Fixes: 85c46b78da58 ("bootconfig: Add bootconfig magic word for indicating
bootconfig explicitly")
Signed-off-by: Masami Hiramatsu
---
tools/bootcon
-Boot/EDK2 would not change it. So I couldn't
say what is the best size.
Anyway, I updated the documentation too, which clearly says that
the above changing points, and if the bootloader pass the wrong
size, kernel will not find bootconfig from the initrd.
Thank you,
---
Masami Hiramatsu (4
From: Luo Meng
Fix a mutex_unlock() issue where before copy_from_user() is
not called mutex_locked.
Fixes: 4b1a29a7f542 ("error-injection: Support fault injection framework")
Reported-by: Hulk Robot
Acked-by: Masami Hiramatsu
Signed-off-by: Luo Meng
Signed-off-by: Masami Hiramat
Hi,
On Tue, 17 Nov 2020 20:08:08 -0800
Alexei Starovoitov wrote:
> On Wed, Nov 11, 2020 at 1:31 AM Masami Hiramatsu wrote:
> >
> > Hi Luo,
> >
> > On Tue, 10 Nov 2020 16:42:45 +0800
> > Luo Meng wrote:
> >
> > > Fix a mutex_unlock() issue w
On Tue, 17 Nov 2020 20:10:10 +0800
Chen Yu wrote:
> On Tue, Nov 17, 2020 at 5:53 PM Masami Hiramatsu wrote:
> >
> > Fix to check the write(2) failure including partial write
> > correctly and try to rollback the partial write, because
> > if there is no BOOT
To align the total file size, add padding null character when appending
the bootconfig to initrd image.
Signed-off-by: Masami Hiramatsu
---
Documentation/admin-guide/bootconfig.rst | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/Documentation/admin
, kernel will not find bootconfig from the initrd.
Thank you,
---
Masami Hiramatsu (3):
tools/bootconfig: Fix to check the write failure correctly
tools/bootconfig: Align the bootconfig applied initrd image size to 4
docs: bootconfig: Update file format on initrd image
.
[initrd][bootconfig][(pad)][size][csum]["#BOOTCONFIG\n"]
Signed-off-by: Masami Hiramatsu
---
Changes in v3:
- Fix patch description
- Fix a typo.
- Consolidate several write()s to 1 time write to fix/simplify
the error check.
Changes in v2:
- Fix to add the footer size.
--
-by: Linus Torvalds
Signed-off-by: Masami Hiramatsu
---
tools/bootconfig/main.c | 27 +++
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index eb92027817a7..f7b89a50404c 100644
--- a/tools/bootconfig/ma
On Mon, 16 Nov 2020 10:29:45 -0800
Linus Torvalds wrote:
> On Mon, Nov 16, 2020 at 8:22 AM Masami Hiramatsu wrote:
> >
> > /* TODO: Ensure the @path is initramfs/initrd image */
> > - ret = write(fd, data, size + 8);
> > + ret = write(fd, data, siz
the wrong
size, kernel will not find bootconfig from the initrd.
Thank you,
---
Masami Hiramatsu (2):
tools/bootconfig: Align the bootconfig applied initrd image size to 4
Documentation: bootconfig: Update file format on initrd image
tools/bootconfig/main.c | 36
Align the bootconfig applied initrd image size to 4. To pad the data,
bootconfig will use space (0x20) in front of the bootconfig data,
and expands its size and update checksum.
Signed-off-by: Masami Hiramatsu
---
Changes in v2:
- Fix to add the footer size.
---
tools/bootconfig/main.c
To align the total file size, add padding null character when appending
the bootconfig to initrd image.
Signed-off-by: Masami Hiramatsu
---
0 files changed
diff --git a/Documentation/admin-guide/bootconfig.rst
b/Documentation/admin-guide/bootconfig.rst
index a22024f9175e..363599683784 100644
On Tue, 17 Nov 2020 00:05:53 +0900
Masami Hiramatsu wrote:
> Align the bootconfig applied initrd image size to 4. To pad the data,
> bootconfig will use space (0x20) in front of the bootconfig data,
> and expands its size and update checksum.
>
> Signed-off-by: M
To align the total file size, add padding null character when appending
the bootconfig to initrd image.
Signed-off-by: Masami Hiramatsu
---
Documentation/admin-guide/bootconfig.rst | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/Documentation/admin
Align the bootconfig applied initrd image size to 4. To pad the data,
bootconfig will use space (0x20) in front of the bootconfig data,
and expands its size and update checksum.
Signed-off-by: Masami Hiramatsu
---
include/linux/bootconfig.h |1 +
tools/bootconfig/main.c
/EDK2 will
not change it. So I couldn't say what is the best size.
Anyway, I updated the documentation too, which clearly says that
the above changing points, and if the bootloader pass the wrong
size, kernel will not find bootconfig from the initrd.
Thank you,
---
Masami Hiramatsu (2
y to me to update bootconfig tool to align up the total size
to 32bytes, but I think 4 bytes align is OK if we document it. Without
documentation, no one in the bootloader decides what is the correct
format.
Thank you,
--
Masami Hiramatsu
On Fri, 13 Nov 2020 09:27:38 +0800
Chen Yu wrote:
> On Fri, Nov 13, 2020 at 1:27 AM Masami Hiramatsu wrote:
> >
> > Since Grub may align the size of initrd to 4 if user pass
> > initrd from cpio, we have to check the preceding 3 bytes as well.
> >
> > Fixe
Since Grub may align the size of initrd to 4 if user pass
initrd from cpio, we have to check the preceding 3 bytes as well.
Fixes: 85c46b78da58 ("bootconfig: Add bootconfig magic word for indicating
bootconfig explicitly")
Reported-by: Chen Yu
Signed-off-by: Masami Hiramatsu
---
i
On Thu, 12 Nov 2020 14:49:16 +0800
Chen Yu wrote:
> On Thu, Nov 12, 2020 at 1:50 PM Masami Hiramatsu wrote:
> >
> > Hi Chen,
> >
> > On Thu, 12 Nov 2020 12:34:36 +0800
> > Chen Yu wrote:
> >
> > > Hi Masami,
> > >
> > &
Hi Chen,
On Thu, 12 Nov 2020 12:34:36 +0800
Chen Yu wrote:
> Hi Masami,
>
> On Wed, Nov 11, 2020 at 5:37 PM Masami Hiramatsu wrote:
> >
> > Hi Chen,
> >
> > On Tue, 10 Nov 2020 23:39:53 +0800
> > Chen Yu wrote:
> >
> > > Hi Masami
end might be aligned. Could you print out the
actuall address of initrd_end? And could you tell me which platform are
you tested?
Thank you,
--
Masami Hiramatsu
Hi Luo,
On Tue, 10 Nov 2020 16:42:45 +0800
Luo Meng wrote:
> Fix a mutex_unlock() issue where before copy_from_user() is
> not called mutex_locked.
Oops, thank you for the fix.
Acked-by: Masami Hiramatsu
>
> Fixes: 4b1a29a7f542 ("error-injection: Support fault in
e kernel?
If not, you do not need this patch for stable kernels.
Thank you,
> Cc: Peter Zijlstra
> Acked-by: Masami Hiramatsu
> Signed-off-by: Steven Rostedt (VMware)
> Signed-off-by: Sasha Levin
> ---
> kernel/kprobes.c | 25 +
> 1 file changed, 2
E_REGS flag set, it that helper function will return NULL.
>
> This will allow the ftrace_regs to hold enough just to get the parameters
> and stack pointer, but without the worry that callbacks may have a pt_regs
> that is not completely filled.
>
This looks good to me.
Reviewed-by:
ttps://lkml.kernel.org/r/20201028115613.140212...@goodmis.org
>
Looks good to me.
Acked-by: Masami Hiramatsu
Thank you!
> Cc: Andrew Morton
> Cc: Masami Hiramatsu
> Cc: Guo Ren
> Cc: "James E.J. Bottomley"
> Cc: Helge Deller
> Cc: Michael Ellerman
> Cc: Benjami
if (unlikely(!validate_next(t, insn, 0))) goto err_out;
> > __get_next(t, insn); })
> > ^
> > >> arch/x86/tools/insn_sanity.c:128:19: warning: implicit declaration of
> > >> function 'ARRAY_SIZE' [-Wimplicit-function-declaration]
> >tmp = fgets(buf, ARRAY_SIZE(buf), input_file);
> > ^
> >37 warnings generated.
> >/usr/bin/ld: /tmp/insn_sanity-8655a9.o: in function `insn_get_prefixes':
> > >> insn_sanity.c:(.text+0x1bd): undefined reference to `unlikely'
> > >> /usr/bin/ld: insn_sanity.c:(.text+0x203): undefined reference to
> > >> `unlikely'
> >/usr/bin/ld: insn_sanity.c:(.text+0x24d): undefined reference to
> > `unlikely'
> >/usr/bin/ld: insn_sanity.c:(.text+0x30f): undefined reference to
> > `unlikely'
> >/usr/bin/ld: insn_sanity.c:(.text+0x353): undefined reference to
> > `unlikely'
> >/usr/bin/ld: /tmp/insn_sanity-8655a9.o:insn_sanity.c:(.text+0x38e): more
> > undefined references to `unlikely' follow
> >/usr/bin/ld: /tmp/insn_sanity-8655a9.o: in function `main':
> > >> insn_sanity.c:(.text+0x13cf): undefined reference to `ARRAY_SIZE'
> >/usr/bin/ld: /tmp/insn_sanity-8655a9.o: in function
> > `__insn_get_emulate_prefix':
> >insn_sanity.c:(.text+0x1cc1): undefined reference to `unlikely'
> >/usr/bin/ld: insn_sanity.c:(.text+0x1cef): undefined reference to
> > `unlikely'
> >/usr/bin/ld: insn_sanity.c:(.text+0x1d1f): undefined reference to
> > `unlikely'
> >/usr/bin/ld: insn_sanity.c:(.text+0x1d47): undefined reference to
> > `unlikely'
> >/usr/bin/ld: insn_sanity.c:(.text+0x1d6f): undefined reference to
> > `unlikely'
> >clang-12: error: linker command failed with exit code 1 (use -v to see
> > invocation)
>
> Right, this is expected. The patch is based on jpoimboe/objtool/core,
> which has extra commits.
Has that series already submitted to LKML? I need to look at the series too.
Or, Josh, can you review it and if it is OK, please pick it to your series
and send it.
Thank you,
--
Masami Hiramatsu
On Wed, 4 Nov 2020 09:47:22 -0500
Steven Rostedt wrote:
> On Wed, 4 Nov 2020 11:08:52 +0900
> Masami Hiramatsu wrote:
>
> > kretprobe_hash_lock() and kretprobe_table_lock() will be called from
> > outside of the kprobe pre_handler context. So, please keep in_nmi()
&
On Tue, 3 Nov 2020 11:09:13 -0500
Steven Rostedt wrote:
> On Tue, 3 Nov 2020 14:39:38 +0900
> Masami Hiramatsu wrote:
>
> > Ah, OK. This looks good to me.
> >
> > BTW, in_nmi() in pre_handler_kretprobe() always be true because
> > now int3 is treated as
nel.org/r/20201028115613.140212...@goodmis.org
>
> Cc: Andrew Morton
> Cc: Masami Hiramatsu
> Cc: Guo Ren
> Cc: "James E.J. Bottomley"
> Cc: Helge Deller
> Cc: Michael Ellerman
> Cc: Benjamin Herrenschmidt
> Cc: Paul Mackerras
> Cc: Heiko Carstens
&
On Mon, 2 Nov 2020 09:27:26 -0500
Steven Rostedt wrote:
>
> [ Peter Z, please take a look a this ]
>
> On Mon, 2 Nov 2020 16:02:34 +0900
> Masami Hiramatsu wrote:
>
> > >From 509b27efef8c7dbf56cab2e812916d6cd778c745 Mon Sep 17 00:00:00 2001
> > From: Masam
addl $0x1,(%rax)
for (i = 0; i < 100; i++)
11ab: 48 83 c0 04 add$0x4,%rax
11af: 48 39 d0cmp%rdx,%rax
11b2: 75 f4 jne11a8
}
11b4: c3 retq
If we ignore the array support, this can be simplified as
1194: 48 8b 57 10 mov0x10(%rdi),%rdx
1198: 48 8d 42 08 lea0x8(%rdx),%rax
11a8: 83 00 01addl $0x1,(%rax)
and maybe able to decode it.
Thank you,
> So what we want to (easily) find for that instruction is c::d.
>
> So given any instruction with a memop (either load or store) we want to
> find: type::member.
>
>
--
Masami Hiramatsu
On Mon, 2 Nov 2020 14:53:34 +0900
Masami Hiramatsu wrote:
> On Mon, 2 Nov 2020 14:11:38 +0900
> Masami Hiramatsu wrote:
>
> > On Fri, 30 Oct 2020 21:38:31 -0400
> > Steven Rostedt wrote:
> >
> > > On Sat, 29 Aug 2020 22:02:36 +0900
> > >
On Mon, 2 Nov 2020 14:11:38 +0900
Masami Hiramatsu wrote:
> On Fri, 30 Oct 2020 21:38:31 -0400
> Steven Rostedt wrote:
>
> > On Sat, 29 Aug 2020 22:02:36 +0900
> > Masami Hiramatsu wrote:
> >
> > > Since the commit 9b38cc704e84 ("kretprobe: Preve
On Fri, 30 Oct 2020 21:38:31 -0400
Steven Rostedt wrote:
> On Sat, 29 Aug 2020 22:02:36 +0900
> Masami Hiramatsu wrote:
>
> > Since the commit 9b38cc704e84 ("kretprobe: Prevent triggering
> > kretprobe from within kprobe_flush_task") sets a dummy current
>
On Thu, 29 Oct 2020 09:40:01 -0400
Steven Rostedt wrote:
> On Thu, 29 Oct 2020 16:58:03 +0900
> Masami Hiramatsu wrote:
>
> > Hi Steve,
> >
> > On Wed, 28 Oct 2020 07:52:49 -0400
> > Steven Rostedt wrote:
> >
> > > From: "Steven Rost
ept_vex: 1, !is_group: 1
> get_opcode
> get_modrm
> get_sib
> get_displacement
> get_immediate failed
> insn_decode: here
> main: ret: -22
> Error: Found an access violation:
>
> so long story short, 0xc5 0xec 0x95 is an invalid VEX insn because
> there's no VEX insn with opcode 0x95.
Yes.
>
> So it really is a bad insn.
>
> So after my changes, insn_decode() becomes stricter but that would need
> adjusting the sanity checker. And before I do that, let me run it by you
> in case I'm missing some other aspect...
Yes, in this case, we would better to handle it as an undecodable input
instead of access violation in insn_sanity.
Thank you,
>
> Thx.
>
> --
> Regards/Gruss,
> Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette
--
Masami Hiramatsu
| 9 -
> kernel/trace/trace_irqsoff.c | 2 +-
> kernel/trace/trace_sched_wakeup.c| 2 +-
> kernel/trace/trace_selftest.c| 20 +++-
> kernel/trace/trace_stack.c | 2 +-
> 18 files changed, 119 insertions(+), 44 deletions(-)
--
Masami Hiramatsu
the arch specific to the generic code, and
> remove a lot of duplication.
Ah, right.
>
> This would also help speed up the processing of live kernel patching.
>
> And best of all, it would give everything access to the arguments of a
> function and a stack pointer with out (ab)using pt_regs.
>
> Do you think this would be feasible?
Yes, I agreed.
Thank you,
>
> -- Steve
--
Masami Hiramatsu
obe_ctlblk *kcb;
> + int bit;
>
> - /* Preempt is disabled by ftrace */
> + bit = ftrace_test_recursion_trylock();
> + if (bit < 0)
> + return;
> +
> + preempt_disable_notrace();
> p = get_kprobe((kprobe_opcode_t *)ip);
> if (unlikely(!p) || kprobe_disabled(p))
> - return;
> + goto out;
>
> kcb = get_kprobe_ctlblk();
> if (kprobe_running()) {
> @@ -52,6 +57,9 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long
> parent_ip,
>*/
> __this_cpu_write(current_kprobe, NULL);
> }
> +out:
> + preempt_enable_notrace();
> + ftrace_test_recursion_unlock(bit);
> }
> NOKPROBE_SYMBOL(kprobe_ftrace_handler);
>
> --
> 2.28.0
>
>
--
Masami Hiramatsu
On Wed, 28 Oct 2020 10:59:19 +0100
Peter Zijlstra wrote:
> On Wed, Oct 28, 2020 at 06:20:25PM +0900, Masami Hiramatsu wrote:
> > On Tue, 27 Oct 2020 20:41:26 +0100
> > Peter Zijlstra wrote:
> >
> > > On Tue, Oct 27, 2020 at 10:15:05AM +0100, Peter Zijlstra w
ctly?)
Good point! If we can not read the page we can not decode it by software.
Thank you,
> >
> > I don't know how much anyone really cares about this for UMIP, but
> > with SEV-ES and such, I can see this becoming more important.
>
> I'll have a look at those when I do the patchset.
>
> Thx.
>
> --
> Regards/Gruss,
> Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette
--
Masami Hiramatsu
701 - 800 of 10539 matches
Mail list logo