[PATCH] makedumpfile: assign bitmap2 fd for sub process during refiltering

2019-12-02 Thread Pingfan Liu
In refiltering mode, each sub process inherits bitmap2->fd from parent. Then they lseek()/read() on the same fd, which means that they interference with each other. This breaks the purpose of SPLITTING_FD_BITMAP(i) for each sub process. Fix it by assigning a sub process dedicated fd to bitmap2->fd

Re: [PATCH] efi: arm64: Introduce /sys/firmware/efi/memreserve to tell the persistent pages

2019-12-02 Thread Masayoshi Mizuma
On Fri, Nov 29, 2019 at 01:25:36PM +0100, Matthias Brugger wrote: > > > On 25/11/2019 19:49, Masayoshi Mizuma wrote: > > From: Masayoshi Mizuma > > > > kexec reboot stops in early boot sequence because efi_config_parse_tables() > > refers garbage data. We can see the log with memblock=debug ker

Re: [RFC PATCH v5 1/3] printk-rb: new printk ringbuffer implementation (writer)

2019-12-02 Thread Sergey Senozhatsky
On (19/12/02 17:37), John Ogness wrote: > On 2019-12-02, Petr Mladek wrote: > >> > +/* Reserve a new descriptor, invalidating the oldest if necessary. */ > >> > +static bool desc_reserve(struct printk_ringbuffer *rb, u32 *id_out) > >> > +{ > >> > +struct prb_desc_ring *desc_ring = &rb->des

Re: kexec_file overwrites reserved EFI ESRT memory

2019-12-02 Thread Michael Weiser
Hi Dave, On Mon, Dec 02, 2019 at 05:05:20PM +0800, Dave Young wrote: > > It seems a serious problem, the EFI modified memmap does not get an > > /proc/iomem resource update, but kexec_file relies on /proc/iomem in > > X86. > > > > There is an question from Sai about why add_efi_memmap is not ena

Re: [RESEND PATCH v5 2/5] arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo

2019-12-02 Thread John Donnelly
On 11/29/19 1:59 PM, Bhupesh Sharma wrote: vabits_actual variable on arm64 indicates the actual VA space size, and allows a single binary to support both 48-bit and 52-bit VA spaces. If the ARMv8.2-LVA optional feature is present, and we are running with a 64KB page size; then it is possible to

Re: [RESEND PATCH v5 1/5] crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo

2019-12-02 Thread John Donnelly
On 11/29/19 1:59 PM, Bhupesh Sharma wrote: Right now user-space tools like 'makedumpfile' and 'crash' need to rely on a best-guess method of determining value of 'MAX_PHYSMEM_BITS' supported by underlying kernel. This value is used in user-space code to calculate the bit-space required to store

Re: [RFC PATCH v5 1/3] printk-rb: new printk ringbuffer implementation (writer)

2019-12-02 Thread John Ogness
On 2019-12-02, Petr Mladek wrote: >> > +/* Reserve a new descriptor, invalidating the oldest if necessary. */ >> > +static bool desc_reserve(struct printk_ringbuffer *rb, u32 *id_out) >> > +{ >> > + struct prb_desc_ring *desc_ring = &rb->desc_ring; >> > + struct prb_desc *desc; >> > + u32 id_pr

Re: [RFC PATCH v5 1/3] printk-rb: new printk ringbuffer implementation (writer)

2019-12-02 Thread Petr Mladek
On Mon 2019-12-02 16:48:41, Petr Mladek wrote: > > +/* Reserve a new descriptor, invalidating the oldest if necessary. */ > > +static bool desc_reserve(struct printk_ringbuffer *rb, u32 *id_out) > > +{ > > + struct prb_desc_ring *desc_ring = &rb->desc_ring; > > + struct prb_desc *desc; > > +

Re: [RFC PATCH v5 1/3] printk-rb: new printk ringbuffer implementation (writer)

2019-12-02 Thread Petr Mladek
Hi, I have seen few prelimitary versions before this public one. I am either happy with it or blind to see new problems[*]. It would be great if anyone else could look at it. Especially I am intreseted: + Whether the algorithm can be understood by people who see it for the "first" time.

Re: kexec_file overwrites reserved EFI ESRT memory

2019-12-02 Thread Dave Young
Add more cc On 12/02/19 at 04:58pm, Dave Young wrote: > On 11/29/19 at 04:27pm, Michael Weiser wrote: > > Hello Dave, > > > > On Mon, Nov 25, 2019 at 01:52:01PM +0800, Dave Young wrote: > > > > > > > Fundamentally when deciding where to place a new kernel kexec (either > > > > > user space or the

Re: kexec_file overwrites reserved EFI ESRT memory

2019-12-02 Thread Dave Young
On 11/29/19 at 04:27pm, Michael Weiser wrote: > Hello Dave, > > On Mon, Nov 25, 2019 at 01:52:01PM +0800, Dave Young wrote: > > > > > Fundamentally when deciding where to place a new kernel kexec (either > > > > user space or the in kernel kexec_file implementation) needs to be able > > > > to as