Hi, it looks like Sergey has put in a patch to fix the aliasing, looking
at the linux-next tree.
Are we still looking to remove this hack altogether?
Thanks
On Thu, Jan 25, 2018 at 08:24:26AM -0500, Arvind Sankar wrote:
> Thanks.
>
> This was found because gcc 8 appears to be
On Fri, Jan 15, 2021 at 02:07:51PM -0500, Arvind Sankar wrote:
> On Thu, Jan 07, 2021 at 11:34:15PM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann
> >
> > When 5-level page tables are enabled, clang triggers a BUILD_BUG_ON():
> >
> > x86_64-linux-l
On Fri, Jan 15, 2021 at 08:54:18PM +0100, Arnd Bergmann wrote:
> On Fri, Jan 15, 2021 at 8:18 PM Borislav Petkov wrote:
> >
> > On Fri, Jan 15, 2021 at 02:11:25PM -0500, Arvind Sankar wrote:
> > > That's how build-time assertions work: they are _supposed_ to be
> &g
On Fri, Jan 15, 2021 at 03:12:25PM -0500, Arvind Sankar wrote:
> On Fri, Jan 15, 2021 at 08:54:18PM +0100, Arnd Bergmann wrote:
> > On Fri, Jan 15, 2021 at 8:18 PM Borislav Petkov wrote:
> > >
> > > On Fri, Jan 15, 2021 at 02:11:25PM -0500, Arvind Sankar wrote:
&g
On Wed, Jan 20, 2021 at 03:09:53PM -0800, Nick Desaulniers wrote:
> On Tue, Jan 19, 2021 at 1:35 PM Arnd Bergmann wrote:
> >
> > On Tue, Jan 19, 2021 at 10:18 PM 'Nick Desaulniers' via Clang Built
> > Linux wrote:
> > >
> > > On Tue, Jan 19, 2021 at 5:17 AM Adrian Ratiu
> > > wrote:
> > > >
On Mon, Jan 18, 2021 at 09:24:09PM +0100, Borislav Petkov wrote:
> > > > As a matter of fact, it seems like the four assertions could be combined
> > > > into:
> > > > BUILD_BUG_ON((EFI_VA_END & P4D_MASK) != (MODULES_END & P4D_MASK));
> > > > BUILD_BUG_ON((EFI_VA_START & P4D_MASK) !=
On Thu, Jan 07, 2021 at 11:34:15PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann
>
> When 5-level page tables are enabled, clang triggers a BUILD_BUG_ON():
>
> x86_64-linux-ld: arch/x86/platform/efi/efi_64.o: in function
> `efi_sync_low_kernel_mappings':
> efi_64.c:(.text+0x22c): undefined
On Fri, Jan 15, 2021 at 08:07:29PM +0100, Borislav Petkov wrote:
> On Fri, Jan 15, 2021 at 11:32:03AM -0700, Nathan Chancellor wrote:
> > I triggered it with CONFIG_UBSAN=y + CONFIG_UBSAN_UNSIGNED_OVERFLOW=y
> > (it can be exposed with an allyesconfig/allmodconfig on mainline
> > currently).
>
>
Delete some unused macros and an unused function.
One question:
4b47cdbda6f1 ("x86/head/64: Move early exception dispatch to C code")
uses native_read_cr2(), while the asm code it replaces may use paravirt
to read cr2. Is this intentional or should it be using read_cr2()?
Arvind
Commit [in tip/master]
8570978ea030 ("x86/boot/compressed/64: Don't pre-map memory in KASLR code")
removed all the references to finalize_identity_maps(), but neglected to
delete the actual function.
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/ident_map_64.c | 10 ---
Commit [in tip/master]
4b47cdbda6f1 ("x86/head/64: Move early exception dispatch to C code")
removed the usage of GET_CR2_INTO().
Drop the definition as well, and related definitions in paravirt.h and
asm-offsets.h
Signed-off-by: Arvind Sankar
---
arch/x86/include/asm/parav
_SIZE from __START_KERNEL_map, not from _text.
The correct check is the same as for 32-bit, since LOAD_OFFSET is
defined appropriately for the two architectures. Just check
(_end - LOAD_OFFSET) against KERNEL_IMAGE_SIZE unconditionally.
Signed-off-by: Arvind Sankar
---
arch/x86/kernel/vmlinux.
On Tue, Aug 04, 2020 at 10:32:36AM +0200, Pavel Machek wrote:
> Hi!
>
> > >> I've measured the kernel decompression speed using QEMU before and after
> > >> this patch for the x86_64 and i386 architectures. The speed-up is about
> > >> 10x as shown below.
> > >>
> > >> Code ArchKernel
On Tue, Aug 04, 2020 at 02:57:50AM +, Nick Terrell wrote:
>
>
> > On Aug 3, 2020, at 6:56 PM, Arvind Sankar wrote:
> >
>
> > -- I see that ZSTD_copy8 is already using __builtin_memcpy,
> > but there must be more that can be optimized? There's a
On Mon, Aug 03, 2020 at 09:45:32PM -0700, Andi Kleen wrote:
> > Why is that? Both .text and .text.hot have alignment of 2^4 (default
> > function alignment on x86) by default, so it doesn't seem like it should
> > matter for packing density. Avoiding interspersing cold text among
>
> You may
optimized to use __builtin_memcpy for hot
memcpy's, but still improves a little bit more with this patch.
[0]
https://lore.kernel.org/lkml/20200803194022.2966806-1-nickrterr...@gmail.com/
Arvind Sankar (1):
x86/boot/compressed: Use builtin mem functions for decompressor
arch/x86/boot/compressed
, of about 400 bytes.
Signed-off-by: Arvind Sankar
Suggested-by: Nick Terrell
Tested-by: Nick Terrell
---
arch/x86/boot/compressed/misc.c | 7 ++-
arch/x86/boot/string.h | 5 +
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/bo
On Sat, Oct 03, 2020 at 04:23:15PM +0200, Gabriel C wrote:
> Am Mo., 28. Sept. 2020 um 00:00 Uhr schrieb Linus Torvalds
> :
> Hello,
>
> > Shortlog appended, but what I really hope you all will do is to give
> > it a nice good testing. One extra week or rc kernels will help, but
> > only if
On Sat, Oct 03, 2020 at 01:28:18PM -0400, Brian Gerst wrote:
> On Sat, Oct 3, 2020 at 2:05 AM Heinrich Schuchardt wrote:
> >
> > CONFIG_EFI_MIXED depends on CONFIG_X86_64=y.
> > There is no need to check CONFIG_X86_64 again.
> >
> > Signed-off-by: Heinrich Schuchardt
> > ---
> >
On Sun, Oct 04, 2020 at 04:14:11PM +0200, Ard Biesheuvel wrote:
> On Sat, 3 Oct 2020 at 21:44, Arvind Sankar wrote:
> >
> > On Sat, Oct 03, 2020 at 01:28:18PM -0400, Brian Gerst wrote:
> > > On Sat, Oct 3, 2020 at 2:05 AM Heinrich Schuchardt
> > > wrote:
> &g
On Tue, Sep 29, 2020 at 10:03:47AM -0400, Ross Philipson wrote:
> On 9/25/20 3:18 PM, Arvind Sankar wrote:
> > You will also need to avoid initializing data with symbol addresses.
> >
> > .long mle_header
> > .long sl_stub_entry
> > .long sl_gd
On Tue, Sep 29, 2020 at 12:43:18PM -0700, Nick Desaulniers wrote:
> The stringification operator, `#`, in the preprocessor escapes strings.
> For example, `# "foo"` becomes `"\"foo\""`. GCC and Clang differ in how
> they treat section names that contain \".
>
> The portable solution is to not
On Tue, Sep 29, 2020 at 04:08:01PM -0400, Arvind Sankar wrote:
> On Tue, Sep 29, 2020 at 12:43:18PM -0700, Nick Desaulniers wrote:
> > The stringification operator, `#`, in the preprocessor escapes strings.
> > For example, `# "foo"` becomes `"\"foo\""`
On Tue, Sep 29, 2020 at 01:30:22PM -0700, Nick Desaulniers wrote:
> On Tue, Sep 29, 2020 at 1:25 PM Nick Desaulniers
> wrote:
> >
> > On Tue, Sep 29, 2020 at 1:08 PM Arvind Sankar wrote:
> > >
> > > On Tue, Sep 29, 2020 at 12:43:18PM -0700, Nick Desaulnier
e.
Signed-off-by: Arvind Sankar
Cc: Ross Philipson
[0]
https://lore.kernel.org/lkml/1600959521-24158-8-git-send-email-ross.philip...@oracle.com/
---
arch/x86/boot/compressed/kernel_info.S | 19 +++
arch/x86/boot/compressed/kernel_info.h | 12
arch/x86/boot/
On Wed, Sep 30, 2020 at 12:14:03PM -0700, Nick Desaulniers wrote:
> On Wed, Sep 30, 2020 at 10:13 AM Peter Zijlstra wrote:
> >
> > On Wed, Sep 30, 2020 at 11:10:36AM -0500, Segher Boessenkool wrote:
> >
> > > Since this variable is a local register asm, on entry to the asm the
> > > compiler
On Wed, Sep 30, 2020 at 03:59:15PM -0400, Arvind Sankar wrote:
> On Wed, Sep 30, 2020 at 12:14:03PM -0700, Nick Desaulniers wrote:
> > On Wed, Sep 30, 2020 at 10:13 AM Peter Zijlstra
> > wrote:
> > >
> > > On Wed, Sep 30, 2020 at 11:10:36AM -0500, Segher Boess
On Wed, Sep 30, 2020 at 06:25:59PM -0500, Segher Boessenkool wrote:
> On Wed, Sep 30, 2020 at 12:14:03PM -0700, Nick Desaulniers wrote:
> > Do we need register local storage here?
>
> Depends what you want. It looks like you do:
>
> > static inline long bar(unsigned long hcall_id)
> > {
> >
definition of barrier() into compiler.h,
__memory_barrier() is icc-specific (and barrier() is already defined
using it in compiler-intel.h) and doesn't belong in compiler.h.
Signed-off-by: Arvind Sankar
Fixes: 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually
exclusive"
On Thu, Oct 15, 2020 at 08:50:05AM +, David Laight wrote:
> From: Arvind Sankar
> > Sent: 14 October 2020 22:27
> ...
> > +/*
> > + * This version is i.e. to prevent dead stores elimination on @ptr
> > + * where gcc and llvm may behave differently when otherwis
On Thu, Oct 15, 2020 at 03:24:09PM +, David Laight wrote:
> > I think the comment is unclear now that you bring it up, but the problem
> > it actually addresses is not that the data is held in registers: in the
> > sha256_transform() case mentioned in the commit message, for example,
> > the
Be clear about @ptr vs the variable that @ptr points to, and add some
more details as to why the special barrier_data() macro is required.
Signed-off-by: Arvind Sankar
---
include/linux/compiler.h | 33 ++---
1 file changed, 22 insertions(+), 11 deletions(-)
diff
On Thu, Oct 15, 2020 at 09:09:11PM +, David Laight wrote:
> From: Arvind Sankar
> > Sent: 15 October 2020 19:14
> >
> > Be clear about @ptr vs the variable that @ptr points to, and add some
> > more details as to why the special barrier_data() macro is required.
>
On Fri, Oct 16, 2020 at 01:17:03PM +0200, Borislav Petkov wrote:
> On Thu, Oct 08, 2020 at 03:16:23PM -0400, Arvind Sankar wrote:
> > On 64-bit, the startup_64_setup_env() function added in
> > 866b556efa12 ("x86/head/64: Install startup GDT")
> > has s
On Fri, Oct 16, 2020 at 08:13:44AM +, David Laight wrote:
> From: Arvind Sankar
> > Sent: 15 October 2020 23:01
> ,,,
> > I think it's helpful to have the more detailed explanation about
> > register variables -- at first glance, it's a bit mystifying as to why
>
On Fri, Oct 16, 2020 at 03:15:45PM +0200, Borislav Petkov wrote:
> On Fri, Oct 16, 2020 at 08:43:01AM -0400, Arvind Sankar wrote:
> > You need STACKPROTECTOR_STRONG -- I was testing with defconfig and the
> > option is enabled by default.
>
> And you need to write those
On Fri, Oct 16, 2020 at 06:27:59PM +0200, Borislav Petkov wrote:
> On Thu, Oct 08, 2020 at 03:16:22PM -0400, Arvind Sankar wrote:
> > Signed-off-by: Arvind Sankar
> > ---
> > arch/x86/boot/compressed/ident_map_64.c | 16 ++--
> > 1 file changed, 14
On Fri, Oct 16, 2020 at 07:07:42PM +0200, Borislav Petkov wrote:
> On Fri, Oct 16, 2020 at 12:47:55PM -0400, Arvind Sankar wrote:
> > Just for clarity, by cleanups you mean patches 2 and 3? i.e. you want to
> > see 1, 4, 2, 3?
>
> It is important for:
>
> [PATCH v2 4
t be in the identity mapping,
but those don't get accessed by the main kernel before it switches to
its own page tables.
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/ident_map_64.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/boot/compressed/ident_
Move get_cmd_line_ptr() and COMMAND_LINE_SIZE into misc.h for easier
use from multiple files.
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/cmdline.c | 8
arch/x86/boot/compressed/kaslr.c | 6 --
arch/x86/boot/compressed/misc.h| 13 +
3 files changed
ndler from the decompressor stub is still
installed and handles the page fault.
Disable stack protection for the whole file, and do it on 32-bit as
well to avoid surprises.
Signed-off-by: Arvind Sankar
---
arch/x86/kernel/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/Makefile
protector for head code.
Arvind Sankar (5):
x86/boot: Initialize boot_params in startup code
x86/boot: Move get_cmd_line_ptr() and COMMAND_LINE_SIZE into misc.h
x86/boot/64: Change add_identity_map() to take size for ease of use
x86/boot/64: Explicitly map boot_params and command line
also makes the #PF handler print the original CR2 value in case of
error, instead of after aligning to PMD_SIZE.
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/ident_map_64.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/arch/x86/boot/compressed/iden
Save the boot_params pointer passed in by the bootloader in
startup_32/64. This avoids having to initialize it in two different
places in C code, and having to preserve SI through the early assembly
code.
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/head_32.S| 11
On Thu, Oct 08, 2020 at 11:04:20AM +0200, Joerg Roedel wrote:
> On Wed, Oct 07, 2020 at 03:53:47PM -0400, Arvind Sankar wrote:
> > Save the boot_params pointer passed in by the bootloader in
> > startup_32/64. This avoids having to initialize it in two different
> > places
On Thu, Oct 08, 2020 at 11:30:42AM +0200, Borislav Petkov wrote:
> On Wed, Oct 07, 2020 at 03:53:48PM -0400, Arvind Sankar wrote:
> > Move get_cmd_line_ptr() and COMMAND_LINE_SIZE into misc.h for easier
> > use from multiple files.
>
> Well, I don't like that. cmdline.c *is
On Thu, Oct 08, 2020 at 11:14:12AM +0200, Joerg Roedel wrote:
> On Wed, Oct 07, 2020 at 03:53:49PM -0400, Arvind Sankar wrote:
> > Change back the arguments of add_identity_map() to (start, size) instead
> > of (start, end). This reverts
> >
> > 21cf2372618e (&quo
On Thu, Oct 08, 2020 at 11:48:36AM +0200, Joerg Roedel wrote:
> On Wed, Oct 07, 2020 at 03:53:50PM -0400, Arvind Sankar wrote:
> > This is fragile, as boot_params and the command line mappings are
> > required for the main kernel. If EARLY_PRINTK and RANDOMIZE_BASE are
> >
On Thu, Oct 08, 2020 at 10:42:19AM +0200, Joerg Roedel wrote:
> On Wed, Oct 07, 2020 at 03:53:51PM -0400, Arvind Sankar wrote:
> > On 64-bit, the startup_64_setup_env() function added in
> > 866b556efa12 ("x86/head/64: Install startup GDT")
> > has s
On Thu, Oct 08, 2020 at 05:10:47PM +0200, Borislav Petkov wrote:
> On Thu, Oct 08, 2020 at 09:47:23AM -0400, Arvind Sankar wrote:
> > Are you ok with the include of setup.h?
>
> Or you could simply add cmdline.h and include that. It is high time we
> started cleaning up
Move prototypes for command-line related functions into a new header
file to split it out from misc.h.
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/acpi.c | 1 +
arch/x86/boot/compressed/cmdline.c | 1 +
arch/x86/boot/compressed/cmdline.h
This makes the #PF handler print the original CR2 value in case of
error, instead of after aligning to PMD_SIZE.
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/ident_map_64.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/boot/compressed
ndler from the decompressor stub is still
installed and handles the page fault.
Disable stack protection for the whole file, and do it on 32-bit as
well to avoid surprises.
Signed-off-by: Arvind Sankar
---
arch/x86/kernel/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/Makefile
t be in the identity mapping,
but those don't get accessed by the main kernel before it switches to
its own page tables.
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/ident_map_64.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/x86/boot/compress
is relocated.
Signed-off-by: Arvind Sankar
Reviewed-by: Joerg Roedel
---
arch/x86/boot/compressed/head_32.S| 12 +
arch/x86/boot/compressed/head_64.S| 35 +--
arch/x86/boot/compressed/misc.c | 10 +---
arch/x86/boot/compressed/pgtable_64.c | 5 +---
4
protector for head code.
Changes from v1:
- Add comments suggested by Joerg
- Split out cmdline into cmdline.h and use it
- Leave add_identity_map() as [start,end)
v1: https://lore.kernel.org/lkml/20201007195351.776555-1-nived...@alum.mit.edu/
Arvind Sankar (5):
x86/boot: Initialize
n anything that might
require those variables, and keeps the 4- vs 5-level paging code all in
one place.
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/ident_map_64.c | 6 --
arch/x86/boot/compressed/kaslr.c| 8
arch/x86/boot/compressed/pgtable_6
On Sat, Oct 10, 2020 at 03:11:10PM -0400, Arvind Sankar wrote:
> Commit
> ca0e22d4f011 ("x86/boot/compressed/64: Always switch to own page table")
> started using a new set of pagetables even without KASLR.
>
> After that commit, initialize_identity_maps() is called be
on compression level, this can reduce the amount of data
copied by 4-5x.
Signed-off-by: Arvind Sankar
---
drivers/firmware/efi/libstub/x86-stub.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/libstub/x86-stub.c
b/drivers/firmware/efi/libstub/x86-stub.c
index
On Mon, Oct 12, 2020 at 05:08:30PM +0300, Kirill A. Shutemov wrote:
> On Sat, Oct 10, 2020 at 03:26:24PM -0400, Arvind Sankar wrote:
> > On Sat, Oct 10, 2020 at 03:11:10PM -0400, Arvind Sankar wrote:
> > > Commit
> > > ca0e22d4f011 ("x86/boot/compressed/64:
On Thu, Sep 17, 2020 at 11:40:55AM +0200, Borislav Petkov wrote:
> On Sun, Sep 06, 2020 at 11:46:37AM -0400, Arvind Sankar wrote:
> > On 32-bit, cmdline_find_option_bool() is used before paging is enabled,
> > from check_loader_disabled_bsp() in the early microcode loader.
>
On Mon, Aug 24, 2020 at 10:54:08AM +0200, Joerg Roedel wrote:
> From: Joerg Roedel
>
> Add code needed to setup an IDT in the early pre-decompression
> boot-code. The IDT is loaded first in startup_64, which is after
> EfiExitBootServices() has been called, and later reloaded when the
> kernel
On Tue, Aug 25, 2020 at 01:04:46PM +0200, Borislav Petkov wrote:
> On Tue, Aug 25, 2020 at 11:22:24AM +0200, Joerg Roedel wrote:
> > I don't think so, if I look at the history of these checks their whole
> > purpose seems to be to alert the developer/maintainer when their size
> > changes and that
On Mon, Aug 24, 2020 at 10:54:22AM +0200, Joerg Roedel wrote:
> From: Tom Lendacky
>
> Handle #VC exceptions caused by CPUID instructions. These happen in
> early boot code when the KASLR code checks for RDTSC.
>
> Signed-off-by: Tom Lendacky
> [ jroe...@suse.de: Adapt to #VC handling
kml/20200807194100.3570838-1-ndesaulni...@google.com/
[2] https://github.com/ClangBuiltLinux/linux/issues/1121
[3] https://reviews.llvm.org/rGc41a18cf61790fc898dcda1055c3efbf442c14c0
[4] https://lore.kernel.org/lkml/20200731202738.2577854-1-nived...@alum.mit.edu/
Signed-off-by: Arvind Sankar
Reported-by: N
On Tue, Aug 11, 2020 at 10:58:40AM -0700, Nick Desaulniers wrote:
> > Cc: sta...@vger.kernel.org # 4.19.x
>
> Thanks Arvind, good write up. Just curious about this stable tag, how
> come you picked 4.19? I can see boot failures in our CI for x86+LLD
> back to 4.9. Can we amend that tag to use
On Tue, Aug 11, 2020 at 04:04:40PM -0700, Nick Desaulniers wrote:
> On Tue, Aug 11, 2020 at 3:44 PM Arvind Sankar wrote:
> >
> > On Tue, Aug 11, 2020 at 10:58:40AM -0700, Nick Desaulniers wrote:
> > > > Cc: sta...@vger.kernel.org # 4.19.x
> > >
> > >
On Tue, Aug 11, 2020 at 04:51:23PM -0700, Nick Desaulniers wrote:
> On Tue, Aug 11, 2020 at 4:43 PM Arvind Sankar wrote:
> >
> > On Tue, Aug 11, 2020 at 04:04:40PM -0700, Nick Desaulniers wrote:
> > > On Tue, Aug 11, 2020 at 3:44 PM Arvind Sankar
> > > wrot
edu/
Signed-off-by: Arvind Sankar
Reported-by: Nick Desaulniers
Reviewed-by: Nick Desaulniers
Tested-by: Nick Desaulniers
Cc: sta...@vger.kernel.org
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/boot/compres
On Wed, Aug 12, 2020 at 05:12:34PM -0700, Nick Desaulniers wrote:
> On Thu, Aug 6, 2020 at 3:11 PM Thomas Gleixner wrote:
> >
> > Arnd Bergmann writes:
> > > When using the clang integrated assembler, we get a reference
> > > to __force_order that should normally get ignored in a few
> > > rare
On Thu, Aug 13, 2020 at 10:37:01AM -0700, Paul E. McKenney wrote:
> On Thu, Aug 13, 2020 at 07:28:57PM +0200, Thomas Gleixner wrote:
> > Nick Desaulniers writes:
> > > On Thu, Aug 6, 2020 at 3:11 PM Thomas Gleixner wrote:
> > >> > + *
> > >> > + * Clang sometimes fails to kill the reference to
Treat a NULL cmdline the same as empty. Although this is unlikely to
happen in practice, the x86 kernel entry does check for NULL cmdline and
handles it, so do it here as well.
Signed-off-by: Arvind Sankar
---
drivers/firmware/efi/libstub/efi-stub-helper.c | 6 +-
1 file changed, 5
Arguments after "--" are arguments for init, not for the kernel.
Signed-off-by: Arvind Sankar
---
drivers/firmware/efi/libstub/efi-stub-helper.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c
b/drivers/firmware/efi/libstub/efi-stu
First 2 are resends:
https://lore.kernel.org/linux-efi/20200725155916.1376773-1-nived...@alum.mit.edu/
https://lore.kernel.org/linux-efi/20200729193300.598448-1-nived...@alum.mit.edu/
Arvind Sankar (3):
efi/libstub: Stop parsing arguments at "--"
efi/libstub: Handle NULL cmdline
e
Make the command line parsing more robust, by handling the case it is
not NUL-terminated.
Use strnlen instead of strlen, and make sure that the temporary copy is
NUL-terminated before parsing.
Signed-off-by: Arvind Sankar
---
drivers/firmware/efi/libstub/efi-stub-helper.c | 6 --
1 file
On Tue, Sep 08, 2020 at 10:21:32AM -0700, Kees Cook wrote:
> On Tue, Sep 08, 2020 at 11:39:11AM +0200, Marco Elver wrote:
> > On Sun, 6 Sep 2020 at 00:23, Arvind Sankar wrote:
> > >
> > > String functions can be useful in early boot, but using instrumented
> >
On Sat, Sep 05, 2020 at 06:48:35PM -0400, Arvind Sankar wrote:
> On Tue, Sep 01, 2020 at 07:53:46PM -0700, Kees Cook wrote:
> > We don't want to depend on the linker's orphan section placement
> > heuristics as these can vary between linkers, and may change between
> > versio
dyn and .rela.dyn, instead of just
one per arch.
Ard Biesheuvel (3):
x86/boot/compressed: Move .got.plt entries out of the .got section
x86/boot/compressed: Force hidden visibility for all symbol references
x86/boot/compressed: Get rid of GOT fixup code
Arvind Sankar (4):
x86/boot: Add .t
.
While at it, drop the KEEP() from the linker script, as it has no effect
on the contents of output sections that are created by the linker itself.
Tested-by: Nick Desaulniers
Tested-by: Sedat Dilek
Reviewed-by: Kees Cook
Signed-off-by: Ard Biesheuvel
Acked-by: Arvind Sankar
Signed-off
erlaps with
.entrytext
>>> .bsdata range is [0x1FF, 0x398]
>>> .entrytext range is [0x26C, 0x2D3]
Add .text.* to the .text output section to fix this, and also prevent
any future surprises if the compiler decides to create other such
sections.
[1] https://reviews.llvm.org/
_32 is in the same section
as the code. Move efi32_pe_entry into .head.text so that it can use
the same method to avoid relocations.
Tested-by: Nick Desaulniers
Tested-by: Sedat Dilek
Reviewed-by: Kees Cook
Reviewed-by: Ard Biesheuvel
Reviewed-by: Fangrui Song
Signed-off-by: Arvind Sankar
---
arch/
-by: Arvind Sankar
Signed-off-by: Arvind Sankar
From: Ard Biesheuvel
Link: https://lore.kernel.org/r/20200523120021.34996-3-a...@kernel.org
---
arch/x86/boot/compressed/Makefile | 1 +
arch/x86/boot/compressed/vmlinux.lds.S | 1 +
drivers/firmware/efi/libstub/Makefile | 2 +-
drivers
versions (as well as
clang and lld).
Tested-by: Nick Desaulniers
Tested-by: Sedat Dilek
Reviewed-by: Kees Cook
Reviewed-by: Ard Biesheuvel
Reviewed-by: Fangrui Song
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/Makefile | 28 +++---
arch/x86/boot/compressed
Cook
Reviewed-by: Ard Biesheuvel
Reviewed-by: Fangrui Song
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/Makefile | 12 ++--
arch/x86/boot/compressed/head_32.S | 17 -
arch/x86/boot/compressed/head_64.S | 4 ++--
arch/x86/boot/compressed/mkpiggy.c | 6
Desaulniers
Tested-by: Sedat Dilek
Reviewed-by: Kees Cook
Signed-off-by: Ard Biesheuvel
Acked-by: Arvind Sankar
Signed-off-by: Arvind Sankar
From: Ard Biesheuvel
Link: https://lore.kernel.org/r/20200523120021.34996-2-a...@kernel.org
---
arch/x86/boot/compressed/vmlinux.lds.S | 11
On Fri, Jul 31, 2020 at 04:08:16PM -0700, Kees Cook wrote:
> For readability, move the zero-sized sections to the end after DISCARDS
> and mark them NOLOAD for good measure.
>
> Signed-off-by: Kees Cook
> ---
> arch/x86/boot/compressed/vmlinux.lds.S | 42 +++---
> 1 file
On Fri, Jul 31, 2020 at 04:08:13PM -0700, Kees Cook wrote:
> The .got.plt section should always be zero (or filled only with the
> linker-generated lazy dispatch entry). Enforce this with an assert and
> mark the section as NOLOAD. This is more sensitive than just blindly
> discarding the section.
On Fri, Jul 31, 2020 at 09:47:55PM -0400, Arvind Sankar wrote:
> On Fri, Jul 31, 2020 at 04:08:16PM -0700, Kees Cook wrote:
> > For readability, move the zero-sized sections to the end after DISCARDS
> > and mark them NOLOAD for good measure.
> >
> > Signed-off-by: K
On Fri, Jul 31, 2020 at 04:07:57PM -0700, Kees Cook wrote:
> From: Nick Desaulniers
>
> Basically, consider .text.{hot|unlikely|unknown}.* part of .text, too.
>
> When compiling with profiling information (collected via PGO
> instrumentations or AutoFDO sampling), Clang will separate code into
On Fri, Jul 31, 2020 at 10:35:14PM -0700, Kees Cook wrote:
> On Fri, Jul 31, 2020 at 09:47:55PM -0400, Arvind Sankar wrote:
> > On Fri, Jul 31, 2020 at 04:08:16PM -0700, Kees Cook wrote:
> > > For readability, move the zero-sized sections to the end after DISCARDS
> >
On Fri, Jul 31, 2020 at 10:36:00PM -0700, Kees Cook wrote:
> On Fri, Jul 31, 2020 at 10:53:25PM -0400, Arvind Sankar wrote:
> > On Fri, Jul 31, 2020 at 09:47:55PM -0400, Arvind Sankar wrote:
> > > On Fri, Jul 31, 2020 at 04:08:16PM -0700, Kees Cook wrote:
> > > >
On Fri, Jul 31, 2020 at 11:18:02PM -0700, Kees Cook wrote:
> On Fri, Jul 31, 2020 at 11:51:28PM -0400, Arvind Sankar wrote:
> >
> > This also changes the ordering to place all hot resp unlikely sections
> > separate
> > from other text, while currently it places th
On Fri, Feb 07, 2020 at 02:46:03PM -0500, Steven Rostedt wrote:
>
> diff --git a/init/main.c b/init/main.c
> index 491f1cdb3105..113c8244e5f0 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -142,6 +142,15 @@ static char *extra_command_line;
> /* Extra init arguments */
> static char
strnlen is safer in case the command line is not NUL-terminated.
Signed-off-by: Arvind Sankar
---
arch/x86/boot/compressed/kaslr.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index 903ccdca0551
Hi,
I'd like to add one more patch to the series if that's ok.
Thanks.
Arvind Sankar (1):
x86/kaslr: Replace strlen with strnlen
arch/x86/boot/compressed/kaslr.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
--
2.26.2
On Tue, Aug 04, 2020 at 12:03:45AM +0900, Masami Hiramatsu wrote:
> On Sat, 1 Aug 2020 22:33:18 -0400
> Arvind Sankar wrote:
> >
> > I came across this as I was poking around some of the command line
> > parsing. AFAICT, initargs_found will never be set to true here
On Mon, Aug 03, 2020 at 12:05:06PM -0700, Andi Kleen wrote:
> > However, the history of their being together comes from
> >
> > 9bebe9e5b0f3 ("kbuild: Fix .text.unlikely placement")
> >
> > which seems to indicate there was some problem with having them separated
> > out,
> > although I don't
ecompressors.
Thanks.
>From 10f8d939fc367e3127e2d72ba099678debcae422 Mon Sep 17 00:00:00 2001
From: Arvind Sankar
Date: Mon, 3 Aug 2020 17:07:37 -0400
Subject: [PATCH] x86/boot/compressed: Use builtin mem functions for decompressor
Since commits
c041b5ad8640 ("x86, boot: Create a sep
On Mon, Aug 03, 2020 at 10:55:01PM +, Nick Terrell wrote:
>
>
> > On Aug 3, 2020, at 2:57 PM, Arvind Sankar wrote:
> >
> > On Mon, Aug 03, 2020 at 12:40:22PM -0700, Nick Terrell wrote:
> >> From: Nick Terrell
> >>
> >> This patch replac
On Thu, Aug 20, 2020 at 04:33:03PM -0700, Linus Torvalds wrote:
> On Thu, Aug 20, 2020 at 10:56 AM Arvind Sankar wrote:
> >
> > Clang's interpretation is more useful for embedded, since you can use
> > -fno-builtin-foo and avoid calling __builtin_foo directly,
1 - 100 of 635 matches
Mail list logo