lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <63f5f6b39d22d9833a4c1503a34840eb08050f75.camel@mengyan1223.wang>
Date:   Tue, 30 Mar 2021 21:09:12 +0800
From:   Xi Ruoyao <xry111@...gyan1223.wang>
To:     Christian König <christian.koenig@....com>,
        Christian König 
        <ckoenig.leichtzumerken@...il.com>,
        Alex Deucher <alexander.deucher@....com>
Cc:     David Airlie <airlied@...ux.ie>,
        Felix Kuehling <Felix.Kuehling@....com>,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        Dan Horák <dan@...ny.cz>,
        amd-gfx@...ts.freedesktop.org, Daniel Vetter <daniel@...ll.ch>,
        stable@...r.kernel.org
Subject: Re: [PATCH] drm/amdgpu: fix an underflow on non-4KB-page systems

On 2021-03-30 21:02 +0800, Xi Ruoyao wrote:
> On 2021-03-30 14:55 +0200, Christian König wrote:
> > 
> > I rather see this as a kernel bug. Can you test if this code fragment 
> > fixes your issue:
> > 
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c 
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > index 64beb3399604..e1260b517e1b 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > @@ -780,7 +780,7 @@ int amdgpu_info_ioctl(struct drm_device *dev, void 
> > *data, struct drm_file *filp)
> >                  }
> >                  dev_info->virtual_address_alignment = 
> > max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
> >                  dev_info->pte_fragment_size = (1 << 
> > adev->vm_manager.fragment_size) * AMDGPU_GPU_PAGE_SIZE;
> > -               dev_info->gart_page_size = AMDGPU_GPU_PAGE_SIZE;
> > +               dev_info->gart_page_size = 
> > dev_info->virtual_address_alignment;
> >                  dev_info->cu_active_number = adev->gfx.cu_info.number;
> >                  dev_info->cu_ao_mask = adev->gfx.cu_info.ao_cu_mask;
> >                  dev_info->ce_ram_size = adev->gfx.ce_ram_size;
> 
> It works.  I've seen it at
> https://github.com/xen0n/linux/commit/84ada72983838bd7ce54bc32f5d34ac5b5aae191
> before (with a common sub-expression, though :).

Some comment: on an old version of Fedora ported by Loongson, Xorg just hangs
without this commit.  But on the system I built from source, I didn't see any
issue before Linux 5.11.  So I misbelieved that it was something already fixed.

Dan: you can try it on your PPC 64 with non-4K page as well.
-- 
Xi Ruoyao <xry111@...gyan1223.wang>
School of Aerospace Science and Technology, Xidian University

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ