All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Lu Baolu <baolu.lu@linux.intel.com>
Cc: ashok.raj@intel.com, jacob.jun.pan@intel.com,
	kevin.tian@intel.com, iommu@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] iommu/vt-d: Remove unnecessary WARN_ON_ONCE()
Date: Fri, 24 Jan 2020 15:36:48 +0100	[thread overview]
Message-ID: <20200124143648.GC27081@8bytes.org> (raw)
In-Reply-To: <b56e8a8f-acd7-b318-5a1c-f32c5a07657f@linux.intel.com>

On Sat, Jan 18, 2020 at 10:14:11AM +0800, Lu Baolu wrote:
> Hi Joerg,
> 
> On 1/17/20 5:59 PM, Joerg Roedel wrote:
> > On Thu, Jan 16, 2020 at 09:52:36AM +0800, Lu Baolu wrote:
> > > Address field in device TLB invalidation descriptor is qualified
> > > by the S field. If S field is zero, a single page at page address
> > > specified by address [63:12] is requested to be invalidated. If S
> > > field is set, the least significant bit in the address field with
> > > value 0b (say bit N) indicates the invalidation address range. The
> > > spec doesn't require the address [N - 1, 0] to be cleared, hence
> > > remove the unnecessary WARN_ON_ONCE().
> > > 
> > > Otherwise, the caller might set "mask = MAX_AGAW_PFN_WIDTH" in order
> > > to invalidating all the cached mappings on an endpoint, and below
> > > overflow error will be triggered.
> > > 
> > > [...]
> > > UBSAN: Undefined behaviour in drivers/iommu/dmar.c:1354:3
> > > shift exponent 64 is too large for 64-bit type 'long long unsigned int'
> > > [...]
> > > 
> > > Reported-and-tested-by: Frank <fgndev@posteo.de>
> > > Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> > 
> > Does this need a Fixes and/or stable tag?
> > 
> 
> This doesn't cause any errors, just an unnecessary checking of
> 
> 	"0 & ((1UL << 64) - 1)"
> 
> in some cases.

Okay, applied for v5.6.

WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: Lu Baolu <baolu.lu@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, kevin.tian@intel.com,
	ashok.raj@intel.com, iommu@lists.linux-foundation.org,
	jacob.jun.pan@intel.com
Subject: Re: [PATCH 1/1] iommu/vt-d: Remove unnecessary WARN_ON_ONCE()
Date: Fri, 24 Jan 2020 15:36:48 +0100	[thread overview]
Message-ID: <20200124143648.GC27081@8bytes.org> (raw)
In-Reply-To: <b56e8a8f-acd7-b318-5a1c-f32c5a07657f@linux.intel.com>

On Sat, Jan 18, 2020 at 10:14:11AM +0800, Lu Baolu wrote:
> Hi Joerg,
> 
> On 1/17/20 5:59 PM, Joerg Roedel wrote:
> > On Thu, Jan 16, 2020 at 09:52:36AM +0800, Lu Baolu wrote:
> > > Address field in device TLB invalidation descriptor is qualified
> > > by the S field. If S field is zero, a single page at page address
> > > specified by address [63:12] is requested to be invalidated. If S
> > > field is set, the least significant bit in the address field with
> > > value 0b (say bit N) indicates the invalidation address range. The
> > > spec doesn't require the address [N - 1, 0] to be cleared, hence
> > > remove the unnecessary WARN_ON_ONCE().
> > > 
> > > Otherwise, the caller might set "mask = MAX_AGAW_PFN_WIDTH" in order
> > > to invalidating all the cached mappings on an endpoint, and below
> > > overflow error will be triggered.
> > > 
> > > [...]
> > > UBSAN: Undefined behaviour in drivers/iommu/dmar.c:1354:3
> > > shift exponent 64 is too large for 64-bit type 'long long unsigned int'
> > > [...]
> > > 
> > > Reported-and-tested-by: Frank <fgndev@posteo.de>
> > > Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> > 
> > Does this need a Fixes and/or stable tag?
> > 
> 
> This doesn't cause any errors, just an unnecessary checking of
> 
> 	"0 & ((1UL << 64) - 1)"
> 
> in some cases.

Okay, applied for v5.6.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2020-01-24 14:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16  1:52 [PATCH 1/1] iommu/vt-d: Remove unnecessary WARN_ON_ONCE() Lu Baolu
2020-01-16  1:52 ` Lu Baolu
2020-01-17  9:59 ` Joerg Roedel
2020-01-17  9:59   ` Joerg Roedel
2020-01-18  2:14   ` Lu Baolu
2020-01-18  2:14     ` Lu Baolu
2020-01-24 14:36     ` Joerg Roedel [this message]
2020-01-24 14:36       ` Joerg Roedel

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=20200124143648.GC27081@8bytes.org \
    --to=joro@8bytes.org \
    --cc=ashok.raj@intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jacob.jun.pan@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@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.