Re: [PATCH v2 2/2] powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto

2021-08-14 Thread Michael Ellerman
Christophe Leroy writes: > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index 24725e50c7b4..34745f239208 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -926,7 +926,7 @@ static void check_section(const char *modname, struct > elf_info *elf, >

Re: [PATCH] ppc: add "-z notext" flag to disable diagnostic

2021-08-14 Thread Fāng-ruì Sòng
On Sat, Aug 14, 2021 at 5:59 AM Segher Boessenkool wrote: > > On Fri, Aug 13, 2021 at 01:05:08PM -0700, Fangrui Song wrote: > > Text relocations are considered very awful by linker developers. > > By very few linker developers. https://groups.google.com/g/generic-abi/c/Ckq19PfLxyk/m/uW29sgkoAgAJ

Re: [PATCH v2 03/12] x86/sev: Add an x86 version of prot_guest_has()

2021-08-14 Thread Borislav Petkov
On Fri, Aug 13, 2021 at 11:59:22AM -0500, Tom Lendacky wrote: > diff --git a/arch/x86/include/asm/protected_guest.h > b/arch/x86/include/asm/protected_guest.h > new file mode 100644 > index ..51e4eefd9542 > --- /dev/null > +++ b/arch/x86/include/asm/protected_guest.h > @@ -0,0 +1,29 @@

Re: [PATCH v2 02/12] mm: Introduce a function to check for virtualization protection features

2021-08-14 Thread Tom Lendacky
On 8/14/21 1:32 PM, Borislav Petkov wrote: On Fri, Aug 13, 2021 at 11:59:21AM -0500, Tom Lendacky wrote: diff --git a/include/linux/protected_guest.h b/include/linux/protected_guest.h new file mode 100644 index ..43d4dde94793 --- /dev/null +++ b/include/linux/protected_guest.h @@ -0,

Re: [PATCH v2 02/12] mm: Introduce a function to check for virtualization protection features

2021-08-14 Thread Borislav Petkov
On Fri, Aug 13, 2021 at 11:59:21AM -0500, Tom Lendacky wrote: > In prep for other protected virtualization technologies, introduce a > generic helper function, prot_guest_has(), that can be used to check > for specific protection attributes, like memory encryption. This is > intended to eliminate h

Re: [PATCH] crypto: DRBG - select SHA512

2021-08-14 Thread Borislav Petkov
On Fri, Jul 16, 2021 at 04:14:12PM +0800, Herbert Xu wrote: > Stephan Mueller wrote: > > With the swtich to use HMAC(SHA-512) as the default DRBG type, the > > configuration must now also select SHA-512. > > > > Fixes: 9b7b94683a9b "crypto: DRBG - switch to HMAC SHA512 DRBG as default > > DRBG" >

Re: [PATCH v2 01/12] x86/ioremap: Selectively build arch override encryption functions

2021-08-14 Thread Borislav Petkov
On Fri, Aug 13, 2021 at 11:59:20AM -0500, Tom Lendacky wrote: > In prep for other uses of the prot_guest_has() function besides AMD's > memory encryption support, selectively build the AMD memory encryption > architecture override functions only when CONFIG_AMD_MEM_ENCRYPT=y. These > functions are:

Re: [PATCH] ppc: add "-z notext" flag to disable diagnostic

2021-08-14 Thread Segher Boessenkool
On Fri, Aug 13, 2021 at 01:05:08PM -0700, Fangrui Song wrote: > Text relocations are considered very awful by linker developers. By very few linker developers. > binutils 2.35 added --enable-textrel-check={no,warn,error} > https://sourceware.org/bugzilla/show_bug.cgi?id=20824 Yes, some people wa

Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-14 Thread Michael Ellerman
Christophe Leroy writes: > Le 13/08/2021 à 10:24, Kajol Jain a écrit : >> Incase of random sampling, there can be scenarios where SIAR is not >> latching sample address and results in 0 value. Since current code >> directly returning the siar value, we could see multiple instruction >> pointer val

Re: [PATCH v2 1/2] powerpc/perf: Use stack siar instead of mfspr

2021-08-14 Thread Michael Ellerman
Christophe Leroy writes: > Le 13/08/2021 à 10:29, kajoljain a écrit : >> >> On 8/13/21 1:54 PM, Kajol Jain wrote: >>> Minor optimization in the 'perf_instruction_pointer' function code by >>> making use of stack siar instead of mfspr. >>> >>> Fixes: 75382aa72f06 ("powerpc/perf: Move code to selec

Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-14 Thread Michael Ellerman
Christophe Leroy writes: > Le 13/08/2021 à 10:24, Kajol Jain a écrit : >> Incase of random sampling, there can be scenarios where SIAR is not >> latching sample address and results in 0 value. Since current code >> directly returning the siar value, we could see multiple instruction >> pointer val

Re: [PATCH] ppc: add "-z notext" flag to disable diagnostic

2021-08-14 Thread Michael Ellerman
Bill Wendling writes: > On Fri, Aug 13, 2021 at 7:13 AM Daniel Axtens wrote: >> Bill Wendling writes: ... >> > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile >> > index 6505d66f1193..17a9fbf9b789 100644 >> > --- a/arch/powerpc/Makefile >> > +++ b/arch/powerpc/Makefile >> > @@ -122,6

Re: [PATCH] ppc: add "-z notext" flag to disable diagnostic

2021-08-14 Thread Segher Boessenkool
On Fri, Aug 13, 2021 at 11:59:21AM -0700, Nick Desaulniers wrote: > Or we can dig through why there are relocations in read only sections, > fix those, then enable `-z text` for all linkers. My recommendation > would be get the thing building, then go digging time permitting. It is not always a b

[powerpc:merge] BUILD SUCCESS 01dc10da827c1725c0f5491c78d700a4478aae08

2021-08-14 Thread kernel test robot
config arm allmodconfig i386 randconfig-c001-20210814 i386 randconfig-c001-20210812 i386 randconfig-c001-20210813 powerpc mpc8540_ads_defconfig ia64defconfig arm imx_v6_v7_defc

Re: [PATCH v3 4/8] PCI: replace pci_dev::driver usage that gets the driver name

2021-08-14 Thread Christoph Hellwig
On Thu, Aug 12, 2021 at 10:14:25AM +0200, Uwe Kleine-K??nig wrote: > dev_driver_string() might return "" (via dev_bus_name()). If that happens > *drvstr == '\0' becomes true. > > Would the following be better?: > > const char *drvstr; > > if (pdev) > return ""; > >

Re: [PATCH v1 17/55] KVM: PPC: Book3S HV P9: Implement PMU save/restore in C

2021-08-14 Thread Athira Rajeev
> On 13-Aug-2021, at 9:54 AM, Nicholas Piggin wrote: > > Excerpts from Athira Rajeev's message of August 9, 2021 1:03 pm: >> >> >>> On 26-Jul-2021, at 9:19 AM, Nicholas Piggin wrote: > > >>> +static void freeze_pmu(unsigned long mmcr0, unsigned long mmcra) >>> +{ >>> + if (!(mmcr0 & MMC