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: <Ye+x0UwhhHWkgsr2@kroah.com>
Date:   Tue, 25 Jan 2022 09:16:17 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Christian König <christian.koenig@....com>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Felix Kuehling <Felix.Kuehling@....com>,
        David Yat Sin <david.yatsin@....com>,
        Rajneesh Bhardwaj <rajneesh.bhardwaj@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.16 0702/1039] drm/amdgpu: Dont inherit GEM object VMAs
 in child process

On Tue, Jan 25, 2022 at 08:26:20AM +0100, Christian König wrote:
> Hi Greg,
> 
> Am 24.01.22 um 19:41 schrieb Greg Kroah-Hartman:
> > From: Rajneesh Bhardwaj <rajneesh.bhardwaj@....com>
> > 
> > [ Upstream commit fbcdbfde87509d523132b59f661a355c731139d0 ]
> > 
> > When an application having open file access to a node forks, its shared
> > mappings also get reflected in the address space of child process even
> > though it cannot access them with the object permissions applied. With the
> > existing permission checks on the gem objects, it might be reasonable to
> > also create the VMAs with VM_DONTCOPY flag so a user space application
> > doesn't need to explicitly call the madvise(addr, len, MADV_DONTFORK)
> > system call to prevent the pages in the mapped range to appear in the
> > address space of the child process. It also prevents the memory leaks
> > due to additional reference counts on the mapped BOs in the child
> > process that prevented freeing the memory in the parent for which we had
> > worked around earlier in the user space inside the thunk library.
> > 
> > Additionally, we faced this issue when using CRIU to checkpoint restore
> > an application that had such inherited mappings in the child which
> > confuse CRIU when it mmaps on restore. Having this flag set for the
> > render node VMAs helps. VMAs mapped via KFD already take care of this so
> > this is needed only for the render nodes.
> > 
> > To limit the impact of the change to user space consumers such as OpenGL
> > etc, limit it to KFD BOs only.
> > 
> > Acked-by: Felix Kuehling <Felix.Kuehling@....com>
> > Reviewed-by: Christian König <christian.koenig@....com>
> > Signed-off-by: David Yat Sin <david.yatsin@....com>
> > Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@....com>
> > Signed-off-by: Alex Deucher <alexander.deucher@....com>
> > Signed-off-by: Sasha Levin <sashal@...nel.org>
> 
> Please drop this patch from all stable versions since it was reverted from
> upstream later on.

The revert comes later in the patch series, so all should be ok :)

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ