All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>,
	Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH] kernel/dma/direct: Do not include SME mask in the DMA supported check
Date: Thu, 10 Jan 2019 20:13:17 +0100	[thread overview]
Message-ID: <20190110191317.GD18221@kroah.com> (raw)
In-Reply-To: <b30c85428b0f60de155333526b1ae9e16ac988e2.1545496341.git.thomas.lendacky@amd.com>

On Sat, Dec 22, 2018 at 04:32:40PM +0000, Lendacky, Thomas wrote:
> commit c92a54cfa0257e8ffd66b2a17d49e9c0bd4b769f upstream
> 
> This fix appears in 4.20, but dma_direct_supported() was changed in 4.20
> such that the original version of the fix will not apply to previous
> versions of the kernel. The fix only applies to the 4.19-stable tree and
> has been backported for that tree.
> 
> The dma_direct_supported() function intends to check the DMA mask against
> specific values. However, the phys_to_dma() function includes the SME
> encryption mask, which defeats the intended purpose of the check. This
> results in drivers that support less than 48-bit DMA (SME encryption mask
> is bit 47) from being able to set the DMA mask successfully when SME is
> active, which results in the driver failing to initialize.
> 
> Change the function used to check the mask from phys_to_dma() to
> __phys_to_dma() so that the SME encryption mask is not part of the check.
> 
> Fixes: c1d0af1a1d5d ("kernel/dma/direct: take DMA offset into account in dma_direct_supported")
> Cc: <stable@vger.kernel.org> # 4.19.x
> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
> ---
>  kernel/dma/direct.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)

Now queued up, thanks.

greg k-h

  reply	other threads:[~2019-01-10 19:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-22 16:32 [PATCH] kernel/dma/direct: Do not include SME mask in the DMA supported check Lendacky, Thomas
2019-01-10 19:13 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-12-13 22:51 Lendacky, Thomas
2018-12-13 22:51 ` Lendacky, Thomas
2018-12-15 10:55 ` Christoph Hellwig
2018-12-15 10:55   ` Christoph Hellwig
     [not found]   ` <20181215105510.GA1806-jcswGhMUV9g@public.gmane.org>
2018-12-16 23:41     ` Lendacky, Thomas
2018-12-16 23:41       ` Lendacky, Thomas
2018-12-16 23:41       ` Lendacky, Thomas
2018-12-17 14:49       ` Lendacky, Thomas
2018-12-17 14:49         ` Lendacky, Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190110191317.GD18221@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Thomas.Lendacky@amd.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.