Re: [PATCH] sched/fair: Avoid divide by zero when rebalancing domains

2018-08-17 Thread Matt Fleming
On Thu, 05 Jul, at 05:54:02PM, Valentin Schneider wrote: > On 05/07/18 14:27, Matt Fleming wrote: > > On Thu, 05 Jul, at 11:10:42AM, Valentin Schneider wrote: > >> Hi, > >> > >> On 04/07/18 15:24, Matt Fleming wrote: > >>> It's possible that th

Re: [lkp-robot] [sched/fair] fbd5188493: WARNING:inconsistent_lock_state

2018-07-05 Thread Matt Fleming
On Thu, 05 Jul, at 02:24:58PM, Matt Fleming wrote: > > Hmm.. it still looks to me like we should be saving and restoring IRQs > since this can be called from IRQ context, no? > > The patch was a forward-port from one of our SLE kernels, and I messed > up the IRQ flag balancing

Re: [PATCH] sched/fair: Avoid divide by zero when rebalancing domains

2018-07-05 Thread Matt Fleming
On Thu, 05 Jul, at 11:10:42AM, Valentin Schneider wrote: > Hi, > > On 04/07/18 15:24, Matt Fleming wrote: > > It's possible that the CPU doing nohz idle balance hasn't had its own > > load updated for many seconds. This can lead to huge deltas between > > rq-&g

Re: [lkp-robot] [sched/fair] fbd5188493: WARNING:inconsistent_lock_state

2018-07-05 Thread Matt Fleming
On Thu, 05 Jul, at 11:52:21AM, Dietmar Eggemann wrote: > > Moving the code from _nohz_idle_balance to nohz_idle_balance let it disappear: > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 02be51c9dcc1..070924f07c68 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c >

[PATCH] sched/fair: Avoid divide by zero when rebalancing domains

2018-07-04 Thread Matt Fleming
braith Cc: Peter Zijlstra Signed-off-by: Matt Fleming --- kernel/sched/fair.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 2f0a0be4d344..2c81662c858a 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9597,6 +9

Re: [RFC 00/11] select_idle_sibling rework

2018-06-19 Thread Matt Fleming
On Wed, 30 May, at 04:22:36PM, Peter Zijlstra wrote: > Hi all, > > This is all still very preliminary and could all still go up in flames (it has > only seen hackbench so far). This is mostly the same code I posted yesterday, > but hopefully in a more readable form. > > This fixes the SIS_PROP

Re: cpu stopper threads and load balancing leads to deadlock

2018-04-24 Thread Matt Fleming
On Fri, 20 Apr, at 11:50:05AM, Peter Zijlstra wrote: > On Tue, Apr 17, 2018 at 03:21:19PM +0100, Matt Fleming wrote: > > Hi guys, > > > > We've seen a bug in one of our SLE kernels where the cpu stopper > > thread ("migration/15") is entering idle balanc

cpu stopper threads and load balancing leads to deadlock

2018-04-17 Thread Matt Fleming
Hi guys, We've seen a bug in one of our SLE kernels where the cpu stopper thread ("migration/15") is entering idle balance. This then triggers active load balance. At the same time, a task on another CPU triggers a page fault and NUMA balancing kicks in to try and migrate the task closer to the

Re: [PATCH] sched/rt: Fix rq->clock_update_flags < RQCF_ACT_SKIP warning

2018-04-03 Thread Matt Fleming
c > +++ b/kernel/sched/rt.c > @@ -839,6 +839,8 @@ static int do_sched_rt_period_timer(struct rt_bandwidth > *rt_b, int overrun) > continue; > > raw_spin_lock(>lock); > + update_rq_clock(rq); > + >

Re: [PATCH RFC v2] sched: Minimize the idle cpu selection race window.

2018-02-07 Thread Matt Fleming
On Tue, 05 Dec, at 01:09:07PM, Atish Patra wrote: > Currently, multiple tasks can wakeup on same cpu from > select_idle_sibiling() path in case they wakeup simulatenously > and last ran on the same llc. This happens because an idle cpu > is not updated until idle task is scheduled out. Any task

Re: [PATCH V4 0/3] Use mm_struct and switch_mm() instead of manually

2018-01-26 Thread Matt Fleming
nstead we can use helper function > efi_switch_mm() to do this. This improves readability and maintainability. > Also, instead of maintaining a separate struct "efi_scratch" to store/restore > efi_pgd, we can use mm_struct to do this. FWIW this series looks OK to me. Reviewed-by: Matt Fleming <m...@codeblueprint.co.uk>

[tip:efi/core] MAINTAINERS: Remove Matt Fleming as EFI co-maintainer

2018-01-03 Thread tip-bot for Matt Fleming
Commit-ID: 81b60dbff04980a45b348c5b5eeca2713d4594ca Gitweb: https://git.kernel.org/tip/81b60dbff04980a45b348c5b5eeca2713d4594ca Author: Matt Fleming <m...@codeblueprint.co.uk> AuthorDate: Wed, 3 Jan 2018 09:44:17 + Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Wed

Re: [PATCH] MAINTAINERS: Remove Matt Fleming as EFI co-maintainer

2018-01-03 Thread Matt Fleming
On Wed, 03 Jan, at 10:13:55AM, Ard Biesheuvel wrote: > On 3 January 2018 at 09:44, Matt Fleming <m...@codeblueprint.co.uk> wrote: > > Instate Ard Biesheuvel as the sole EFI maintainer and leave other folks > > as maintainers for the EFI test driver and efivarfs file syste

[PATCH] MAINTAINERS: Remove Matt Fleming as EFI co-maintainer

2018-01-03 Thread Matt Fleming
Instate Ard Biesheuvel as the sole EFI maintainer and leave other folks as maintainers for the EFI test driver and efivarfs file system. Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> --- MAINTAINERS | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) Ard, if you want

Re: [PATCH V2] x86/efi: fix kernel param add_efi_memmap regression

2017-12-18 Thread Matt Fleming
On Sat, 16 Dec, at 12:19:53PM, Dave Young wrote: > 'add_efi_memmap' is an early param, but do_add_efi_memmap() has no > chance to run because the code path is before parse_early_param(). > I believe it worked when the param was introduced but probably later > some other changes caused the wrong

Re: [PATCH] x86: move parse_early_param to earlier code for add_efi_memmap

2017-12-18 Thread Matt Fleming
On Sat, 16 Dec, at 03:06:32PM, Ingo Molnar wrote: > > * Matt Fleming <m...@codeblueprint.co.uk> wrote: > > > > x86_init.oem.arch_setup(); > > > @@ -962,6 +959,8 @@ void __init setup_arch(char **cmdline_p) > > > > > > parse_earl

Re: [PATCH] efi: make EFI a menuconfig to ease disabling it all

2017-12-15 Thread Matt Fleming
On Sat, 09 Dec, at 04:52:52PM, Vincent Legoll wrote: > No need to get into the submenu to disable all related > config entries. > > This makes it easier to disable all EFI config options > without entering the submenu. It will also enable one > to see that en/dis-abled state from the outside

Re: [PATCH] x86: move parse_early_param to earlier code for add_efi_memmap

2017-12-15 Thread Matt Fleming
On Thu, 14 Dec, at 06:41:19PM, Dave Young wrote: > On 11/30/17 at 01:23pm, Dave Young wrote: > > 'add_efi_memmap' is an early param, but do_add_efi_memmap() has no > > chance to run because the code path is before parse_early_param(). > > I believe it worked when the param was introduced but

Re: [PATCH] efi: Use PTR_ERR_OR_ZERO()

2017-12-15 Thread Matt Fleming
On Tue, 28 Nov, at 10:39:37PM, Vasyl Gomonovych wrote: > Fix ptr_ret.cocci warnings: > drivers/firmware/efi/efi.c:610:8-14: WARNING: PTR_ERR_OR_ZERO can be used > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: scripts/coccinelle/api/ptr_ret.cocci > >

Re: [GIT PULL] hash addresses printed with %p

2017-12-02 Thread Matt Fleming
(Cc'ing Dave since this is used for kexec on EFI) On Fri, 01 Dec, at 09:54:43AM, Ard Biesheuvel wrote: > On 1 December 2017 at 09:48, Greg Kroah-Hartman > wrote: > > On Thu, Nov 30, 2017 at 05:18:42PM +, Ard Biesheuvel wrote: > >> On 30 November 2017 at 17:10,

Re: sysbench throughput degradation in 4.13+

2017-10-10 Thread Matt Fleming
On Fri, 06 Oct, at 11:36:23AM, Matt Fleming wrote: > > It's a similar story for hackbench-threads-{pipes,sockets}, i.e. pipes > regress but performance is restored for sockets. > > Of course, like a dope, I forgot to re-run netperf with your WA_WEIGHT > patch. So I've

Re: [PATCH] efi/capsule-loader: pr_err() strings should end with newlines

2017-10-06 Thread Matt Fleming
On Mon, 25 Sep, at 04:17:23PM, Arvind Yadav wrote: > pr_err() messages should terminated with a new-line to avoid > other messages being concatenated onto the end. > > Signed-off-by: Arvind Yadav > --- > drivers/firmware/efi/capsule-loader.c | 2 +- > 1 file changed,

Re: sysbench throughput degradation in 4.13+

2017-10-06 Thread Matt Fleming
On Wed, 04 Oct, at 06:18:50PM, Peter Zijlstra wrote: > On Tue, Oct 03, 2017 at 10:39:32AM +0200, Peter Zijlstra wrote: > > So I was waiting for Rik, who promised to run a bunch of NUMA workloads > > over the weekend. > > > > The trivial thing regresses a wee bit on the overloaded case, I've not >

Re: sysbench throughput degradation in 4.13+

2017-10-02 Thread Matt Fleming
On Wed, 27 Sep, at 01:58:20PM, Rik van Riel wrote: > > I like the simplicity of your approach! I hope it does not break > stuff like netperf... > > I have been working on the patch below, which is much less optimistic > about when to do an affine wakeup than before. Running netperf for this

Re: [PATCH 3/3] x86/efi: Use efi_switch_mm() rather than manually twiddling with cr3

2017-08-16 Thread Matt Fleming
On Wed, 16 Aug, at 12:03:22PM, Mark Rutland wrote: > > I'd expect we'd abort at a higher level, not taking any sample. i.e. > we'd have the core overflow handler check in_funny_mm(), and if so, skip > the sample, as with the skid case. FYI, this is my preferred solution for x86 too.

Re: [PATCH v9 1/2] efi: Introduce efi_early_memdesc_ptr to get pointer to memmap descriptor

2017-08-16 Thread Matt Fleming
On Mon, 14 Aug, at 10:54:23PM, Baoquan He wrote: > The existing map iteration helper for_each_efi_memory_desc_in_map can > only be used after OS initializes EFI to fill data of struct efi_memory_map. Should this say "EFI subsystem"? The firmware doesn't care about the kernel's internal data

Re: [PATCH] x86/efi: page align EFI ROM image ranges

2017-08-04 Thread Matt Fleming
On Wed, 02 Aug, at 11:41:38AM, Stuart Hayes wrote: > (Resend because I mistyped the maintainer's email address the first time.) > > The kernel's EFI stub locates and copies EFI ROM images into memory, > which it allocates using the byte-granular EFI allocate_pool > function. These memory ranges

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-08-04 Thread Matt Fleming
On Fri, 04 Aug, at 07:40:05PM, Baoquan He wrote: > On 08/04/17 at 12:23pm, Matt Fleming wrote: > > On Fri, 28 Jul, at 07:26:03PM, Baoquan He wrote: > > > Hi Matt, > > > > > > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > > &g

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-08-04 Thread Matt Fleming
On Fri, 28 Jul, at 07:26:03PM, Baoquan He wrote: > Hi Matt, > > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > * Matt Fleming <m...@codeblueprint.co.uk> wrote: > > > > > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > > >

Re: [PATCH v4.4.y] sched/cgroup: Move sched_online_group() back into css_online() to fix crash

2017-07-26 Thread Matt Fleming
On Wed, 26 Jul, at 07:35:51AM, Greg KH wrote: > > If it needs a backport and a simple cherry-pick does not work, yes > please. Oh, it turns out cherry-picking commit 96b777452d88 to 4.9-stable works just fine.

Re: [PATCH v4.4.y] sched/cgroup: Move sched_online_group() back into css_online() to fix crash

2017-07-26 Thread Matt Fleming
On Tue, 25 Jul, at 11:04:39AM, Greg KH wrote: > On Thu, Jul 20, 2017 at 02:53:09PM +0100, Matt Fleming wrote: > > From: Konstantin Khlebnikov <khlebni...@yandex-team.ru> > > > > commit 96b777452d8881480fd5be50112f791c17db4b6b upstream. > > > > Commit: >

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-24 Thread Matt Fleming
On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > There are places where the efi map is getting and used like this. E.g > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c. > EFI developers worry the size of efi_memory_desc_t could not be the same > as e->efi_memdesc_size? >

Re: [PATCH v3 2/2] x86/efi: clean up dead code around efi_reserve_boot_services()

2017-07-24 Thread Matt Fleming
On Mon, 10 Jul, at 02:51:36PM, Naoya Horiguchi wrote: > EFI_BOOT_SERVICES_{CODE|DATA} regions never overlap the kernel now, > so we can clean up the check in efi_reserve_boot_services(). > > Signed-off-by: Naoya Horiguchi > --- > arch/x86/platform/efi/quirks.c | 23

Re: [PATCH v3 1/2] x86/boot/KASLR: exclude EFI_BOOT_SERVICES_{CODE|DATA} from KASLR's choice

2017-07-24 Thread Matt Fleming
On Mon, 10 Jul, at 02:51:35PM, Naoya Horiguchi wrote: > KASLR chooses kernel location from E820_TYPE_RAM regions by walking over > e820 entries now. E820_TYPE_RAM includes EFI_BOOT_SERVICES_CODE and > EFI_BOOT_SERVICES_DATA, so those regions can be the target. According to > UEFI spec, all memory

[PATCH v4.4.y] sched/cgroup: Move sched_online_group() back into css_online() to fix crash

2017-07-20 Thread Matt Fleming
917.5302984537258726349.stgit@buzz Signed-off-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> --- kernel/sched/core.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 20253dbc

Re: [PATCH v4 00/10] PCID and improved laziness

2017-07-13 Thread Matt Fleming
On Tue, 11 Jul, at 08:00:47AM, Andy Lutomirski wrote: > > https://git.kernel.org/pub/scm/linux/kernel/git/luto/misc-tests.git/ > > I did: > > $ ./context_switch_latency_64 0 process same Ah, that's better. I see about a 3.3% speedup with your patches when running the context-switch benchmark.

Re: [PATCH v4 00/10] PCID and improved laziness

2017-07-11 Thread Matt Fleming
On Fri, 30 Jun, at 01:44:22PM, Matt Fleming wrote: > On Thu, 29 Jun, at 08:53:12AM, Andy Lutomirski wrote: > > *** Ingo, even if this misses 4.13, please apply the first patch before > > *** the merge window. > > > > There are three performance benefits here: >

Re: [PATCH] x86/boot/KASLR: exclude EFI_BOOT_SERVICES_{CODE|DATA} from KASLR's choice

2017-07-07 Thread Matt Fleming
On Fri, 07 Jul, at 06:11:24AM, Naoya Horiguchi wrote: > On Fri, Jul 07, 2017 at 11:07:59AM +0800, Baoquan He wrote: > > On 07/06/17 at 03:57pm, Matt Fleming wrote: > > > On Thu, 06 Jul, at 08:31:07AM, Naoya Horiguchi wrote: > > > > + for (i = 0; i < nr_desc;

Re: [PATCH] x86/boot/KASLR: exclude EFI_BOOT_SERVICES_{CODE|DATA} from KASLR's choice

2017-07-07 Thread Matt Fleming
On Fri, 07 Jul, at 11:07:59AM, Baoquan He wrote: > On 07/06/17 at 03:57pm, Matt Fleming wrote: > > On Thu, 06 Jul, at 08:31:07AM, Naoya Horiguchi wrote: > > > + for (i = 0; i < nr_desc; i++) { > > > + md = (efi_memory_desc_t *)(p

Re: [PATCH] x86/boot/KASLR: exclude EFI_BOOT_SERVICES_{CODE|DATA} from KASLR's choice

2017-07-06 Thread Matt Fleming
On Thu, 06 Jul, at 08:31:07AM, Naoya Horiguchi wrote: > > KASLR chooses kernel location from E820_TYPE_RAM regions by walking over > e820 entries now. E820_TYPE_RAM includes EFI_BOOT_SERVICES_CODE and > EFI_BOOT_SERVICES_DATA, so those regions can be the target. According to > UEFI spec, all

Re: [PATCH v2 2/2] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-04 Thread Matt Fleming
On Tue, 04 Jul, at 04:46:58PM, Thomas Gleixner wrote: > On Tue, 4 Jul 2017, Baoquan He wrote: > > > In fact I just referred to code in setup_arch(). Now I have a question, > > though CONFIG_EFI=y but efi firmware is not enabled, > > boot_params.efi_info.efi_loader_signature should be initilized

Re: wake_wide mechanism clarification

2017-06-30 Thread Matt Fleming
On Thu, 29 Jun, at 08:49:13PM, Josef Bacik wrote: > > It may be worth to try with schedbench and trace it to see how this turns out > in > practice, as that's the workload that generated all this discussion before. I > imagine generally speaking this works out properly. The small regression I

Re: [PATCH v4 00/10] PCID and improved laziness

2017-06-30 Thread Matt Fleming
On Thu, 29 Jun, at 08:53:12AM, Andy Lutomirski wrote: > *** Ingo, even if this misses 4.13, please apply the first patch before > *** the merge window. > > There are three performance benefits here: > > 1. TLB flushing is slow. (I.e. the flush itself takes a while.) >This avoids many of

Re: [PATCH v7 19/36] x86/mm: Add support to access boot related data in the clear

2017-06-22 Thread Matt Fleming
- > arch/x86/include/asm/io.h |5 + > arch/x86/mm/ioremap.c | 179 > + > include/linux/io.h|2 + > kernel/memremap.c | 20 - > mm/early_ioremap.c| 18 - > 5 files

Re: [PATCH v7 18/36] x86/efi: Update EFI pagetable creation to work with SME

2017-06-22 Thread Matt Fleming
ov <b...@suse.de> > Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> > --- > arch/x86/platform/efi/efi_64.c | 15 +++ > 1 file changed, 11 insertions(+), 4 deletions(-) Reviewed-by: Matt Fleming <m...@codeblueprint.co.uk>

Re: [PATCH v7 16/36] efi: Add an EFI table address match function

2017-06-22 Thread Matt Fleming
> drivers/firmware/efi/efi.c | 33 + > include/linux/efi.h|7 +++ > 2 files changed, 40 insertions(+) Reviewed-by: Matt Fleming <m...@codeblueprint.co.uk>

Re: [PATCH v7 17/36] efi: Update efi_mem_type() to return an error rather than 0

2017-06-22 Thread Matt Fleming
l/efi.c |4 ++-- > arch/x86/platform/efi/efi.c |6 +++--- > include/linux/efi.h |2 +- > 3 files changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Matt Fleming <m...@codeblueprint.co.uk>

Re: [PATCHv7 05/14] x86/boot/efi: Define __KERNEL32_CS GDT on 64-bit configurations

2017-06-08 Thread Matt Fleming
el.com> > Cc: Matt Fleming <m...@codeblueprint.co.uk> > --- > arch/x86/boot/compressed/eboot.c | 25 +++-- > 1 file changed, 23 insertions(+), 2 deletions(-) Reviewed-by: Matt Fleming <m...@codeblueprint.co.uk>

Re: [PATCHv7 04/14] x86/boot/efi: Fix __KERNEL_CS definition of GDT entry on 64-bit configuration

2017-06-08 Thread Matt Fleming
On Tue, 06 Jun, at 02:31:23PM, Kirill A. Shutemov wrote: > Define __KERNEL_CS GDT entry as long mode (.L=1, .D=0) on 64-bit > configuration. > > Signed-off-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com> > Cc: Matt Fleming <m...@codeblueprint.co.uk> > -

Re: [PATCHv7 03/14] x86/boot/efi: Cleanup initialization of GDT entries

2017-06-08 Thread Matt Fleming
On Tue, 06 Jun, at 02:31:22PM, Kirill A. Shutemov wrote: > This is preparation for following patches without changing semantics of the > code. > > Signed-off-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com> > Cc: Matt Fleming <m...@codeblueprint.co.uk> > -

Re: [PATCH 3/5] x86_64: boot, extract efi_pe_entry from startup_64

2017-06-05 Thread Matt Fleming
Signed-off-by: Jiri Slaby <jsl...@suse.cz> > Cc: "H. Peter Anvin" <h...@zytor.com> > Cc: Thomas Gleixner <t...@linutronix.de> > Cc: Ingo Molnar <mi...@redhat.com> > Cc: <x...@kernel.org> > Cc: David Woodhouse <dw...@infradead.org> > Cc

Re: [PATCH 2/5] x86_32: boot, extract efi_pe_entry from startup_32

2017-06-05 Thread Matt Fleming
ENDPROC(efi32_stub_entry) > #endif > > Signed-off-by: Jiri Slaby <jsl...@suse.cz> > Cc: "H. Peter Anvin" <h...@zytor.com> > Cc: Thomas Gleixner <t...@linutronix.de> > Cc: Ingo Molnar <mi...@redhat.com> > Cc: <x...@kernel.org>

Re: hackbench vs select_idle_sibling; was: [tip:sched/core] sched/fair, cpumask: Export for_each_cpu_wrap()

2017-06-05 Thread Matt Fleming
On Fri, 19 May, at 04:00:35PM, Matt Fleming wrote: > On Wed, 17 May, at 12:53:50PM, Peter Zijlstra wrote: > > > > Please test.. > > Results are still coming in but things do look better with your patch > applied. > > It does look like there's a regression when

[PATCH 5/5] efi/bgrt: Skip efi_bgrt_init in case of non-efi boot

2017-05-26 Thread Matt Fleming
) Signed-off-by: Dave Young <dyo...@redhat.com> Tested-by: Sabrina Dubroca <s...@queasysnail.net> Cc: <sta...@vger.kernel.org> # v4.11+ Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> Signed-off-by: Mat

[PATCH 1/5] efi: Don't issue error message when booted under xen

2017-05-26 Thread Matt Fleming
;h...@zytor.com> Cc: Ingo Molnar <mi...@kernel.org> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Cc: <sta...@vger.kernel.org> # v4.9+ Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> --- arch/x86/platform/efi/qui

[PATCH 4/5] x86/efi: Correct ident mapping of efi old_map when kalsr enabled

2017-05-26 Thread Matt Fleming
gt; Cc: Russ Anderson <r...@sgi.com> Cc: Frank Ramsay <frank.ram...@hpe.com> Cc: Borislav Petkov <b...@alien8.de> Cc: Bhupesh Sharma <bhsha...@redhat.com> Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> --- arch/x86/platform/efi/efi_64.c | 79 +

[PATCH 3/5] x86/efi: Disable runtime services on kexec kernel if booted with efi=old_map

2017-05-26 Thread Matt Fleming
ess we allocated for runtime service regions in the initial boot - Matt Fleming ] Since kexec was never intended to work with efi=old_map, disable runtime services in kexec if booted with efi=old_map, so that we don't panic. Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prak...@intel.com>

[GIT PULL 0/5] EFI urgent fixes

2017-05-26 Thread Matt Fleming
Hi folks, Please pull the following fixes. There are patches that resolve a few boot crashes and some minor build and boot log cleanups. The following changes since commit 08332893e37af6ae779367e78e444f8f9571511d: Linux 4.12-rc2 (2017-05-21 19:30:23 -0700) are available in the git repository

[PATCH 2/5] efi: Remove duplicate 'const' specifiers

2017-05-26 Thread Matt Fleming
ked-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Reviewed-by: David Howells <dhowe...@redhat.com> Cc: Josh Boyer <jwbo...@fedoraproject.org> Cc: Ingo Molnar <mi...@kernel.org> Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> --- drivers/firmware/efi/libstub/secur

Re: [PATCH v4] x86/efi: Correct ident mapping of efi old_map when kalsr enabled

2017-05-25 Thread Matt Fleming
o build ident mapping, instead need copy pud entry > one by one from direct mapping. > > Fix it. > > Signed-off-by: Baoquan He <b...@redhat.com> > Signed-off-by: Dave Young <dyo...@redhat.com> > Cc: Matt Fleming <m...@codeblueprint.co.uk> > Cc: Ard Biesheuve

Re: [PATCH v2] x86/efi: Disable runtime services on kexec kernel if booted with efi=old_map

2017-05-25 Thread Matt Fleming
ncing: Attempted to kill the idle > task! > > [efi=old_map was never intended to work with kexec. The problem with > using efi=old_map is that the virtual addresses are assigned from the > memory region used by other kernel mappings; vmalloc() space. > Potentially there could be coll

Re: [PATCH 4.11 00/28] 4.11.1-stable review

2017-05-25 Thread Matt Fleming
On Mon, 15 May, at 11:28:16AM, Shuah Khan wrote: > Hi Matt, > > On 05/15/2017 08:36 AM, Matt Fleming wrote: > > On Fri, 12 May, at 10:01:41AM, Shuah Khan wrote: > >> > >> Greg/Matt, > >> > >> I started seeing this maybe since 4.11, so it is

Re: hackbench vs select_idle_sibling; was: [tip:sched/core] sched/fair, cpumask: Export for_each_cpu_wrap()

2017-05-19 Thread Matt Fleming
On Wed, 17 May, at 12:53:50PM, Peter Zijlstra wrote: > > Please test.. Results are still coming in but things do look better with your patch applied. It does look like there's a regression when running hackbench in process mode and when the CPUs are not fully utilised, e.g. check this out:

Re: [PATCH v5 17/32] x86/mm: Add support to access boot related data in the clear

2017-05-18 Thread Matt Fleming
On Mon, 15 May, at 08:35:17PM, Borislav Petkov wrote: > On Tue, Apr 18, 2017 at 04:19:21PM -0500, Tom Lendacky wrote: > > > + paddr = boot_params.efi_info.efi_memmap_hi; > > + paddr <<= 32; > > + paddr |= boot_params.efi_info.efi_memmap; > > + if (phys_addr

Re: hackbench vs select_idle_sibling; was: [tip:sched/core] sched/fair, cpumask: Export for_each_cpu_wrap()

2017-05-17 Thread Matt Fleming
On Wed, 17 May, at 12:53:50PM, Peter Zijlstra wrote: > On Mon, May 15, 2017 at 02:03:11AM -0700, tip-bot for Peter Zijlstra wrote: > > sched/fair, cpumask: Export for_each_cpu_wrap() > > > -static int cpumask_next_wrap(int n, const struct cpumask *mask, int start, > > int *wrapped) > > -{ > > >

Re: [PATCH 4.11 00/28] 4.11.1-stable review

2017-05-15 Thread Matt Fleming
AP is not enabled. > efi: Failed to lookup EFI memory descriptor for 0xd9e0f018 > > > From 816e76129ed5fadd28e526c43397c79775194b5c Mon Sep 17 00:00:00 2001 > From: Matt Fleming <m...@codeblueprint.co.uk> > Date: Mon, 29 Feb 2016 21:22:52 + > Subject: [PATCH]

Re: [PATCH V2] x86/efi: Add EFI_PGT_DUMP support for x86_32, kexec

2017-05-15 Thread Matt Fleming
r debug purposes. > > Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prak...@intel.com> > Cc: Borislav Petkov <b...@alien8.de> > Cc: Ricardo Neri <ricardo.n...@intel.com> > Cc: Matt Fleming <m...@codeblueprint.co.uk> > Cc: Ard Biesheuvel <ard.biesheu..

Re: [PATCH] efi: remove duplicate 'const' specifiers

2017-05-15 Thread Matt Fleming
On Thu, 11 May, at 01:43:17PM, Arnd Bergmann wrote: > gcc-7 shows a harmless warning: > > drivers/firmware/efi/libstub/secureboot.c:19:27: error: duplicate 'const' > declaration specifier [-Werror=duplicate-decl-specifier] > static const efi_char16_t const efi_SecureBoot_name[] = { >

Re: [PATCH] x86/efi: Fix kexec kernel panic when efi=old_map is enabled

2017-05-15 Thread Matt Fleming
pens because efi=old_map doesn't use efi_pgd but rather it uses > kernel's pgd. We don't hit the same panic in a regular kernel because > it uses old_map_region() and not __map_region(). > > Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prak...@intel.com> > Cc: Borislav Pet

Re: [PATCH] efi: don't issue error message when booted under xen

2017-05-15 Thread Matt Fleming
On Mon, 08 May, at 02:56:33PM, Juergen Gross wrote: > When booted as Xen dom0 there won't be an EFI memmap allocated. Avoid > issuing an error message in this case: > > [0.144079] efi: Failed to allocate new EFI memmap > > Signed-off-by: Juergen Gross > --- >

Re: [PATCH 1/2] efi/efi_test: use memdup_user

2017-05-10 Thread Matt Fleming
On Mon, 08 May, at 04:18:30PM, Ivan Hu wrote: > > > On 05/06/2017 04:53 AM, Matt Fleming wrote: > >On Sat, 29 Apr, at 09:42:52AM, Geliang Tang wrote: > >>Use memdup_user() helper instead of open-coding to simplify the code. > >> > >>Signed-o

Re: [PATCH 1/1 linux-next] efi/capsule: kmap() can't fail

2017-05-05 Thread Matt Fleming
On Tue, 25 Apr, at 08:10:51PM, Fabian Frederick wrote: > Remove NULL test on kmap() > > Signed-off-by: Fabian Frederick > --- > drivers/firmware/efi/capsule-loader.c | 5 - > drivers/firmware/efi/capsule.c| 4 > 2 files changed, 9 deletions(-) > > diff --git

Re: [PATCH] rtc: rtc-efi: Add an enable parameter and make it false for X86 by default

2017-05-05 Thread Matt Fleming
On Tue, 02 May, at 08:51:47AM, Ocean HY1 He wrote: > The commit 7efe665903d0 ("rtc: Disable EFI rtc for x86") turns off rtc-efi > option completely for x86 in rtc/Kconfig, to avoid possible crash caused by > buggy implementations of the time-related EFI runtime services. > > In fact, there are

Re: [PATCH 1/2] efi/efi_test: use memdup_user

2017-05-05 Thread Matt Fleming
On Sat, 29 Apr, at 09:42:52AM, Geliang Tang wrote: > Use memdup_user() helper instead of open-coding to simplify the code. > > Signed-off-by: Geliang Tang > --- > drivers/firmware/efi/test/efi_test.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-)

Re: [PATCH v2] x86/efi: Correct ident mapping of efi old_map when kalsr enabled

2017-05-05 Thread Matt Fleming
7e RSP: afe03d98 > [0.234000] CR2: 7febd57e > [0.234000] ---[ end trace d4ded46ab8ab8ba9 ]--- > [0.234000] Kernel panic - not syncing: Attempted to kill the idle task! > [ 0.234000] ---[ end Kernel panic - not syncing: Attempted to kill the > idle task! &

Re: [PATCH v2 0/3] efi: add support for non-standard capsule headers

2017-04-25 Thread Matt Fleming
Galileo > board. > > Jan > > [1] http://www.spinics.net/lists/linux-efi/msg11194.html > [2] > https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=quark-capsule > > Cc: Matt Fleming <m...@codeblueprint.co.uk> > > Ard Biesheuvel (2): > efi/capsule-loa

Re: [PATCH] arm64: xen: Implement EFI reset_system callback

2017-04-19 Thread Matt Fleming
On Wed, 19 Apr, at 09:29:06PM, Daniel Kiper wrote: > On Tue, Apr 18, 2017 at 02:46:50PM +0100, Matt Fleming wrote: > > On Thu, 06 Apr, at 04:55:11PM, Mark Rutland wrote: > > > > > > Please, let's keep the Xen knowledge constrained to the Xen EFI wrapper, > > &

Re: [PATCH] arm64: xen: Implement EFI reset_system callback

2017-04-18 Thread Matt Fleming
On Thu, 06 Apr, at 04:55:11PM, Mark Rutland wrote: > > Please, let's keep the Xen knowledge constrained to the Xen EFI wrapper, > rather than spreading it further. > > IMO, given reset_system is a *mandatory* function, the Xen wrapper > should provide an implementation. > > I don't see why you

Re: [PATCH 06/24] Add a sysrq option to exit secure boot mode

2017-04-16 Thread Matt Fleming
On Fri, 14 Apr, at 08:05:07PM, Thomas Gleixner wrote: > On Wed, 5 Apr 2017, David Howells wrote: > > > From: Kyle McMartin > > > > Make sysrq+x exit secure boot mode on x86_64, thereby allowing the running > > kernel image to be modified. This lifts the lockdown. > > > >

[GIT PULL] EFI urgent fix

2017-04-12 Thread Matt Fleming
Folks, please pull the single below fix from Omar which fixes a kexec boot regression. I've based the pull on tip/efi/urgent since the EFI urgent queue hasn't reached Linus' tree yet. The following changes since commit 55d728a40d368ba80443be85c02e641fc9082a3f: efi/fb: Avoid reconfiguration of

[PATCH] x86/efi: Don't try to reserve runtime regions

2017-04-12 Thread Matt Fleming
Ingo Molnar <mi...@kernel.org> Cc: Peter Jones <pjo...@redhat.com> Cc: <sta...@vger.kernel.org> # v4.9+ Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> --- arch/x86/platform/efi/quirks.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/platform/

Re: [PATCH] x86/efi: don't try to reserve runtime regions

2017-04-09 Thread Matt Fleming
On Tue, 04 Apr, at 04:41:55PM, Omar Sandoval wrote: > From: Omar Sandoval > > Reserving a runtime region results in splitting the efi memory > descriptors for the runtime region. This results in runtime region > descriptors with bogus memory mappings, leading to interesting

Re: kexec regression since 4.9 caused by efi

2017-04-04 Thread Matt Fleming
On Mon, 20 Mar, at 10:14:12AM, Dave Young wrote: > > Matt, I'm fine if you prefer to capture the range checking errors. > Would you like me to post it or just you send it out? Can you please send out the patch with the minimal change to efi_arch_mem_reserve() and we'll get it into urgent ASAP.

Re: kexec regression since 4.9 caused by efi

2017-03-17 Thread Matt Fleming
On Fri, 17 Mar, at 10:09:51AM, Dave Young wrote: > > Matt, I think it should be fine although I think the md type checking in > efi_mem_desc_lookup() is causing confusion and not easy to understand.. Could you make that a separate patch if you think of improvements there? > How about move the

Re: kexec regression since 4.9 caused by efi

2017-03-16 Thread Matt Fleming
On Mon, 13 Mar, at 03:37:48PM, Dave Young wrote: > > Omar, could you try below patch? Looking at the efi_mem_desc_lookup, it is not > correct to be used in efi_arch_mem_reserve, if it passed your test, I > can rewrite patch log with more background and send it out: > >

Re: kexec regression since 4.9 caused by efi

2017-03-16 Thread Matt Fleming
On Thu, 09 Mar, at 12:53:36PM, Ard Biesheuvel wrote: > > Hi Omar, > > Thanks for tracking this down. > > I wonder if this is an unintended side effect of the way we repurpose > the EFI_MEMORY_RUNTIME attribute in efi_arch_mem_reserve(). AFAIUI, > splitting memory map entries should only be

[tip:sched/core] sched/loadavg: Use {READ,WRITE}_ONCE() for sample window

2017-03-16 Thread tip-bot for Matt Fleming
Commit-ID: caeb5882979bc6f3c8766fcf59c6269b38f521bc Gitweb: http://git.kernel.org/tip/caeb5882979bc6f3c8766fcf59c6269b38f521bc Author: Matt Fleming <m...@codeblueprint.co.uk> AuthorDate: Fri, 17 Feb 2017 12:07:31 + Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:sched/core] sched/loadavg: Avoid loadavg spikes caused by delayed NO_HZ accounting

2017-03-16 Thread tip-bot for Matt Fleming
Commit-ID: 6e5f32f7a43f45ee55c401c0b9585eb01f9629a8 Gitweb: http://git.kernel.org/tip/6e5f32f7a43f45ee55c401c0b9585eb01f9629a8 Author: Matt Fleming <m...@codeblueprint.co.uk> AuthorDate: Fri, 17 Feb 2017 12:07:30 + Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

Re: [PATCH] sched/deadline: Add missing update_rq_clock() in dl_task_timer()

2017-03-07 Thread Matt Fleming
se of all the DL double rq locking going on inside of dl_task_offline_migration(). I'd definitely like someone else to verify, but this looks OK to me. Reviewed-by: Matt Fleming <m...@codeblueprint.co.uk>

Re: [PATCHv3 15/33] x86/efi: handle p4d in EFI pagetables

2017-02-28 Thread Matt Fleming
On Fri, 17 Feb, at 05:13:10PM, Kirill A. Shutemov wrote: > Allocate additional page table level and change efi_sync_low_kernel_mappings() > to make syncing logic work with additional page table level. > > Signed-off-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com> >

Re: [PATCH 0/2] efi: Enhance capsule loader to support signed Quark images

2017-02-28 Thread Matt Fleming
On Tue, 28 Feb, at 01:20:25PM, Jan Kiszka wrote: > > From you POV, does this exclude upstream quirk support for already > shipped devices? It would need to be an extremely small, well-contained change, that had no chance of disrupting other users of the capsule interface and where I had a good

Re: [PATCH 0/2] efi: Enhance capsule loader to support signed Quark images

2017-02-28 Thread Matt Fleming
On Fri, 17 Feb, at 10:24:41AM, Jan Kiszka wrote: > > I just can re-express my frustration that this essential step hasn't > been started years ago by whoever designed the extension. Then I bet > there would have been constructive feedback on the interface BEFORE its > ugliness spread to broader

Re: [PATCH v2 2/2] efi: efi_mem_reserve(): don't reserve through memblock after mm_init()

2017-02-27 Thread Matt Fleming
16918c54e01802af4e891 Mon Sep 17 00:00:00 2001 From: Matt Fleming <m...@codeblueprint.co.uk> Date: Mon, 27 Feb 2017 21:14:29 + Subject: [PATCH] mm/memblock: Warn if used after slab is up and prevent memory corruption Historically there have been many memory corruption bugs caused by using

Re: sched_setaffinity causing "rq->clock_update_flags < RQCF_ACT_SKIP" warning.

2017-02-27 Thread Matt Fleming
On Fri, 24 Feb, at 05:19:03PM, Dave Jones wrote: > Looks like fallout from cb42c9a3e23448c3f9a25417fae6309b1a92 > > WARNING: CPU: 1 PID: 561 at kernel/sched/sched.h:812 > set_next_entity+0x11d/0x350 > rq->clock_update_flags < RQCF_ACT_SKIP > CPU: 1 PID: 561 Comm: trinity-c36 Not tainted

Re: [RFC PATCH v4 13/28] efi: Update efi_mem_type() to return defined EFI mem types

2017-02-24 Thread Matt Fleming
On Thu, 23 Feb, at 11:27:55AM, Tom Lendacky wrote: > > I can do that, I'll change the return type to an int. For the > !efi_enabled I can return -ENOTSUPP and for when an entry isn't > found I can return -EINVAL. Sound good? Sounds good to me!

Re: [GIT PULL] scheduler changes for v4.11

2017-02-22 Thread Matt Fleming
On Wed, 22 Feb, at 12:41:01PM, Linus Torvalds wrote: > Hmm. The scheduler changes seem to show problems with suspend/resume. > > I now get his when suspending: > > ... > Disabling non-boot CPUs ... > Cannot set affinity for irq 285 > smpboot: CPU 1 is now offline > [ cut

Re: [PATCH] sched/fair: Update rq clock before changing a task's CPU affinity

2017-02-22 Thread Matt Fleming
ng rq clock after holding rq->lock/pi_lock > just as what other dequeue + put_prev + enqueue + set_curr story does. > > Cc: Peter Zijlstra <pet...@infradead.org> > Cc: Thomas Gleixner <t...@linutronix.de> > Cc: Ingo Molnar <mi...@kernel.org> > Cc: Matt Flem

Re: [RFC PATCH v4 13/28] efi: Update efi_mem_type() to return defined EFI mem types

2017-02-21 Thread Matt Fleming
On Thu, 16 Feb, at 09:44:57AM, Tom Lendacky wrote: > Update the efi_mem_type() to return EFI_RESERVED_TYPE instead of a > hardcoded 0. > > Signed-off-by: Tom Lendacky > --- > arch/x86/platform/efi/efi.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >

[PATCH v2 1/2] sched/loadavg: Avoid loadavg spikes caused by delayed NO_HZ accounting

2017-02-17 Thread Matt Fleming
gwanakikb...@gmail.com> Cc: Morten Rasmussen <morten.rasmus...@arm.com> Cc: Vincent Guittot <vincent.guit...@linaro.org> Cc: Frederic Weisbecker <fweis...@gmail.com> Cc: <sta...@vger.kernel.org> # v3.5+ Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> --- kernel/sched

[PATCH v2 2/2] sched/loadavg: Use {READ,WRITE}_ONCE() for sample window

2017-02-17 Thread Matt Fleming
<umgwanakikb...@gmail.com> Cc: Morten Rasmussen <morten.rasmus...@arm.com> Cc: Vincent Guittot <vincent.guit...@linaro.org> Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> --- kernel/sched/loadavg.c | 18 +++--- 1 file changed, 11 insertions(+), 7 del

  1   2   3   4   5   6   7   8   9   10   >