Re: [PATCH v2 1/5] string.h: add array-wrappers for (v)memdup_user()

2023-09-18 Thread Andy Shevchenko
; cares. ENOMEM is good for the real allocation calls, here is not the one (the one is below). Hence ENOMEM is not good candidate above. And whenever functions returns an error pointer the caller must not assume that it will be only ENOMEM for allocators. > > + return memdup

Re: [PATCH v2 1/5] string.h: add array-wrappers for (v)memdup_user()

2023-09-10 Thread Andy Shevchenko
n * size to calculate array sizes. No objections, Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH 1/5] string.h: add array-wrappers for (v)memdup_user()

2023-08-31 Thread Andy Shevchenko
On Thu, Aug 31, 2023 at 4:16 PM Andy Shevchenko wrote: > On Thu, Aug 31, 2023 at 3:22 PM Philipp Stanner wrote: > > On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote: > > > On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner > > > wrote: ... > > > I'm w

Re: [PATCH 1/5] string.h: add array-wrappers for (v)memdup_user()

2023-08-31 Thread Andy Shevchenko
On Thu, Aug 31, 2023 at 3:22 PM Philipp Stanner wrote: > On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote: > > On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner > > wrote: ... > > I'm wondering if this has no side-effects as string.h/string.c IIRC > > is used

Re: [PATCH 1/5] string.h: add array-wrappers for (v)memdup_user()

2023-08-31 Thread Andy Shevchenko
On Wed, Aug 30, 2023 at 10:15 PM wrote: > On Wed, 2023-08-30 at 17:29 +0300, Andy Shevchenko wrote: > > On Wed, Aug 30, 2023 at 5:19 PM wrote: > > > On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote: > > > > On Wed, Aug 30, 2023 at 4:46 PM Philipp

Re: [PATCH 1/5] string.h: add array-wrappers for (v)memdup_user()

2023-08-30 Thread Andy Shevchenko
- With Best Regards, Andy Shevchenko ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH 1/5] string.h: add array-wrappers for (v)memdup_user()

2023-08-30 Thread Andy Shevchenko
On Wed, Aug 30, 2023 at 5:19 PM wrote: > On Wed, 2023-08-30 at 17:11 +0300, Andy Shevchenko wrote: > > On Wed, Aug 30, 2023 at 4:46 PM Philipp Stanner > > wrote: > > > --- a/include/linux/string.h > > > +++ b/include/linux/string.h > > > > I'm wond

Re: [PATCH 1/5] string.h: add array-wrappers for (v)memdup_user()

2023-08-30 Thread Andy Shevchenko
by kfree(). > + */ ... > +/** > + * vmemdup_array_user - duplicate array from user space > + * Redundant? > + * @src: source address in user space > + * @n: number of array members to copy > + * @size: size of one array member > + * > + * Return: an ERR_PTR() on failure.

Re: [PATCH V2] notifier/panic: Introduce panic_notifier_filter

2022-01-07 Thread Andy Shevchenko
pr_warn("panic_notifier_filter: exceeded maximum > notifiers (%d), aborting\n", > + PANIC_NF_MAX); > + panic_nf_count = 0; > + break; > + } > + } > + > + return 0; > +} > +early_param("panic_notifier_filter", panic_notifier_filter_setup); -- With Best Regards, Andy Shevchenko ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2021-10-07 Thread Andy Shevchenko
On Thu, Oct 7, 2021 at 10:20 AM Ard Biesheuvel wrote: > On Wed, 6 Oct 2021 at 18:28, Andy Shevchenko > wrote: > > On Mon, Jun 14, 2021 at 08:27:36PM +0300, Andy Shevchenko wrote: > > > On Mon, Jun 14, 2021 at 08:07:33PM +0300, Andy Shevchenko wrote: ... > >

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2021-10-06 Thread Andy Shevchenko
On Mon, Jun 14, 2021 at 08:27:36PM +0300, Andy Shevchenko wrote: > On Mon, Jun 14, 2021 at 08:07:33PM +0300, Andy Shevchenko wrote: > > On Mon, Jun 14, 2021 at 06:38:30PM +0300, Andy Shevchenko wrote: > > > On Sat, Jun 12, 2021 at 12:40:57PM +0800, Dave Young wrote: > > >

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2021-07-19 Thread Andy Shevchenko
On Mon, Jul 19, 2021 at 10:53 AM Ard Biesheuvel wrote: > On Mon, 14 Jun 2021 at 19:27, Andy Shevchenko > wrote: > > On Mon, Jun 14, 2021 at 08:07:33PM +0300, Andy Shevchenko wrote: > > > On Mon, Jun 14, 2021 at 06:38:30PM +0300, Andy Shevchenko wrote: > > > > O

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2021-06-14 Thread Andy Shevchenko
On Mon, Jun 14, 2021 at 08:07:33PM +0300, Andy Shevchenko wrote: > On Mon, Jun 14, 2021 at 06:38:30PM +0300, Andy Shevchenko wrote: > > On Sat, Jun 12, 2021 at 12:40:57PM +0800, Dave Young wrote: > > > > Probably it is doable to have kexec on 32bit efi working > >

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2021-06-14 Thread Andy Shevchenko
On Mon, Jun 14, 2021 at 06:38:30PM +0300, Andy Shevchenko wrote: > On Sat, Jun 12, 2021 at 12:40:57PM +0800, Dave Young wrote: > > > Probably it is doable to have kexec on 32bit efi working > > > without runtime service support, that means no need the trick o

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2021-06-14 Thread Andy Shevchenko
I dropped patches from previous mail against kernel and kexec-tools) for both kernel and user space on first and second environments. It does NOT solve the issue. If there is no idea pops up soon, I'm going to resend my series that workarounds the issue. -- With Best Regards, Andy Shevchenko __

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2021-06-08 Thread Andy Shevchenko
On Tue, Jun 8, 2021 at 3:29 PM Dave Young wrote: > On 06/07/21 at 08:18pm, Andy Shevchenko wrote: > > On Mon, Jun 07, 2021 at 07:22:21PM +0300, Andy Shevchenko wrote: > > > On Sat, Jun 05, 2021 at 03:51:05PM +0800, Dave Young wrote: > > > > On 06/02/21 at

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2021-06-07 Thread Andy Shevchenko
On Mon, Jun 07, 2021 at 07:22:21PM +0300, Andy Shevchenko wrote: > On Sat, Jun 05, 2021 at 03:51:05PM +0800, Dave Young wrote: > > On 06/02/21 at 11:53am, Andy Shevchenko wrote: > > > On Wed, Jun 02, 2021 at 11:42:14AM +0300, Andy Shevchenko wrote: > > > > On Fri, De

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2021-06-07 Thread Andy Shevchenko
On Sat, Jun 05, 2021 at 03:51:05PM +0800, Dave Young wrote: > Hi, > On 06/02/21 at 11:53am, Andy Shevchenko wrote: > > +Cc: Ard > > > > On Wed, Jun 02, 2021 at 11:42:14AM +0300, Andy Shevchenko wrote: > > > On Fri, Dec 02, 2016 at 09:54:14PM +0200, Andy Shevch

Re: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel

2021-06-02 Thread Andy Shevchenko
Fixed Ard's address On Wed, Jun 02, 2021 at 11:37:29AM +0300, Andy Shevchenko wrote: > On Tue, Jan 21, 2020 at 12:18:03AM +0100, Ard Biesheuvel wrote: > > On Mon, 20 Jan 2020 at 23:31, Andy Shevchenko > > wrote: > > > > > > On Mon, Jan 20, 2020 at 9:28 P

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2021-06-02 Thread Andy Shevchenko
+Cc: Ard On Wed, Jun 02, 2021 at 11:42:14AM +0300, Andy Shevchenko wrote: > On Fri, Dec 02, 2016 at 09:54:14PM +0200, Andy Shevchenko wrote: > > Until now DMI information is lost when kexec'ing. Fix this in the same way > > as > > it has been done for ACPI RSDP. > >

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2021-06-02 Thread Andy Shevchenko
On Fri, Dec 02, 2016 at 09:54:14PM +0200, Andy Shevchenko wrote: > Until now DMI information is lost when kexec'ing. Fix this in the same way as > it has been done for ACPI RSDP. > > Series has been tested on Galileo Gen2 where DMI is used by drivers, in > particular the default

Re: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel

2021-06-02 Thread Andy Shevchenko
On Tue, Jan 21, 2020 at 12:18:03AM +0100, Ard Biesheuvel wrote: > On Mon, 20 Jan 2020 at 23:31, Andy Shevchenko > wrote: > > > > On Mon, Jan 20, 2020 at 9:28 PM Eric W. Biederman > > wrote: > > > Andy Shevchenko writes: > > > > On Sat, Dec 1

[PATCH v3 1/1] kernel.h: Split out panic and oops helpers

2021-05-15 Thread Andy Shevchenko
from something which has its own domain At the same time convert users tree-wide to use new headers, although for the time being include new header back to kernel.h to avoid twisted indirected includes for existing users. Signed-off-by: Andy Shevchenko Reviewed-by: Bjorn Andersson Acked

[PATCH v2 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Andy Shevchenko
from something which has its own domain At the same time convert users tree-wide to use new headers, although for the time being include new header back to kernel.h to avoid twisted indirected includes for existing users. Signed-off-by: Andy Shevchenko Reviewed-by: Bjorn Andersson Acked

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Andy Shevchenko
On Thu, Apr 08, 2021 at 02:45:12PM +0200, Rasmus Villemoes wrote: > On 06/04/2021 15.31, Andy Shevchenko wrote: > > kernel.h is being used as a dump for all kinds of stuff for a long time. > > Here is the attempt to start cleaning it up by splitting out panic and > > o

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Andy Shevchenko
On Thu, Apr 08, 2021 at 11:23:03PM -0700, Andrew Morton wrote: > On Wed, 7 Apr 2021 11:46:37 +0300 Andy Shevchenko > wrote: > > > On Wed, Apr 7, 2021 at 11:17 AM Kees Cook wrote: > > > > > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrot

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 5:30 PM Luis Chamberlain wrote: > On Wed, Apr 07, 2021 at 10:33:44AM +0300, Andy Shevchenko wrote: > > On Wed, Apr 7, 2021 at 10:25 AM Luis Chamberlain wrote: > > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: ... > > >

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 10:25 AM Luis Chamberlain wrote: > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > > diff --git a/include/linux/panic_notifier.h b/include/linux/panic_notifier.h > > new file mode 100644 > > index ..41e32483d7a7 >

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 11:17 AM Kees Cook wrote: > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > > kernel.h is being used as a dump for all kinds of stuff for a long time. > > Here is the attempt to start cleaning it up by splitting out panic an

[PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Andy Shevchenko
to avoid twisted indirected includes for existing users. Signed-off-by: Andy Shevchenko --- arch/powerpc/kernel/setup-common.c | 1 + arch/x86/include/asm/desc.h | 1 + arch/x86/kernel/cpu/mshyperv.c | 1 + arch/x86/kernel/setup.c | 1 + drivers/char/ipmi

Re: [PATCH v1 3/3] kernel/resource: remove first_lvl / siblings_only logic

2021-03-23 Thread Andy Shevchenko
the whole tree, so remove documentation > that indicates that some functions behave differently. Like this clean up! Reviewed-by: Andy Shevchenko Although a few nit-picks below. > Cc: Andrew Morton > Cc: Greg Kroah-Hartman > Cc: Dan Williams > Cc: Daniel Vetter > Cc: Andy

Re: [PATCH v1 2/3] kernel/resource: make walk_mem_res() find all busy IORESOURCE_MEM resources

2021-03-23 Thread Andy Shevchenko
RAM" in __ioremap_caller(). Here I dunno, but consider to add Fixes tag if it fixes known bad behaviour. > Let's find all busy IORESOURCE_MEM resources, making the function > behave similar to walk_system_ram_res(). > > Cc: Andrew Morton > Cc: Greg Kroah-Hartman > Cc: Dan

Re: [PATCH v1 1/3] kernel/resource: make walk_system_ram_res() find all busy IORESOURCE_SYSTEM_RAM resources

2021-03-23 Thread Andy Shevchenko
in the crashdump on x86-64. Note > > that e.g,, arm64 relies on memblock data and, therefore, always considers > > all added System RAM already. > > > > Let's find all busy IORESOURCE_SYSTEM_RAM resources, making the function > > behave like walk_system_ram_range(). > &g

Re: [PATCH v1 1/3] kernel/resource: make walk_system_ram_res() find all busy IORESOURCE_SYSTEM_RAM resources

2021-03-23 Thread Andy Shevchenko
n memblock data and, therefore, always considers > all added System RAM already. > > Let's find all busy IORESOURCE_SYSTEM_RAM resources, making the function > behave like walk_system_ram_range(). > > Cc: Andrew Morton > Cc: Greg Kroah-Hartman > Cc: Dan Williams > Cc:

Re: [PATCH v5 4/4] printk: use the lockless ringbuffer

2020-07-20 Thread Andy Shevchenko
y used interface such as > printk doesn't seem right. Where the newline-print is inappropriate, > wouldn't removing that newline-print be more appropriate (instead of > forcing this behaviour on everyone)? -- With Best Regards, Andy Shevchenko ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel

2020-05-21 Thread Andy Shevchenko
On Tue, Jan 21, 2020 at 11:17:19AM -0600, Eric W. Biederman wrote: > Andy Shevchenko writes: > > On Tue, Jan 21, 2020 at 12:18:03AM +0100, Ard Biesheuvel wrote: > >> On Mon, 20 Jan 2020 at 23:31, Andy Shevchenko > >> wrote: > >> > On Mon, Jan 20, 2020 at 9

Re: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel

2020-01-21 Thread Andy Shevchenko
On Tue, Jan 21, 2020 at 10:29:35AM -0600, Eric W. Biederman wrote: > Jean Delvare writes: > > > On Mon, 20 Jan 2020 23:55:43 +0200, Andy Shevchenko wrote: > >> On Mon, Jan 20, 2020 at 11:44 PM Jean Delvare wrote: > >> > > >> > On Mon, 20 Jan

Re: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel

2020-01-21 Thread Andy Shevchenko
On Tue, Jan 21, 2020 at 12:18:03AM +0100, Ard Biesheuvel wrote: > On Mon, 20 Jan 2020 at 23:31, Andy Shevchenko > wrote: > > On Mon, Jan 20, 2020 at 9:28 PM Eric W. Biederman > > wrote: > > > Andy Shevchenko writes: > > > > On Sat, Dec 17, 201

Re: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel

2020-01-20 Thread Andy Shevchenko
On Mon, Jan 20, 2020 at 9:28 PM Eric W. Biederman wrote: > Andy Shevchenko writes: > > On Sat, Dec 17, 2016 at 06:57:21PM +0800, Dave Young wrote: > >> Ccing efi people. > >> > >> On 12/16/16 at 02:33pm, Jean Delvare wrote: > >> > On Fri, 1

Re: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel

2020-01-20 Thread Andy Shevchenko
t understand how it possible can help for in-kernel code, like DMI quirks in a drivers. -- With Best Regards, Andy Shevchenko ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel

2020-01-20 Thread Andy Shevchenko
On Sat, Dec 17, 2016 at 06:57:21PM +0800, Dave Young wrote: > Ccing efi people. > > On 12/16/16 at 02:33pm, Jean Delvare wrote: > > On Fri, 16 Dec 2016 14:18:58 +0200, Andy Shevchenko wrote: > > > On Fri, 2016-12-16 at 10:32 +0800, Dave Young wrote: > > > >

Re: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel

2019-09-06 Thread Andy Shevchenko
On Sat, Dec 17, 2016 at 06:57:21PM +0800, Dave Young wrote: > On 12/16/16 at 02:33pm, Jean Delvare wrote: > > On Fri, 16 Dec 2016 14:18:58 +0200, Andy Shevchenko wrote: > > > On Fri, 2016-12-16 at 10:32 +0800, Dave Young wrote: > > > > On 12/15/16 at 12:28pm, Jean

Re: [PATCH v6 2/4] resource: Use list_head to link sibling resource

2018-07-09 Thread Andy Shevchenko
}; >> 73b4390f Ralf Baechle 2008-07-16 59 >> >> :: The code at line 57 was first introduced by commit >> :: 73b4390fb23456964201abda79f1210fe337d01a [MIPS] Routerboard 532: >> Support for base system >> >&

Re: [PATCH v6 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-05 Thread Andy Shevchenko
On Wed, Jul 4, 2018 at 7:10 AM, Baoquan He wrote: > reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c > and arch/powerpc/kernel/pci-common.c, so move it to kernel/resource.c > so that it's shared. With couple of comments below, Reviewed-by: Andy Shevchenko P.S

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-04 Thread Andy Shevchenko
On Tue, Jul 3, 2018 at 5:55 PM, Baoquan He wrote: > On 06/12/18 at 05:24pm, Andy Shevchenko wrote: >> On Tue, Jun 12, 2018 at 5:20 PM, Andy Shevchenko >> wrote: >> > I briefly looked at the code and error codes we have, so, my proposal >> > is one of the fo

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-06-13 Thread Andy Shevchenko
On Tue, Jun 12, 2018 at 12:38 PM, Baoquan He wrote: > On 06/12/18 at 11:29am, Andy Shevchenko wrote: >> On Tue, Jun 12, 2018 at 6:28 AM, Baoquan He wrote: >> > +{ >> >> > + for (pp = >child; (p = *pp) != NULL; pp = >sibling) { >&

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-06-13 Thread Andy Shevchenko
On Tue, Jun 12, 2018 at 5:20 PM, Andy Shevchenko wrote: > On Tue, Jun 12, 2018 at 12:38 PM, Baoquan He wrote: >> On 06/12/18 at 11:29am, Andy Shevchenko wrote: >>> On Tue, Jun 12, 2018 at 6:28 AM, Baoquan He wrote: > >>> > +{ >>> >>> > +

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-06-13 Thread Andy Shevchenko
contained */ Usually we are expecting real eeror codes. > + if (firstpp == NULL) > + firstpp = pp; > + } > + if (firstpp == NULL) > + return -1; /* didn't find any conf

Re: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel

2016-12-16 Thread Andy Shevchenko
On Fri, 2016-12-16 at 10:32 +0800, Dave Young wrote: > On 12/15/16 at 12:28pm, Jean Delvare wrote: > > Hi Andy, > > > > On Fri,  2 Dec 2016 21:54:16 +0200, Andy Shevchenko wrote: > > > Until now kexec'ed kernel has no clue where to look for DMI entry > > >