[PATCH] efi/libstub: Disable some warnings for x86{,_64}

2018-10-12 Thread Nathan Chancellor
When building the kernel with Clang, some disabled warnings appear because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to this list so that the build is clean again. -Wpointer-sign was disabled for the whole kernel before the beginning of git history. -Waddress-of-packed-member

Re: [RFC PATCH] x86/efi: Allocate e820 buffer before calling efi_exit_boot_service

2018-10-12 Thread Ard Biesheuvel
On 9 August 2018 at 16:50, Eric Snowberg wrote: > Commit d64934019f6c ("x86/efi: Use efi_exit_boot_services()") > introduced a regression on systems with large memory maps > causing them to hang on boot. The first "goto get_map" that was removed > from exit_boot insured there was enough room for t

Re: [RFC-resend 1/2] x86/compat: Adjust in_compat_syscall() to generic code under !COMPAT

2018-10-12 Thread Andy Lutomirski
> On Oct 12, 2018, at 6:42 AM, Dmitry Safonov wrote: > > The result of in_compat_syscall() can be pictured as: > > x86 platform: >--- >| Arch\syscall | 64-bit | ia32 | x32| >|

[RFC-resend 0/2] compat: in_compat_syscall() differs on x86

2018-10-12 Thread Dmitry Safonov
Reading xfrm (ipsec) code I've found such code: : #ifdef CONFIG_COMPAT : if (in_compat_syscall()) : return -EOPNOTSUPP; : #endif While I can read that it's false on native i386, it's a bit misleading and in result it's better to introduce a helper for that. Grepping other

[RFC-resend 2/2] compat: Cleanup in_compat_syscall() callers

2018-10-12 Thread Dmitry Safonov
Now that in_compat_syscall() == false on native i686, it's possible to remove some ifdeffery and no more needed helpers. Signed-off-by: Dmitry Safonov --- drivers/firmware/efi/efivars.c | 16 kernel/time/time.c | 2 +- net/xfrm/xfrm_state.c | 2 -- net/xfr

[RFC-resend 1/2] x86/compat: Adjust in_compat_syscall() to generic code under !COMPAT

2018-10-12 Thread Dmitry Safonov
The result of in_compat_syscall() can be pictured as: x86 platform: --- | Arch\syscall | 64-bit | ia32 | x32| |-| | x86_64 | false | true | true | |-

Re: [PATCH v8 1/3] x86/boot: Add acpitb.c to parse acpi tables

2018-10-12 Thread Chao Fan
On Fri, Oct 12, 2018 at 11:46:55AM +0200, Borislav Petkov wrote: >On Fri, Oct 12, 2018 at 05:36:38PM +0800, Chao Fan wrote: >> Prefer to compile out entire functions, rather than portions of functions or >> portions of expressions. Rather than putting an ifdef in an expression, >> factor >> out p

Re: [PATCH v8 1/3] x86/boot: Add acpitb.c to parse acpi tables

2018-10-12 Thread Borislav Petkov
On Fri, Oct 12, 2018 at 05:36:38PM +0800, Chao Fan wrote: > Prefer to compile out entire functions, rather than portions of functions or > portions of expressions. Rather than putting an ifdef in an expression, > factor > out part or all of the expression into a separate helper function and apply

Re: [PATCH v8 1/3] x86/boot: Add acpitb.c to parse acpi tables

2018-10-12 Thread Chao Fan
On Thu, Oct 11, 2018 at 12:57:08PM +0200, Borislav Petkov wrote: >On Wed, Oct 10, 2018 at 04:41:17PM +0800, Chao Fan wrote: [...] >> + * If ACPI20 table not found, but ACPI table found, >> + * use the ACPI table and return true. >> + * If neither ACPI table nor A