linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kmsan: fix missed kmsan_handle_dma() signature conversion
@ 2025-09-17  6:37 ` Leon Romanovsky
  2025-09-17 11:22   ` Jason Gunthorpe
  2025-09-17 12:43   ` Marek Szyprowski
  0 siblings, 2 replies; 4+ messages in thread
From: Leon Romanovsky @ 2025-09-17  6:37 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: Leon Romanovsky, Jason Gunthorpe, Alexander Potapenko,
	Andrew Morton, kasan-dev, kernel test robot, linux-mm

From: Leon Romanovsky <leonro@nvidia.com>

kmsan_handle_dma_sg() has call to kmsan_handle_dma() function which was
missed during conversion to physical addresses. Update that caller too
and fix the following compilation error:

mm/kmsan/hooks.c:372:6: error: too many arguments to function call, expected 3, have 4
  371 |                 kmsan_handle_dma(sg_page(item), item->offset, item->length,
      |                 ~~~~~~~~~~~~~~~~
  372 |                                  dir);
      |                                  ^~~
mm/kmsan/hooks.c:362:19: note: 'kmsan_handle_dma' declared here
  362 | EXPORT_SYMBOL_GPL(kmsan_handle_dma);

Fixes: 6eb1e769b2c1 ("kmsan: convert kmsan_handle_dma to use physical addresses")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509170638.AMGNCMEE-lkp@intel.com/
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 mm/kmsan/hooks.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/kmsan/hooks.c b/mm/kmsan/hooks.c
index fa9475e5ec4e9..90bee565b9bc2 100644
--- a/mm/kmsan/hooks.c
+++ b/mm/kmsan/hooks.c
@@ -368,8 +368,7 @@ void kmsan_handle_dma_sg(struct scatterlist *sg, int nents,
 	int i;
 
 	for_each_sg(sg, item, nents, i)
-		kmsan_handle_dma(sg_page(item), item->offset, item->length,
-				 dir);
+		kmsan_handle_dma(sg_phys(item), item->length, dir);
 }
 
 /* Functions from kmsan-checks.h follow. */
-- 
2.51.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kmsan: fix missed kmsan_handle_dma() signature conversion
  2025-09-17  6:37 ` [PATCH] kmsan: fix missed kmsan_handle_dma() signature conversion Leon Romanovsky
@ 2025-09-17 11:22   ` Jason Gunthorpe
  2025-09-17 12:00     ` Alexander Potapenko
  2025-09-17 12:43   ` Marek Szyprowski
  1 sibling, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2025-09-17 11:22 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Marek Szyprowski, Leon Romanovsky, Alexander Potapenko,
	Andrew Morton, kasan-dev, kernel test robot, linux-mm

On Wed, Sep 17, 2025 at 09:37:36AM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> kmsan_handle_dma_sg() has call to kmsan_handle_dma() function which was
> missed during conversion to physical addresses. Update that caller too
> and fix the following compilation error:
> 
> mm/kmsan/hooks.c:372:6: error: too many arguments to function call, expected 3, have 4
>   371 |                 kmsan_handle_dma(sg_page(item), item->offset, item->length,
>       |                 ~~~~~~~~~~~~~~~~
>   372 |                                  dir);
>       |                                  ^~~
> mm/kmsan/hooks.c:362:19: note: 'kmsan_handle_dma' declared here
>   362 | EXPORT_SYMBOL_GPL(kmsan_handle_dma);
> 
> Fixes: 6eb1e769b2c1 ("kmsan: convert kmsan_handle_dma to use physical addresses")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202509170638.AMGNCMEE-lkp@intel.com/
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  mm/kmsan/hooks.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kmsan: fix missed kmsan_handle_dma() signature conversion
  2025-09-17 11:22   ` Jason Gunthorpe
@ 2025-09-17 12:00     ` Alexander Potapenko
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Potapenko @ 2025-09-17 12:00 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Leon Romanovsky, Marek Szyprowski, Leon Romanovsky,
	Andrew Morton, kasan-dev, kernel test robot, linux-mm

On Wed, Sep 17, 2025 at 1:22 PM Jason Gunthorpe <jgg@nvidia.com> wrote:
>
> On Wed, Sep 17, 2025 at 09:37:36AM +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@nvidia.com>
> >
> > kmsan_handle_dma_sg() has call to kmsan_handle_dma() function which was
> > missed during conversion to physical addresses. Update that caller too
> > and fix the following compilation error:
> >
> > mm/kmsan/hooks.c:372:6: error: too many arguments to function call, expected 3, have 4
> >   371 |                 kmsan_handle_dma(sg_page(item), item->offset, item->length,
> >       |                 ~~~~~~~~~~~~~~~~
> >   372 |                                  dir);
> >       |                                  ^~~
> > mm/kmsan/hooks.c:362:19: note: 'kmsan_handle_dma' declared here
> >   362 | EXPORT_SYMBOL_GPL(kmsan_handle_dma);
> >
> > Fixes: 6eb1e769b2c1 ("kmsan: convert kmsan_handle_dma to use physical addresses")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202509170638.AMGNCMEE-lkp@intel.com/
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> > ---
> >  mm/kmsan/hooks.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
>
> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Alexander Potapenko <glider@google.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kmsan: fix missed kmsan_handle_dma() signature conversion
  2025-09-17  6:37 ` [PATCH] kmsan: fix missed kmsan_handle_dma() signature conversion Leon Romanovsky
  2025-09-17 11:22   ` Jason Gunthorpe
@ 2025-09-17 12:43   ` Marek Szyprowski
  1 sibling, 0 replies; 4+ messages in thread
From: Marek Szyprowski @ 2025-09-17 12:43 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Leon Romanovsky, Jason Gunthorpe, Alexander Potapenko,
	Andrew Morton, kasan-dev, kernel test robot, linux-mm

On 17.09.2025 08:37, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> kmsan_handle_dma_sg() has call to kmsan_handle_dma() function which was
> missed during conversion to physical addresses. Update that caller too
> and fix the following compilation error:
>
> mm/kmsan/hooks.c:372:6: error: too many arguments to function call, expected 3, have 4
>    371 |                 kmsan_handle_dma(sg_page(item), item->offset, item->length,
>        |                 ~~~~~~~~~~~~~~~~
>    372 |                                  dir);
>        |                                  ^~~
> mm/kmsan/hooks.c:362:19: note: 'kmsan_handle_dma' declared here
>    362 | EXPORT_SYMBOL_GPL(kmsan_handle_dma);
>
> Fixes: 6eb1e769b2c1 ("kmsan: convert kmsan_handle_dma to use physical addresses")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202509170638.AMGNCMEE-lkp@intel.com/
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Applied to dma-mapping-for-next branch. Thanks!

> ---
>   mm/kmsan/hooks.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/kmsan/hooks.c b/mm/kmsan/hooks.c
> index fa9475e5ec4e9..90bee565b9bc2 100644
> --- a/mm/kmsan/hooks.c
> +++ b/mm/kmsan/hooks.c
> @@ -368,8 +368,7 @@ void kmsan_handle_dma_sg(struct scatterlist *sg, int nents,
>   	int i;
>   
>   	for_each_sg(sg, item, nents, i)
> -		kmsan_handle_dma(sg_page(item), item->offset, item->length,
> -				 dir);
> +		kmsan_handle_dma(sg_phys(item), item->length, dir);
>   }
>   
>   /* Functions from kmsan-checks.h follow. */

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-17 12:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20250917063825eucas1p2364dba546022ab35fdc40dc7ada6fd20@eucas1p2.samsung.com>
2025-09-17  6:37 ` [PATCH] kmsan: fix missed kmsan_handle_dma() signature conversion Leon Romanovsky
2025-09-17 11:22   ` Jason Gunthorpe
2025-09-17 12:00     ` Alexander Potapenko
2025-09-17 12:43   ` Marek Szyprowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox