Re: [PATCH 01/11] mm: Introduce a function to check for virtualization protection features

2021-07-28 Thread Borislav Petkov
On Wed, Jul 28, 2021 at 02:17:27PM +0100, Christoph Hellwig wrote: > So common checks obviously make sense, but I really hate the stupid > multiplexer. Having one well-documented helper per feature is much > easier to follow. We had that in x86 - it was called cpu_has_ where xxx is the feature bi

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

2021-08-14 Thread Borislav Petkov
ecrypted() > - memremap_is_efi_data() > - memremap_is_setup_data() > - early_memremap_is_setup_data() > > And finally, phys_mem_access_encrypted() is conditionally built as well, > but requires a static inline version of it when CONFIG_AMD_MEM_ENCRYPT is > not set. > > Cc: Thomas Gleixne

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 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 03/12] x86/sev: Add an x86 version of prot_guest_has()

2021-08-15 Thread Borislav Petkov
On Sun, Aug 15, 2021 at 08:53:31AM -0500, Tom Lendacky wrote: > It's not a cross-vendor thing as opposed to a KVM or other hypervisor > thing where the family doesn't have to be reported as AMD or HYGON. What would be the use case? A HV starts a guest which is supposed to be encrypted using the AM

Re: [PATCH v2 04/12] powerpc/pseries/svm: Add a powerpc version of prot_guest_has()

2021-08-17 Thread Borislav Petkov
On Fri, Aug 13, 2021 at 11:59:23AM -0500, Tom Lendacky wrote: > Introduce a powerpc version of the prot_guest_has() function. This will > be used to replace the powerpc mem_encrypt_active() implementation, so > the implementation will initially only support the PATTR_MEM_ENCRYPT > attribute. > > C

Re: [PATCH v2 05/12] x86/sme: Replace occurrences of sme_active() with prot_guest_has()

2021-08-17 Thread Borislav Petkov
On Fri, Aug 13, 2021 at 11:59:24AM -0500, Tom Lendacky wrote: > diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c > index edc67ddf065d..5635ca9a1fbe 100644 > --- a/arch/x86/mm/mem_encrypt.c > +++ b/arch/x86/mm/mem_encrypt.c > @@ -144,7 +144,7 @@ void __init sme_unmap_bootdata(char

Re: [PATCH v2 06/12] x86/sev: Replace occurrences of sev_active() with prot_guest_has()

2021-08-17 Thread Borislav Petkov
On Fri, Aug 13, 2021 at 11:59:25AM -0500, Tom Lendacky wrote: > diff --git a/arch/x86/kernel/machine_kexec_64.c > b/arch/x86/kernel/machine_kexec_64.c > index 8e7b517ad738..66ff788b79c9 100644 > --- a/arch/x86/kernel/machine_kexec_64.c > +++ b/arch/x86/kernel/machine_kexec_64.c > @@ -167,7 +167,7

Re: [PATCH v2 07/12] x86/sev: Replace occurrences of sev_es_active() with prot_guest_has()

2021-08-17 Thread Borislav Petkov
ture support is added for other memory encyrption > techonologies, the use of PATTR_GUEST_PROT_STATE can be updated, as > required, to specifically use PATTR_SEV_ES. > > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Signed-off-by: Tom Lendacky > --- >

Re: [PATCH v2 09/12] mm: Remove the now unused mem_encrypt_active() function

2021-08-17 Thread Borislav Petkov
On Fri, Aug 13, 2021 at 11:59:28AM -0500, Tom Lendacky wrote: > The mem_encrypt_active() function has been replaced by prot_guest_has(), > so remove the implementation. > > Reviewed-by: Joerg Roedel > Signed-off-by: Tom Lendacky > --- > include/linux/mem_encrypt.h | 4 > 1 file changed, 4

Re: [PATCH v2 09/12] mm: Remove the now unused mem_encrypt_active() function

2021-08-17 Thread Borislav Petkov
On Tue, Aug 17, 2021 at 12:22:33PM +0200, Borislav Petkov wrote: > This one wants to be part of the previous patch. ... and the three following patches too - the treewide patch does a single atomic :) replacement and that's it. -- Regards/Gruss, Boris. https://people.kernel.org/tg

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

2021-08-17 Thread Borislav Petkov
On Tue, Aug 17, 2021 at 10:22:52AM -0500, Tom Lendacky wrote: > I can change it to be an AMD/HYGON check... although, I'll have to check > to see if any (very) early use of the function will work with that. We can always change it later if really needed. It is just that I'm not a fan of such "pre

Re: [PATCH v2 05/12] x86/sme: Replace occurrences of sme_active() with prot_guest_has()

2021-08-17 Thread Borislav Petkov
On Tue, Aug 17, 2021 at 09:46:58AM -0500, Tom Lendacky wrote: > I'm ok with letting the TDX folks make changes to these calls to be SME or > SEV specific, if necessary, later. Yap, exactly. Let's add the specific stuff only when really needed. Thx. -- Regards/Gruss, Boris. https://people.k

Re: [PATCH v2 06/12] x86/sev: Replace occurrences of sev_active() with prot_guest_has()

2021-08-17 Thread Borislav Petkov
On Tue, Aug 17, 2021 at 10:26:18AM -0500, Tom Lendacky wrote: > >>/* > >> - * If SME is active we need to be sure that kexec pages are > >> - * not encrypted because when we boot to the new kernel the > >> + * If host memory encryption is active we need to be sure that kexec > >> + * pa

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

2021-08-19 Thread Borislav Petkov
On Thu, Aug 19, 2021 at 10:52:53AM +0100, Christoph Hellwig wrote: > Which suggest that the name is not good to start with. Maybe protected > hardware, system or platform might be a better choice? Yah, coming up with a proper name here hasn't been easy. prot_guest_has() is not the first variant.

Re: [PATCH v3 2/8] mm: Introduce a function to check for confidential computing features

2021-09-10 Thread Borislav Petkov
On Wed, Sep 08, 2021 at 05:58:33PM -0500, Tom Lendacky wrote: > In prep for other confidential computing technologies, introduce a generic preparation > helper function, cc_platform_has(), that can be used to check for specific > active confidential computing attributes, like memory encryption. T

Re: [PATCH v3 3/8] x86/sev: Add an x86 version of cc_platform_has()

2021-09-11 Thread Borislav Petkov
On Wed, Sep 08, 2021 at 05:58:34PM -0500, Tom Lendacky wrote: > diff --git a/arch/x86/kernel/cc_platform.c b/arch/x86/kernel/cc_platform.c > new file mode 100644 > index ..3c9bacd3c3f3 > --- /dev/null > +++ b/arch/x86/kernel/cc_platform.c > @@ -0,0 +1,21 @@ > +// SPDX-License-Identifier

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-14 Thread Borislav Petkov
On Wed, Sep 08, 2021 at 05:58:35PM -0500, Tom Lendacky wrote: > Introduce a powerpc version of the cc_platform_has() function. This will > be used to replace the powerpc mem_encrypt_active() implementation, so > the implementation will initially only support the CC_ATTR_MEM_ENCRYPT > attribute. >

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-14 Thread Borislav Petkov
On Tue, Sep 14, 2021 at 04:47:41PM +0200, Christophe Leroy wrote: > Yes, see > https://lore.kernel.org/linuxppc-dev/20210914123919.58203...@canb.auug.org.au/T/#t Aha, more compiler magic stuff ;-\ Oh well, I guess that fix will land upstream soon. Thx. -- Regards/Gruss, Boris. https://pe

Re: [PATCH v3 5/8] x86/sme: Replace occurrences of sme_active() with cc_platform_has()

2021-09-14 Thread Borislav Petkov
On Wed, Sep 08, 2021 at 05:58:36PM -0500, Tom Lendacky wrote: > diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c > index 18fe19916bc3..4b54a2377821 100644 > --- a/arch/x86/mm/mem_encrypt.c > +++ b/arch/x86/mm/mem_encrypt.c > @@ -144,7 +144,7 @@ void __init sme_unmap_bootdata(char

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-15 Thread Borislav Petkov
On Wed, Sep 15, 2021 at 10:28:59AM +1000, Michael Ellerman wrote: > I don't love it, a new C file and an out-of-line call to then call back > to a static inline that for most configuration will return false ... but > whatever :) Yeah, hch thinks it'll cause a big mess otherwise: https://lore.kern

Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function

2021-09-15 Thread Borislav Petkov
On Wed, Sep 08, 2021 at 05:58:31PM -0500, Tom Lendacky wrote: > This patch series provides a generic helper function, cc_platform_has(), > to replace the sme_active(), sev_active(), sev_es_active() and > mem_encrypt_active() functions. > > It is expected that as new confidential computing technolo

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-15 Thread Borislav Petkov
On Wed, Sep 15, 2021 at 07:18:34PM +0200, Christophe Leroy wrote: > Could you please provide more explicit explanation why inlining such an > helper is considered as bad practice and messy ? Tom already told you to look at the previous threads. Let's read them together. This one, for example: htt

Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function

2021-09-16 Thread Borislav Petkov
On Wed, Sep 15, 2021 at 10:26:06AM -0700, Kuppuswamy, Sathyanarayanan wrote: > I have a Intel variant patch (please check following patch). But it includes > TDX changes as well. Shall I move TDX changes to different patch and just > create a separate patch for adding intel_cc_platform_has()? Yes,

Re: BUG: unable to handle kernel paging request in drm_fb_helper_damage_work

2021-09-20 Thread Borislav Petkov
On Mon, Sep 20, 2021 at 08:55:28PM +0800, Hao Sun wrote: > Hello, > > When using Healer to fuzz the latest Linux kernel, the following crash Your Healer thing - or whatever that next automated thing is which is trying to be smart - is not CCing the proper people: $ ./scripts/get_maintainer.pl -f

Re: [PATCH v3 5/8] x86/sme: Replace occurrences of sme_active() with cc_platform_has()

2021-09-21 Thread Borislav Petkov
On Tue, Sep 21, 2021 at 12:04:58PM -0500, Tom Lendacky wrote: > Looks like instrumentation during early boot. I worked with Boris offline to > exclude arch/x86/kernel/cc_platform.c from some of the instrumentation and > that allowed an allyesconfig to boot. And here's the lineup I have so far, I'd

Re: [PATCH v3 5/8] x86/sme: Replace occurrences of sme_active() with cc_platform_has()

2021-09-21 Thread Borislav Petkov
On Wed, Sep 22, 2021 at 12:20:59AM +0300, Kirill A. Shutemov wrote: > I still believe calling cc_platform_has() from __startup_64() is totally > broken as it lacks proper wrapping while accessing global variables. Well, one of the issues on the AMD side was using boot_cpu_data too early and the In

Re: [PATCH v3 5/8] x86/sme: Replace occurrences of sme_active() with cc_platform_has()

2021-09-22 Thread Borislav Petkov
On Wed, Sep 22, 2021 at 05:30:15PM +0300, Kirill A. Shutemov wrote: > Not fine, but waiting to blowup with random build environment change. Why is it not fine? Are you suspecting that the compiler might generate something else and not a rip-relative access? -- Regards/Gruss, Boris. https:/

Re: [PATCH v3 5/8] x86/sme: Replace occurrences of sme_active() with cc_platform_has()

2021-09-23 Thread Borislav Petkov
On Thu, Sep 23, 2021 at 12:05:58AM +0300, Kirill A. Shutemov wrote: > Unless we find other way to guarantee RIP-relative access, we must use > fixup_pointer() to access any global variables. Yah, I've asked compiler folks about any guarantees we have wrt rip-relative addresses but it doesn't look

Re: [PATCH v3 5/8] x86/sme: Replace occurrences of sme_active() with cc_platform_has()

2021-09-24 Thread Borislav Petkov
On Fri, Sep 24, 2021 at 12:41:32PM +0300, Kirill A. Shutemov wrote: > On Thu, Sep 23, 2021 at 08:21:03PM +0200, Borislav Petkov wrote: > > On Thu, Sep 23, 2021 at 12:05:58AM +0300, Kirill A. Shutemov wrote: > > > Unless we find other way to guarantee RIP-relative a

[PATCH 2/8] arch/cc: Introduce a function to check for confidential computing features

2021-09-28 Thread Borislav Petkov
: Tom Lendacky Signed-off-by: Borislav Petkov --- arch/Kconfig| 3 ++ include/linux/cc_platform.h | 88 + 2 files changed, 91 insertions(+) create mode 100644 include/linux/cc_platform.h diff --git a/arch/Kconfig b/arch/Kconfig index

[PATCH v4 0/8] Implement generic cc_platform_has() helper function

2021-09-28 Thread Borislav Petkov
From: Borislav Petkov Hi all, here's v4 of the cc_platform_has() patchset with feedback incorporated. I'm going to route this through tip if there are no objections. Thx. Tom Lendacky (8): x86/ioremap: Selectively build arch override encryption functions arch/cc: Introduce a f

[PATCH 1/8] x86/ioremap: Selectively build arch override encryption functions

2021-09-28 Thread Borislav Petkov
nally, phys_mem_access_encrypted() is conditionally built as well, but requires a static inline version of it when CONFIG_AMD_MEM_ENCRYPT is not set. Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov --- arch/x86/include/asm/io.h | 8 arch/x86/mm/ioremap.c | 2 +- 2

[PATCH 3/8] x86/sev: Add an x86 version of cc_platform_has()

2021-09-28 Thread Borislav Petkov
From: Tom Lendacky Introduce an x86 version of the cc_platform_has() function. This will be used to replace vendor specific calls like sme_active(), sev_active(), etc. Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov --- arch/x86/Kconfig | 1 + arch/x86/include

[PATCH 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-28 Thread Borislav Petkov
: Borislav Petkov Acked-by: Michael Ellerman --- arch/powerpc/platforms/pseries/Kconfig | 1 + arch/powerpc/platforms/pseries/Makefile | 2 ++ arch/powerpc/platforms/pseries/cc_platform.c | 26 3 files changed, 29 insertions(+) create mode 100644 arch/powerpc/platforms

[PATCH 8/8] treewide: Replace the use of mem_encrypt_active() with cc_platform_has()

2021-09-28 Thread Borislav Petkov
implementation of mem_encrypt_active(), cc_platform_has() does not need to be implemented in s390 (the config option ARCH_HAS_CC_PLATFORM is not set). Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov --- arch/powerpc/include/asm/mem_encrypt.h | 5 - arch/powerpc/platforms/pseries/svm.c| 5

[PATCH 5/8] x86/sme: Replace occurrences of sme_active() with cc_platform_has()

2021-09-28 Thread Borislav Petkov
sev_active() that are really geared towards detecting if SME is active. Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov --- arch/x86/include/asm/kexec.h | 2 +- arch/x86/include/asm/mem_encrypt.h | 2 -- arch/x86/kernel/machine_kexec_64.c | 15 --- arch/x86/kernel

[PATCH 6/8] x86/sev: Replace occurrences of sev_active() with cc_platform_has()

2021-09-28 Thread Borislav Petkov
-by: Borislav Petkov --- arch/x86/include/asm/mem_encrypt.h | 2 -- arch/x86/kernel/crash_dump_64.c| 4 +++- arch/x86/kernel/kvm.c | 3 ++- arch/x86/kernel/kvmclock.c | 4 ++-- arch/x86/kernel/machine_kexec_64.c | 4 ++-- arch/x86/kvm/svm/svm.c | 3

[PATCH 7/8] x86/sev: Replace occurrences of sev_es_active() with cc_platform_has()

2021-09-28 Thread Borislav Petkov
Signed-off-by: Borislav Petkov --- arch/x86/include/asm/mem_encrypt.h | 2 -- arch/x86/kernel/sev.c | 6 +++--- arch/x86/mm/mem_encrypt.c | 24 +++- arch/x86/realmode/init.c | 3 +-- 4 files changed, 7 insertions(+), 28 deletions(-) diff --git

Re: [PATCH v4 0/8] Implement generic cc_platform_has() helper function

2021-09-28 Thread Borislav Petkov
On Tue, Sep 28, 2021 at 12:19:49PM -0700, Kuppuswamy, Sathyanarayanan wrote: > Intel CC support patch is not included in this series. You want me > to address the issue raised by Joerg before merging it? Did you not see my email to you today: https://lkml.kernel.org/r/yvl4zughfsh1q...@zn.tnic ?

Re: [PATCH v4 0/8] Implement generic cc_platform_has() helper function

2021-09-28 Thread Borislav Petkov
On Tue, Sep 28, 2021 at 01:48:46PM -0700, Kuppuswamy, Sathyanarayanan wrote: > Just read it. If you want to use cpuid_has_tdx_guest() directly in > cc_platform_has(), then you want to rename intel_cc_platform_has() to > tdx_cc_platform_has()? Why? You simply do: if (cpuid_has_tdx_guest()

Re: [PATCH v4 0/8] Implement generic cc_platform_has() helper function

2021-09-28 Thread Borislav Petkov
On Tue, Sep 28, 2021 at 02:01:57PM -0700, Kuppuswamy, Sathyanarayanan wrote: > Yes. But, since the check is related to TDX, I just want to confirm whether > you are fine with naming the function as intel_*(). Why is this such a big of a deal?! There's amd_cc_platform_has() and intel_cc_platform_h

5.11-rc1 TTM list corruption

2020-12-31 Thread Borislav Petkov
Hi folks, got this when trying to suspend my workstation to disk, it was still responsive so I could catch the splat: [22020.334381] [ cut here ] [22020.339057] list_del corruption. next->prev should be 8b7a9a40, but was 8881020bced0 [22020.347764] WARNING: CP

Re: 5.11-rc1 TTM list corruption

2021-01-04 Thread Borislav Petkov
On Fri, Jan 01, 2021 at 03:34:28PM +0100, Christian König wrote: > Going to double check the code, but can you reproduce this issue > reliable? Lemme find a test box which can trigger it too - the splat happened on my workstation and I'd like to avoid debugging there for obvious reasons. Thx. --

Re: 5.11-rc1 TTM list corruption

2021-01-05 Thread Borislav Petkov
Hi, On Tue, Jan 05, 2021 at 12:12:13PM +0800, Huang Rui wrote: > I am reproducing this issue as well, are you using a Raven board? I have no clue what Raven is. The workstation I triggered it once on, has: [7.563968] [drm] radeon kernel modesetting enabled. [7.581417] [drm] initializing

Re: 5.11-rc1 TTM list corruption

2021-01-05 Thread Borislav Petkov
On Tue, Jan 05, 2021 at 07:08:52PM +0800, Huang Rui wrote: > Ah, this asic is a bit old and still use radeon driver. So we didn't > reproduce it on amdgpu driver. I don't have such the old asic in my hand. > May we know whether this issue can be duplicated after SI which is used > amdgpu module (no

Re: [PATCH 1/2] drm/radeon: stop re-init the TTM page pool

2021-01-09 Thread Borislav Petkov
> DRM_ERROR("Failed initializing VRAM heap.\n"); > -- Was finally able to test those during workstation hw maintenance so I was able to install a new kernel and reboot. Reported-by: Borislav Petkov Tested-by: Borislav Petkov Th

Re: [PATCH v2 56/79] docs: Documentation/*.txt: rename all ReST files to *.rst

2019-04-24 Thread Borislav Petkov
On Tue, Apr 23, 2019 at 07:11:58PM +0200, Peter Zijlstra wrote: > I know I'm an odd duck; but no. They're _less_ accessible for me, as > both a reader and author. They look 'funny' when read as a text file > (the only way it makes sense to read them; I spend 99% of my time on a > computer looking a

Re: [PATCH v2 56/79] docs: Documentation/*.txt: rename all ReST files to *.rst

2019-04-24 Thread Borislav Petkov
On Tue, Apr 23, 2019 at 05:05:02PM -0300, Mauro Carvalho Chehab wrote: > That's my view about how that specific file would be after > converted to ReST: > > > https://git.linuxtv.org/mchehab/experimental.git/tree/Documentation/x86/x86_64/mm.rst?h=convert_rst_renames > > I don't have any tr

Re: [PATCH v2 56/79] docs: Documentation/*.txt: rename all ReST files to *.rst

2019-04-25 Thread Borislav Petkov
On Wed, Apr 24, 2019 at 07:40:07AM -0300, Mauro Carvalho Chehab wrote: > Personally, I don't care much with monospaced fonts on this table. After > all, if I want to see it monospaced, I can simply click at the > "View page source" at the browser, and it will display the file as a > plain old monos

Re: [PATCH v2 56/79] docs: Documentation/*.txt: rename all ReST files to *.rst

2019-04-25 Thread Borislav Petkov
On Tue, Apr 23, 2019 at 04:06:40PM -0600, Jonathan Corbet wrote: > Remember that most of our docs are 99% RST even though they were written > by people who had never even heard of RST. I really don't think it's a > big deal - a far smaller cognitive load than trying to keep up with any > given sub

radeon 0000:1d:00.0: GPU lockup (current fence id 0x00000000017a66bf last fence id 0x00000000017a67a1 on ring 0)

2019-01-12 Thread Borislav Petkov
Hi guys, my odyssey with the GPU continues. This time it didn't reset itself but started spewing a single line about the hardware locking up. The machine was responsive to sysrq so I was able to write out /var/log/messages and reboot. This is still with 4.20-rc7 but I'm building 5.0-rc1 to see i

Re: radeon 0000:1d:00.0: GPU lockup (current fence id 0x00000000017a66bf last fence id 0x00000000017a67a1 on ring 0)

2019-01-15 Thread Borislav Petkov
On Sat, Jan 12, 2019 at 09:50:51PM +0100, Borislav Petkov wrote: > Hi guys, > > my odyssey with the GPU continues. This time it didn't reset itself > but started spewing a single line about the hardware locking up. > > The machine was responsive to sysrq so I was able

[PATCH 04/11] drm/r128: Fix undefined behavior due to shift overflowing the constant

2022-04-05 Thread Borislav Petkov
From: Borislav Petkov Fix: drivers/gpu/drm/r128/r128_cce.c: In function ‘r128_do_init_cce’: drivers/gpu/drm/r128/r128_cce.c:417:2: error: case label does not reduce to an integer constant case R128_PM4_64BM_64VCBM_64INDBM: ^~~~ drivers/gpu/drm/r128/r128_cce.c:418:2: error: case

[PATCH 11/11] drm/i915: Fix undefined behavior due to shift overflowing the constant

2022-04-05 Thread Borislav Petkov
From: Borislav Petkov Fix: In file included from :0:0: drivers/gpu/drm/i915/gt/uc/intel_guc.c: In function ‘intel_guc_send_mmio’: ././include/linux/compiler_types.h:352:38: error: call to ‘__compiletime_assert_1047’ \ declared with attribute error: FIELD_PREP: mask is not constant

Re: [PATCH v2 2/4] x86/vmware: Add a header file for hypercall definitions

2019-08-27 Thread Borislav Petkov
On Fri, Aug 23, 2019 at 10:13:14AM +0200, Thomas Hellström (VMware) wrote: > From: Thomas Hellstrom > > The new header is intended to be used by drivers using the backdoor. > Follow the kvm example using alternatives self-patching to > choose between vmcall, vmmcall and io instructions. > > Also

Re: [PATCH v2 2/4] x86/vmware: Add a header file for hypercall definitions

2019-08-27 Thread Borislav Petkov
On Fri, Aug 23, 2019 at 10:13:14AM +0200, Thomas Hellström (VMware) wrote: > +/* > + * The high bandwidth out call. The low word of edx is presumed to have the > + * HB and OUT bits set. > + */ > +#define VMWARE_HYPERCALL_HB_OUT > \ > + ALTERNATIVE_

Re: [PATCH v2 2/4] x86/vmware: Add a header file for hypercall definitions

2019-08-27 Thread Borislav Petkov
On Tue, Aug 27, 2019 at 09:19:03PM +0200, Thomas Hellström (VMware) wrote: > It should be correct. The flags VMWARE_HYPERVISOR_HB and > VMWARE_HYPERVISOR_OUT are only valid for the vmcall / vmmcall versions. > > For the legacy version, the direction is toggled by the instruction (in vs > out) and

1c74ca7a1a9a ("drm/fb-helper: call vga_remove_vgacon automatically.")

2019-08-08 Thread Borislav Petkov
Hi, for some unfathomable to me reason, the commit in $Subject breaks booting of the 32-bit partition of one of my test boxes. The box doesn't finish booting (normally it boots in text mode, there is no X server setup on it) but it is still responsible in the sense that I can reboot it with the Sy

Re: 1c74ca7a1a9a ("drm/fb-helper: call vga_remove_vgacon automatically.")

2019-08-09 Thread Borislav Petkov
On Fri, Aug 09, 2019 at 10:54:41AM +0200, Gerd Hoffmann wrote: > A bit later: > >[8.198138] radeon :00:01.0: Direct firmware load for > radeon/PALM_pfp.bin failed with error -2 >[8.198351] r600_cp: Failed to load firmware "radeon/PALM_pfp.bin" >[8.198512] [drm:evergree

Re: [syzbot] BUG: unable to handle kernel paging request in drm_fb_helper_damage_work (2)

2021-05-31 Thread Borislav Petkov
Looks DRM to me. CCed... On Mon, May 31, 2021 at 12:13:22AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:7ac3a1c1 Merge tag 'mtd/fixes-for-5.13-rc4' of git://git.k.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt

Re: [PATCH v2 0/2] allow simple{fb,drm} drivers to be used on non-x86 EFI platforms

2021-06-03 Thread Borislav Petkov
o Acked-by: Borislav Petkov Btw, for the future, please CC everyone on the whole patchset - I had to go look at your 2/2 on lore to see what it does because I had only 1/2 in my mbox. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

call to __compiletime_assert_1441 declared with attribute error: FIELD_PREP: mask is not constant

2022-11-18 Thread Borislav Petkov
Hi, I'm getting this on latest Linus master with gcc (SUSE Linux) 7.5.0: DESCEND objtool CALLscripts/checksyscalls.sh CC [M] drivers/gpu/drm/i915/gt/uc/intel_guc_submission.o In file included from :0:0: In function ‘__guc_context_policy_add_priority.isra.45’, inlined from ‘__guc_co

2b5d1c29f6c4 ("drm/nouveau/disp: PIOR DP uses GPIO for HPD, not PMGR AUX interrupts")

2023-08-06 Thread Borislav Petkov
Hi folks, the patch in $Subject breaks booting here on one of my test boxes, see below. Reverting it ontop of -rc4 fixes the issue. Thx. [3.580535] ACPI: \_PR_.CP04: Found 4 idle states [3.585694] ACPI: \_PR_.CP05: Found 4 idle states [3.590852] ACPI: \_PR_.CP06: Found 4 idle states

Re: [RESUBMIT][PATCH] x86/mm: Fix PAT bit missing from page protection modify mask

2023-05-31 Thread Borislav Petkov
On Fri, May 19, 2023 at 08:36:34PM +0200, Janusz Krzysztofik wrote: > diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h > index 15ae4d6ba4768..56466afd04307 100644 > --- a/arch/x86/include/asm/pgtable.h > +++ b/arch/x86/include/asm/pgtable.h > @@ -654,8 +654,10 @@ static

Re: [RESUBMIT][PATCH] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-02 Thread Borislav Petkov
On Thu, Jun 01, 2023 at 10:47:39AM +0200, Juergen Gross wrote: > As described in the commit message, this only works on bare metal due to the > PAT bit not being needed for WC mappings. > > Making this patch Xen specific would try to cure the symptoms without fixing > the underlying problem: _PAGE_

WARNING: CPU: 5 PID: 1464 at drivers/gpu/drm/ttm/ttm_bo.c:326 ttm_bo_release+0x27e/0x2d0 [ttm]

2023-06-03 Thread Borislav Petkov
Hi, this below triggers with the latest Linus tree: 51f269a6ecc7 ("Merge tag 'probes-fixes-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace") ... [ 16.173593] [drm] radeon kernel modesetting enabled. [ 16.173743] radeon :29:00.0: vgaarb: deactivate vga console

Re: [PATCH] drm/radeon: Disable outputs when releasing fbdev client

2023-06-09 Thread Borislav Petkov
nd the modesetting > code when the framebuffer got displayed. It only got unpinned once by > the fbdev helper radeon_fbdev_destroy_pinned_object(). Hence TTM's BO- > release function complains about the pin counter. Forcing the outputs > off also undoes the modesettings pin incre

Re: 2b5d1c29f6c4 ("drm/nouveau/disp: PIOR DP uses GPIO for HPD, not PMGR AUX interrupts")

2023-08-07 Thread Borislav Petkov
On Mon, Aug 07, 2023 at 01:49:42PM +0200, Karol Herbst wrote: > in what way does it stop? Just not progressing? That would be kinda > concerning. Mind tracing with what arguments `nvkm_uevent_add` is > called with and without that patch? Well, me dumping those args I guess made the box not freeze

Re: 2b5d1c29f6c4 ("drm/nouveau/disp: PIOR DP uses GPIO for HPD, not PMGR AUX interrupts")

2023-08-08 Thread Borislav Petkov
On Tue, Aug 08, 2023 at 12:39:32PM +0200, Karol Herbst wrote: > ahh, that would have been good to know :) Yeah, I didn't see it before - it would only freeze. Only after I added the printk you requested. > Mind figuring out what's exactly NULL inside nvif_object_mthd? Or > rather what line `nvif_

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Borislav Petkov
On Mon, Aug 14, 2023 at 04:49:32PM +0200, Karol Herbst wrote: > We can't simply free the connector after calling drm_connector_init on it. > We need to clean up the drm side first. > > It might not fix all regressions from 2b5d1c29f6c4 ("drm/nouveau/disp: > PIOR DP uses GPIO for HPD, not PMGR AUX

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Borislav Petkov
On Wed, Aug 16, 2023 at 11:51:50AM +0200, Karol Herbst wrote: > Mind sharing your kernel logs with that patch applied? I suspect your > system boots up but you might just not have the connector available or > something? It could be that you have one of those GPUs affected by the > original change a

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Borislav Petkov
On Wed, Aug 16, 2023 at 12:03:44PM +0200, Borislav Petkov wrote: > On Wed, Aug 16, 2023 at 11:51:50AM +0200, Karol Herbst wrote: > > Mind sharing your kernel logs with that patch applied? I suspect your > > system boots up but you might just not have the connector available or &g

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Borislav Petkov
On Wed, Aug 16, 2023 at 12:11:57PM +0200, Borislav Petkov wrote: > Does that help? Btw, note that this is *plain* -rc5, without your patch. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Borislav Petkov
On Wed, Aug 16, 2023 at 11:51:50AM +0200, Karol Herbst wrote: > Mind sharing your kernel logs with that patch applied? I suspect your > system boots up but you might just not have the connector available or > something? It could be that you have one of those GPUs affected by the > original change a

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Borislav Petkov
On Wed, Aug 16, 2023 at 04:57:28PM +0200, Karol Herbst wrote: > Do you have any connectors listed in "/sys/class/drm"? tree /sys/class/drm/ /sys/class/drm/ ├── card0 -> ../../devices/pci:00/:00:02.0/:03:00.0/drm/card0 ├── renderD128 -> ../../devices/pci:00/:00:02.0/:03:00.

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Borislav Petkov
On Wed, Aug 16, 2023 at 11:27:05PM +0200, Karol Herbst wrote: > that GPU has only a `DMS-59` connector, is that right? No clue. How do I figure that out? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-17 Thread Borislav Petkov
On Thu, Aug 17, 2023 at 01:18:12AM +0200, Karol Herbst wrote: > do you have one of these? https://en.wikipedia.org/wiki/DMS-59 Ah, DMS == Dual Monitor Solution :-) Yap, that's exactly what the GPU has. And the Y-cable is 2xDVI. It is a Dell workstation and it came this way, meaning I haven't done

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-17 Thread Borislav Petkov
On Thu, Aug 17, 2023 at 12:00:47PM +0200, Karol Herbst wrote: > btw, what would help is to know where `nvkm_uconn_uevent` actually > fails, or rather, are you running into this "/* TODO: support DP IRQ > on ANX9805 and remove this hack. */" condition? Send me a diff, I'll run it here and catch out

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-17 Thread Borislav Petkov
On Thu, Aug 17, 2023 at 12:24:45PM +0200, Karol Herbst wrote: > simply throw a > > printk(KERN_WARNING "nvkm_uconn_uevent %u\n", outp->info.location); > > inside drivers/gpu/drm/nouveau/nvkm/engine/disp/uconn.c:104 after that > mentioned comment. diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/

4.10-rc5+ WARNING: CPU: 3 PID: 1 at ./include/drm/drm_crtc.h:857 drm_kms_helper_poll_enable.part.4+0xa8/0xc0

2017-01-25 Thread Borislav Petkov
Hi all, I see this brand new warning when booting here. Top commit is v4.10-rc5-107-g883af14e67e8 from Linus' master. [2.209255] [drm] Initialized [2.210636] [drm] Memory usable by graphics device = 2048M [2.210732] [drm] Replacing VGA console driver [2.211517] Console: switching

Re: 4.10-rc5+ WARNING: CPU: 3 PID: 1 at ./include/drm/drm_crtc.h:857 drm_kms_helper_poll_enable.part.4+0xa8/0xc0

2017-01-26 Thread Borislav Petkov
On Thu, Jan 26, 2017 at 03:51:25PM +0200, Jani Nikula wrote: > On Thu, 26 Jan 2017, Borislav Petkov wrote: > > Hi all, > > > > I see this brand new warning when booting here. > > > > Top commit is v4.10-rc5-107-g883af14e67e8 from Linus' master. > > Ple

Re: 4.10-rc5+ WARNING: CPU: 3 PID: 1 at ./include/drm/drm_crtc.h:857 drm_kms_helper_poll_enable.part.4+0xa8/0xc0

2017-01-26 Thread Borislav Petkov
On Thu, Jan 26, 2017 at 05:26:00PM +0200, Jani Nikula wrote: > IIUC the alt fix should be for nouveau, and just the revert should be > enough for i915. I see. /me goes and reverts 3846fd9b86001bea171943cc3bb9222cb6da6b42, builds, boots... Yap, looks good, thanks. :-) -- Regards/Gruss, Bor

radeon_connector_unregister NULL ptr deref

2016-10-24 Thread Borislav Petkov
Hi guys, I'm getting a NULL ptr deref splat when hibernating my box with 4.9-rc1+. All I got so far is an ugly camera shot from the splat which I'm typing in by hand. Any ideas or already a fix? The callstack looks like this: unable to handle kernel NULL pointer dereference at 00...0890 (I thin

radeon_connector_unregister NULL ptr deref

2016-10-24 Thread Borislav Petkov
On Mon, Oct 24, 2016 at 04:46:30PM +0900, Michel Dänzer wrote: > Should be fixed in -rc2, specifically these commits: > > https://cgit.freedesktop.org/~airlied/linux/commit/?h=drm-next&id=b0c80bd5d2e317f7596fe2badc1a3379fb3211e5 > https://cgit.freedesktop.org/~airlied/linux/commit/?h=drm-next&id=

radeon_connector_unregister NULL ptr deref

2016-10-24 Thread Borislav Petkov
On Mon, Oct 24, 2016 at 02:55:26PM +, Deucher, Alexander wrote: > It was working in drm-next. It appears something regressed in the > meantime. See kernel bug 178421. Thanks Alex, I've added myself to CC. Ping me if you need me to test patches or need more debugging info. -- Regards/Gruss,

[PATCH] x86/pat, mm: Make track_pfn_insert() return void

2016-10-26 Thread Borislav Petkov
) thing: --- >From 6feb0b253e1fcccbcbc8ab3e8838db09e39b0466 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Wed, 26 Oct 2016 19:43:43 +0200 Subject: [PATCH] x86/pat, mm: Make track_pfn_insert() return void It only returns 0 so we can save us the testing of its retval everywhere. Signed-off-by: Borislav Petkov

Re: [PATCH 5/8] edac: ghes: use krealloc_array()

2020-10-27 Thread Borislav Petkov
GFP_KERNEL); > + new = krealloc_array(hw->dimms, hw->num_dimms + 16, > + sizeof(struct dimm_info), GFP_KERNEL); > if (!new) { > WARN_ON_ONCE(1); >

2dd4d163cd9c ("drm/nouveau: remove open-coded version of remove_conflicting_pci_framebuffers()")

2020-06-18 Thread Borislav Petkov
Hi, my test box won't boot 5.8-rc1 all the way but stops at ... fb0: switching to nouveaufb from EFI VGA <-- EOF I've bisected it to the commit in $Subject, see below. Unfortunately, it doesn't revert cleanly so I can't really do the final test of reverting it ontop of 5.8-rc1 to confirm that th

Re: [Nouveau] 2dd4d163cd9c ("drm/nouveau: remove open-coded version of remove_conflicting_pci_framebuffers()")

2020-06-18 Thread Borislav Petkov
Hi, On Thu, Jun 18, 2020 at 04:19:02PM -0400, Ilia Mirkin wrote: > Hi Boris, > > There was a fixup to that patch that you'll also have to revert first > -- 7dbbdd37f2ae7dd4175ba3f86f4335c463b18403. I guess there's some > subtle difference between the old open-coded logic and the helper, > they we

Re: [Nouveau] 2dd4d163cd9c ("drm/nouveau: remove open-coded version of remove_conflicting_pci_framebuffers()")

2020-06-19 Thread Borislav Petkov
On Thu, Jun 18, 2020 at 10:39:07PM +0200, Borislav Petkov wrote: > I'll redo the bisection tomorrow, on a fresh head, to check. Ok, just did it again, similar bisection log, points at the same commit. The commit before it: fb172f5fe880 ("drm/nouveau/gr/gk20a: move MODULE_FIRM

first bad commit: [fc8c70526bd30733ea8667adb8b8ffebea30a8ed] drm/radeon: Prefer lower feedback dividers

2020-09-12 Thread Borislav Petkov
Hi, this patch breaks X on my box - it is fully responsive and I can log in into it from another machine but both monitors are black and show this: "The current input timing is not supported by the monitor display. Please change your input timing to 1920x1200@60Hz or any other monitor listed ti

Re: [RFC PATCH 00/17] Drop uses of pci_read_config_*() return value

2020-08-01 Thread Borislav Petkov
On Sat, Aug 01, 2020 at 01:24:29PM +0200, Saheed O. Bolarinwa wrote: > The return value of pci_read_config_*() may not indicate a device error. > However, the value read by these functions is more likely to indicate > this kind of error. This presents two overlapping ways of reporting > errors and

Re: [RFC PATCH 00/17] Drop uses of pci_read_config_*() return value

2020-08-02 Thread Borislav Petkov
On Sun, Aug 02, 2020 at 07:28:00PM +0200, Saheed Bolarinwa wrote: > Because the value ~0 has a meaning to some drivers and only No, ~0 means that the PCI read failed. For *every* PCI device I know. Here's me reading from 0xf0 offset of my hostbridge: # setpci -s 00:00.0 0xf0.l 0100 That dev

Re: [RFC PATCH 00/17] Drop uses of pci_read_config_*() return value

2020-08-02 Thread Borislav Petkov
On Sun, Aug 02, 2020 at 02:14:06PM -0500, Bjorn Helgaas wrote: > Wait, I'm not convinced yet. I know that if a PCI read fails, you > normally get ~0 data because the host bridge fabricates it to complete > the CPU load. > > But what guarantees that a PCI config register cannot contain ~0? Well,

274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-06 Thread Borislav Petkov
Hi, commit in $Subject breaks suspend to disk on my box here. Reverting it ontop of 4.7-rc2 fixes the problem. DRM-specific messages in dmesg are: [6.837698] [drm] radeon kernel modesetting enabled. [6.871372] [drm] initializing kernel modesetting (RV635 0x1002:0x9598 0x1043:0x01DA 0x00)

274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-07 Thread Borislav Petkov
On Mon, Jun 06, 2016 at 05:40:19PM -0400, Jerome Glisse wrote: > Brokens how ? Symptoms ? Whoops, sorry, I meant to elaborate... After doing: echo "shutdown" > /sys/power/disk echo "disk" > /sys/power/state screen goes blank but machine remains powered on and doesn't go off. No

274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Borislav Petkov
ct the other. > > Signed-off-by: Jérôme Glisse Reported-and-tested-by: Borislav Petkov -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.

274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Borislav Petkov
On Wed, Jun 08, 2016 at 01:50:28PM +0200, Christian König wrote: > What's the output of mplayer? Mplayer usually uses video acceleration when > it is available. Something like this? libavformat version 56.23.105 (internal) libavformat file format detected. [lavf] stream 0: video (h264), -vid 0 [

274ad65c9d02 ("drm/radeon: hard reset r600 and newer GPU when hibernating.")

2016-06-08 Thread Borislav Petkov
On Wed, Jun 08, 2016 at 03:30:34PM +0200, Christian König wrote: > Try forcing mplayer to use VDPAU with "mplayer -vo vdpau $file". All good. Actually, this hw accel thing is much better, I better make it default :-P libavformat version 56.23.105 (internal) libavformat file format detected. [la

  1   2   3   4   >