Archive-only list for patches
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Joao Martins <joao.m.martins@oracle.com>
Cc: iommu@lists.linux.dev, Kevin Tian <kevin.tian@intel.com>,
	Matt Ochs <mochs@nvidia.com>,
	patches@lists.linux.dev, Will Deacon <will@kernel.org>,
	Joerg Roedel <joro@8bytes.org>
Subject: Re: [PATCH] iommufd/selftest: Fix buffer read overrrun in the dirty test
Date: Thu, 22 Aug 2024 14:06:24 -0300	[thread overview]
Message-ID: <20240822170624.GT3773488@nvidia.com> (raw)
In-Reply-To: <29558b8a-93a5-4368-8954-7c7de0d9a0b7@oracle.com>

On Thu, Aug 22, 2024 at 06:03:17PM +0100, Joao Martins wrote:

> -	if (copy_from_user(tmp, uptr, bitmap_size)) {
> +	if (copy_from_user(tmp, uptr,DIV_ROUND_UP(max, BITS_PER_BYTE))) {
>  		rc = -EFAULT;
>  		goto out_free;
>  	}
> 
> 
> But considering that's only one call side, then I assumed you just wanted removed.

Oh, I see, yes, with only one user (and there is actually a #define
called bitmap_size in common headers too) it seemed best

Jason

  reply	other threads:[~2024-08-22 17:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 14:47 [PATCH] iommufd/selftest: Fix buffer read overrrun in the dirty test Jason Gunthorpe
2024-08-22 16:52 ` Joao Martins
2024-08-22 16:59   ` Jason Gunthorpe
2024-08-22 17:03     ` Joao Martins
2024-08-22 17:06       ` Jason Gunthorpe [this message]
2024-08-26  6:10 ` Tian, Kevin
2024-08-27 12:47 ` Jason Gunthorpe

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=20240822170624.GT3773488@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=joao.m.martins@oracle.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=mochs@nvidia.com \
    --cc=patches@lists.linux.dev \
    --cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox