* [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index
@ 2025-11-14 14:30 Rene Rebe
2025-11-14 15:25 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Rene Rebe @ 2025-11-14 14:30 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, Martin K. Petersen, Geoff Levand, linux-kernel,
Greg Kroah-Hartman
With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting
ps3disk to new bvec helpers, incrementing the offset was accidently
lost, corrupting consecutive buffers. Restore index for non-corrupted
data transfers.
Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec)
Signed-off-by: René Rebe <rene@exactco.de>
--- a/drivers/block/ps3disk.c 2023-08-07 17:40:55.200957746 +0200
+++ b/drivers/block/ps3disk.c 2023-08-07 17:46:39.702964129 +0200
@@ -85,10 +93,14 @@
struct bio_vec bvec;
rq_for_each_segment(bvec, req, iter) {
+ dev_dbg(&dev->sbd.core, "%s:%u: %u sectors from %llu\n",
+ __func__, __LINE__, bio_sectors(iter.bio),
+ iter.bio->bi_iter.bi_sector);
if (gather)
memcpy_from_bvec(dev->bounce_buf + offset, &bvec);
else
memcpy_to_bvec(&bvec, dev->bounce_buf + offset);
+ offset += bvec.bv_len;
}
}
--
René Rebe, ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
https://exactcode.com | https://t2linux.com | https://rene.rebe.de
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index 2025-11-14 14:30 [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index Rene Rebe @ 2025-11-14 15:25 ` Christoph Hellwig 2025-11-14 16:11 ` Jens Axboe 2025-11-16 12:13 ` Greg Kroah-Hartman 2 siblings, 0 replies; 12+ messages in thread From: Christoph Hellwig @ 2025-11-14 15:25 UTC (permalink / raw) To: Rene Rebe Cc: Christoph Hellwig, Jens Axboe, Martin K. Petersen, Geoff Levand, linux-kernel, Greg Kroah-Hartman On Fri, Nov 14, 2025 at 03:30:33PM +0100, Rene Rebe wrote: > With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting > ps3disk to new bvec helpers, incrementing the offset was accidently > lost, corrupting consecutive buffers. Restore index for non-corrupted > data transfers. > > Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) > > Signed-off-by: René Rebe <rene@exactco.de> Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de> Note that there should be no empty line after the fixes tag, but maybe Jens can fix this when applying the patch. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index 2025-11-14 14:30 [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index Rene Rebe 2025-11-14 15:25 ` Christoph Hellwig @ 2025-11-14 16:11 ` Jens Axboe 2025-11-16 12:13 ` Greg Kroah-Hartman 2 siblings, 0 replies; 12+ messages in thread From: Jens Axboe @ 2025-11-14 16:11 UTC (permalink / raw) To: Christoph Hellwig, Rene Rebe Cc: Martin K. Petersen, Geoff Levand, linux-kernel, Greg Kroah-Hartman On Fri, 14 Nov 2025 15:30:33 +0100, Rene Rebe wrote: > With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting > ps3disk to new bvec helpers, incrementing the offset was accidently > lost, corrupting consecutive buffers. Restore index for non-corrupted > data transfers. > > Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) > > [...] Applied, thanks! [1/1] Fix ps3disk: use memcpy_{from,to}_bvec index (no commit info) Best regards, -- Jens Axboe ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index 2025-11-14 14:30 [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index Rene Rebe 2025-11-14 15:25 ` Christoph Hellwig 2025-11-14 16:11 ` Jens Axboe @ 2025-11-16 12:13 ` Greg Kroah-Hartman 2025-11-17 9:47 ` Geert Uytterhoeven 2 siblings, 1 reply; 12+ messages in thread From: Greg Kroah-Hartman @ 2025-11-16 12:13 UTC (permalink / raw) To: Rene Rebe Cc: Christoph Hellwig, Jens Axboe, Martin K. Petersen, Geoff Levand, linux-kernel On Fri, Nov 14, 2025 at 03:30:33PM +0100, Rene Rebe wrote: > With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting > ps3disk to new bvec helpers, incrementing the offset was accidently > lost, corrupting consecutive buffers. Restore index for non-corrupted > data transfers. > > Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) > > Signed-off-by: René Rebe <rene@exactco.de> > > --- a/drivers/block/ps3disk.c 2023-08-07 17:40:55.200957746 +0200 > +++ b/drivers/block/ps3disk.c 2023-08-07 17:46:39.702964129 +0200 > @@ -85,10 +93,14 @@ > struct bio_vec bvec; > > rq_for_each_segment(bvec, req, iter) { > + dev_dbg(&dev->sbd.core, "%s:%u: %u sectors from %llu\n", > + __func__, __LINE__, bio_sectors(iter.bio), In the future, please note that all dev_dbg() calls have __func__ built into them, and I think __LINE__ as well, so there's no need to ever add that to the output. Take a look at the documentation for more details on how to see that in the log. thanks, greg k-h ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index 2025-11-16 12:13 ` Greg Kroah-Hartman @ 2025-11-17 9:47 ` Geert Uytterhoeven 2025-11-17 10:16 ` René Rebe 2025-11-17 12:39 ` Greg Kroah-Hartman 0 siblings, 2 replies; 12+ messages in thread From: Geert Uytterhoeven @ 2025-11-17 9:47 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Rene Rebe, Christoph Hellwig, Jens Axboe, Martin K. Petersen, Geoff Levand, linux-kernel Hi Greg, On Sun, 16 Nov 2025 at 13:14, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > On Fri, Nov 14, 2025 at 03:30:33PM +0100, Rene Rebe wrote: > > With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting > > ps3disk to new bvec helpers, incrementing the offset was accidently > > lost, corrupting consecutive buffers. Restore index for non-corrupted > > data transfers. > > > > Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) > > > > Signed-off-by: René Rebe <rene@exactco.de> > > > > --- a/drivers/block/ps3disk.c 2023-08-07 17:40:55.200957746 +0200 > > +++ b/drivers/block/ps3disk.c 2023-08-07 17:46:39.702964129 +0200 > > @@ -85,10 +93,14 @@ > > struct bio_vec bvec; > > > > rq_for_each_segment(bvec, req, iter) { > > + dev_dbg(&dev->sbd.core, "%s:%u: %u sectors from %llu\n", > > + __func__, __LINE__, bio_sectors(iter.bio), > > In the future, please note that all dev_dbg() calls have __func__ built > into them, and I think __LINE__ as well, so there's no need to ever add > that to the output. Take a look at the documentation for more details > on how to see that in the log. That does not seem to be true in v6.18-rc6: the function name and line number are not included. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index 2025-11-17 9:47 ` Geert Uytterhoeven @ 2025-11-17 10:16 ` René Rebe 2025-11-17 12:39 ` Greg Kroah-Hartman 1 sibling, 0 replies; 12+ messages in thread From: René Rebe @ 2025-11-17 10:16 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Greg Kroah-Hartman, Christoph Hellwig, Jens Axboe, Martin K. Petersen, Geoff Levand, linux-kernel Hi, > On 17. Nov 2025, at 10:47, Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > Hi Greg, > > On Sun, 16 Nov 2025 at 13:14, Greg Kroah-Hartman > <gregkh@linuxfoundation.org> wrote: >> On Fri, Nov 14, 2025 at 03:30:33PM +0100, Rene Rebe wrote: >>> With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting >>> ps3disk to new bvec helpers, incrementing the offset was accidently >>> lost, corrupting consecutive buffers. Restore index for non-corrupted >>> data transfers. >>> >>> Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) >>> >>> Signed-off-by: René Rebe <rene@exactco.de> >>> >>> --- a/drivers/block/ps3disk.c 2023-08-07 17:40:55.200957746 +0200 >>> +++ b/drivers/block/ps3disk.c 2023-08-07 17:46:39.702964129 +0200 >>> @@ -85,10 +93,14 @@ >>> struct bio_vec bvec; >>> >>> rq_for_each_segment(bvec, req, iter) { >>> + dev_dbg(&dev->sbd.core, "%s:%u: %u sectors from %llu\n", >>> + __func__, __LINE__, bio_sectors(iter.bio), >> >> In the future, please note that all dev_dbg() calls have __func__ built >> into them, and I think __LINE__ as well, so there's no need to ever add >> that to the output. Take a look at the documentation for more details >> on how to see that in the log. > > That does not seem to be true in v6.18-rc6: the function name and line > number are not included. Thanks, I will keep that in mind for future patches, in this case I only Exactly restored what was deleted by the broken commit. René -- https://exactco.de - https://t2linux.com - https://rene.rebe.de ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index 2025-11-17 9:47 ` Geert Uytterhoeven 2025-11-17 10:16 ` René Rebe @ 2025-11-17 12:39 ` Greg Kroah-Hartman 2025-11-17 13:05 ` Geert Uytterhoeven 1 sibling, 1 reply; 12+ messages in thread From: Greg Kroah-Hartman @ 2025-11-17 12:39 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Rene Rebe, Christoph Hellwig, Jens Axboe, Martin K. Petersen, Geoff Levand, linux-kernel On Mon, Nov 17, 2025 at 10:47:49AM +0100, Geert Uytterhoeven wrote: > Hi Greg, > > On Sun, 16 Nov 2025 at 13:14, Greg Kroah-Hartman > <gregkh@linuxfoundation.org> wrote: > > On Fri, Nov 14, 2025 at 03:30:33PM +0100, Rene Rebe wrote: > > > With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting > > > ps3disk to new bvec helpers, incrementing the offset was accidently > > > lost, corrupting consecutive buffers. Restore index for non-corrupted > > > data transfers. > > > > > > Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) > > > > > > Signed-off-by: René Rebe <rene@exactco.de> > > > > > > --- a/drivers/block/ps3disk.c 2023-08-07 17:40:55.200957746 +0200 > > > +++ b/drivers/block/ps3disk.c 2023-08-07 17:46:39.702964129 +0200 > > > @@ -85,10 +93,14 @@ > > > struct bio_vec bvec; > > > > > > rq_for_each_segment(bvec, req, iter) { > > > + dev_dbg(&dev->sbd.core, "%s:%u: %u sectors from %llu\n", > > > + __func__, __LINE__, bio_sectors(iter.bio), > > > > In the future, please note that all dev_dbg() calls have __func__ built > > into them, and I think __LINE__ as well, so there's no need to ever add > > that to the output. Take a look at the documentation for more details > > on how to see that in the log. > > That does not seem to be true in v6.18-rc6: the function name and line > number are not included. What changed to remove them? Look at Documentation/admin-guide/dynamic-debug-howto.rst for how to enable both of these for any dynamic debug message in the kernel. Does that not work properly here? thanks, greg k-h ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index 2025-11-17 12:39 ` Greg Kroah-Hartman @ 2025-11-17 13:05 ` Geert Uytterhoeven 2025-11-17 13:13 ` Greg Kroah-Hartman 0 siblings, 1 reply; 12+ messages in thread From: Geert Uytterhoeven @ 2025-11-17 13:05 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Rene Rebe, Christoph Hellwig, Jens Axboe, Martin K. Petersen, Geoff Levand, linux-kernel Hi Greg, On Mon, 17 Nov 2025 at 13:39, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > On Mon, Nov 17, 2025 at 10:47:49AM +0100, Geert Uytterhoeven wrote: > > On Sun, 16 Nov 2025 at 13:14, Greg Kroah-Hartman > > <gregkh@linuxfoundation.org> wrote: > > > On Fri, Nov 14, 2025 at 03:30:33PM +0100, Rene Rebe wrote: > > > > With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting > > > > ps3disk to new bvec helpers, incrementing the offset was accidently > > > > lost, corrupting consecutive buffers. Restore index for non-corrupted > > > > data transfers. > > > > > > > > Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) > > > > > > > > Signed-off-by: René Rebe <rene@exactco.de> > > > > > > > > --- a/drivers/block/ps3disk.c 2023-08-07 17:40:55.200957746 +0200 > > > > +++ b/drivers/block/ps3disk.c 2023-08-07 17:46:39.702964129 +0200 > > > > @@ -85,10 +93,14 @@ > > > > struct bio_vec bvec; > > > > > > > > rq_for_each_segment(bvec, req, iter) { > > > > + dev_dbg(&dev->sbd.core, "%s:%u: %u sectors from %llu\n", > > > > + __func__, __LINE__, bio_sectors(iter.bio), > > > > > > In the future, please note that all dev_dbg() calls have __func__ built > > > into them, and I think __LINE__ as well, so there's no need to ever add > > > that to the output. Take a look at the documentation for more details > > > on how to see that in the log. > > > > That does not seem to be true in v6.18-rc6: the function name and line > > number are not included. > > What changed to remove them? Look at > Documentation/admin-guide/dynamic-debug-howto.rst for how to enable both > of these for any dynamic debug message in the kernel. > > Does that not work properly here? Oh, dynamic debug, dunno ;-) It does not work with #define DEBUG at the top of a source file. So perhaps lots of cleanup work to do? $ git grep -Ew "(pr_debug|dev_dbg).*__func__" v6.18-rc6 | wc -l 4512 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index 2025-11-17 13:05 ` Geert Uytterhoeven @ 2025-11-17 13:13 ` Greg Kroah-Hartman 2025-11-17 13:31 ` Geert Uytterhoeven 0 siblings, 1 reply; 12+ messages in thread From: Greg Kroah-Hartman @ 2025-11-17 13:13 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Rene Rebe, Christoph Hellwig, Jens Axboe, Martin K. Petersen, Geoff Levand, linux-kernel On Mon, Nov 17, 2025 at 02:05:33PM +0100, Geert Uytterhoeven wrote: > Hi Greg, > > On Mon, 17 Nov 2025 at 13:39, Greg Kroah-Hartman > <gregkh@linuxfoundation.org> wrote: > > On Mon, Nov 17, 2025 at 10:47:49AM +0100, Geert Uytterhoeven wrote: > > > On Sun, 16 Nov 2025 at 13:14, Greg Kroah-Hartman > > > <gregkh@linuxfoundation.org> wrote: > > > > On Fri, Nov 14, 2025 at 03:30:33PM +0100, Rene Rebe wrote: > > > > > With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting > > > > > ps3disk to new bvec helpers, incrementing the offset was accidently > > > > > lost, corrupting consecutive buffers. Restore index for non-corrupted > > > > > data transfers. > > > > > > > > > > Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) > > > > > > > > > > Signed-off-by: René Rebe <rene@exactco.de> > > > > > > > > > > --- a/drivers/block/ps3disk.c 2023-08-07 17:40:55.200957746 +0200 > > > > > +++ b/drivers/block/ps3disk.c 2023-08-07 17:46:39.702964129 +0200 > > > > > @@ -85,10 +93,14 @@ > > > > > struct bio_vec bvec; > > > > > > > > > > rq_for_each_segment(bvec, req, iter) { > > > > > + dev_dbg(&dev->sbd.core, "%s:%u: %u sectors from %llu\n", > > > > > + __func__, __LINE__, bio_sectors(iter.bio), > > > > > > > > In the future, please note that all dev_dbg() calls have __func__ built > > > > into them, and I think __LINE__ as well, so there's no need to ever add > > > > that to the output. Take a look at the documentation for more details > > > > on how to see that in the log. > > > > > > That does not seem to be true in v6.18-rc6: the function name and line > > > number are not included. > > > > What changed to remove them? Look at > > Documentation/admin-guide/dynamic-debug-howto.rst for how to enable both > > of these for any dynamic debug message in the kernel. > > > > Does that not work properly here? > > Oh, dynamic debug, dunno ;-) > It does not work with #define DEBUG at the top of a source file. Nor should it, that's a really old scheme :) > So perhaps lots of cleanup work to do? > > $ git grep -Ew "(pr_debug|dev_dbg).*__func__" v6.18-rc6 | wc -l > 4512 Huh? We want those to be used. confused, greg k-h ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index 2025-11-17 13:13 ` Greg Kroah-Hartman @ 2025-11-17 13:31 ` Geert Uytterhoeven 2025-11-18 2:36 ` Greg Kroah-Hartman 0 siblings, 1 reply; 12+ messages in thread From: Geert Uytterhoeven @ 2025-11-17 13:31 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Rene Rebe, Christoph Hellwig, Jens Axboe, Martin K. Petersen, Geoff Levand, linux-kernel Hi Greg, On Mon, 17 Nov 2025 at 14:13, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > On Mon, Nov 17, 2025 at 02:05:33PM +0100, Geert Uytterhoeven wrote: > > On Mon, 17 Nov 2025 at 13:39, Greg Kroah-Hartman > > <gregkh@linuxfoundation.org> wrote: > > > On Mon, Nov 17, 2025 at 10:47:49AM +0100, Geert Uytterhoeven wrote: > > > > On Sun, 16 Nov 2025 at 13:14, Greg Kroah-Hartman > > > > <gregkh@linuxfoundation.org> wrote: > > > > > On Fri, Nov 14, 2025 at 03:30:33PM +0100, Rene Rebe wrote: > > > > > > With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting > > > > > > ps3disk to new bvec helpers, incrementing the offset was accidently > > > > > > lost, corrupting consecutive buffers. Restore index for non-corrupted > > > > > > data transfers. > > > > > > > > > > > > Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) > > > > > > > > > > > > Signed-off-by: René Rebe <rene@exactco.de> > > > > > > > > > > > > --- a/drivers/block/ps3disk.c 2023-08-07 17:40:55.200957746 +0200 > > > > > > +++ b/drivers/block/ps3disk.c 2023-08-07 17:46:39.702964129 +0200 > > > > > > @@ -85,10 +93,14 @@ > > > > > > struct bio_vec bvec; > > > > > > > > > > > > rq_for_each_segment(bvec, req, iter) { > > > > > > + dev_dbg(&dev->sbd.core, "%s:%u: %u sectors from %llu\n", > > > > > > + __func__, __LINE__, bio_sectors(iter.bio), > > > > > > > > > > In the future, please note that all dev_dbg() calls have __func__ built > > > > > into them, and I think __LINE__ as well, so there's no need to ever add > > > > > that to the output. Take a look at the documentation for more details > > > > > on how to see that in the log. > > > > > > > > That does not seem to be true in v6.18-rc6: the function name and line > > > > number are not included. > > > > > > What changed to remove them? Look at > > > Documentation/admin-guide/dynamic-debug-howto.rst for how to enable both > > > of these for any dynamic debug message in the kernel. > > > > > > Does that not work properly here? > > > > Oh, dynamic debug, dunno ;-) > > It does not work with #define DEBUG at the top of a source file. > > Nor should it, that's a really old scheme :) That method is still documented in Documentation/admin-guide/dynamic-debug-howto.rst, and I use it a lot. It does mean "all dev_dbg() calls have __func__ built in to them" is false... > > So perhaps lots of cleanup work to do? > > > > $ git grep -Ew "(pr_debug|dev_dbg).*__func__" v6.18-rc6 | wc -l > > 4512 > > Huh? We want those to be used. You just said they should not print __func__ explicitly?? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index 2025-11-17 13:31 ` Geert Uytterhoeven @ 2025-11-18 2:36 ` Greg Kroah-Hartman 2025-11-18 7:46 ` Geert Uytterhoeven 0 siblings, 1 reply; 12+ messages in thread From: Greg Kroah-Hartman @ 2025-11-18 2:36 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Rene Rebe, Christoph Hellwig, Jens Axboe, Martin K. Petersen, Geoff Levand, linux-kernel On Mon, Nov 17, 2025 at 02:31:49PM +0100, Geert Uytterhoeven wrote: > Hi Greg, > > On Mon, 17 Nov 2025 at 14:13, Greg Kroah-Hartman > <gregkh@linuxfoundation.org> wrote: > > On Mon, Nov 17, 2025 at 02:05:33PM +0100, Geert Uytterhoeven wrote: > > > On Mon, 17 Nov 2025 at 13:39, Greg Kroah-Hartman > > > <gregkh@linuxfoundation.org> wrote: > > > > On Mon, Nov 17, 2025 at 10:47:49AM +0100, Geert Uytterhoeven wrote: > > > > > On Sun, 16 Nov 2025 at 13:14, Greg Kroah-Hartman > > > > > <gregkh@linuxfoundation.org> wrote: > > > > > > On Fri, Nov 14, 2025 at 03:30:33PM +0100, Rene Rebe wrote: > > > > > > > With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting > > > > > > > ps3disk to new bvec helpers, incrementing the offset was accidently > > > > > > > lost, corrupting consecutive buffers. Restore index for non-corrupted > > > > > > > data transfers. > > > > > > > > > > > > > > Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) > > > > > > > > > > > > > > Signed-off-by: René Rebe <rene@exactco.de> > > > > > > > > > > > > > > --- a/drivers/block/ps3disk.c 2023-08-07 17:40:55.200957746 +0200 > > > > > > > +++ b/drivers/block/ps3disk.c 2023-08-07 17:46:39.702964129 +0200 > > > > > > > @@ -85,10 +93,14 @@ > > > > > > > struct bio_vec bvec; > > > > > > > > > > > > > > rq_for_each_segment(bvec, req, iter) { > > > > > > > + dev_dbg(&dev->sbd.core, "%s:%u: %u sectors from %llu\n", > > > > > > > + __func__, __LINE__, bio_sectors(iter.bio), > > > > > > > > > > > > In the future, please note that all dev_dbg() calls have __func__ built > > > > > > into them, and I think __LINE__ as well, so there's no need to ever add > > > > > > that to the output. Take a look at the documentation for more details > > > > > > on how to see that in the log. > > > > > > > > > > That does not seem to be true in v6.18-rc6: the function name and line > > > > > number are not included. > > > > > > > > What changed to remove them? Look at > > > > Documentation/admin-guide/dynamic-debug-howto.rst for how to enable both > > > > of these for any dynamic debug message in the kernel. > > > > > > > > Does that not work properly here? > > > > > > Oh, dynamic debug, dunno ;-) > > > It does not work with #define DEBUG at the top of a source file. > > > > Nor should it, that's a really old scheme :) > > That method is still documented in > Documentation/admin-guide/dynamic-debug-howto.rst, and I use it a lot. > > It does mean "all dev_dbg() calls have __func__ built in to them" is false... But it's there, just set it from the debugfs api, right? > > > So perhaps lots of cleanup work to do? > > > > > > $ git grep -Ew "(pr_debug|dev_dbg).*__func__" v6.18-rc6 | wc -l > > > 4512 > > > > Huh? We want those to be used. > > You just said they should not print __func__ explicitly?? Yes, they should not. thanks, greg k-h ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index 2025-11-18 2:36 ` Greg Kroah-Hartman @ 2025-11-18 7:46 ` Geert Uytterhoeven 0 siblings, 0 replies; 12+ messages in thread From: Geert Uytterhoeven @ 2025-11-18 7:46 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Rene Rebe, Christoph Hellwig, Jens Axboe, Martin K. Petersen, Geoff Levand, linux-kernel Hi Greg, On Tue, 18 Nov 2025 at 03:36, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > On Mon, Nov 17, 2025 at 02:31:49PM +0100, Geert Uytterhoeven wrote: > > On Mon, 17 Nov 2025 at 14:13, Greg Kroah-Hartman > > <gregkh@linuxfoundation.org> wrote: > > > On Mon, Nov 17, 2025 at 02:05:33PM +0100, Geert Uytterhoeven wrote: > > > > On Mon, 17 Nov 2025 at 13:39, Greg Kroah-Hartman > > > > <gregkh@linuxfoundation.org> wrote: > > > > > On Mon, Nov 17, 2025 at 10:47:49AM +0100, Geert Uytterhoeven wrote: > > > > > > On Sun, 16 Nov 2025 at 13:14, Greg Kroah-Hartman > > > > > > <gregkh@linuxfoundation.org> wrote: > > > > > > > On Fri, Nov 14, 2025 at 03:30:33PM +0100, Rene Rebe wrote: > > > > > > > > With 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) converting > > > > > > > > ps3disk to new bvec helpers, incrementing the offset was accidently > > > > > > > > lost, corrupting consecutive buffers. Restore index for non-corrupted > > > > > > > > data transfers. > > > > > > > > > > > > > > > > Fixes: 6e0a48552b8c (ps3disk: use memcpy_{from,to}_bvec) > > > > > > > > > > > > > > > > Signed-off-by: René Rebe <rene@exactco.de> > > > > > > > > > > > > > > > > --- a/drivers/block/ps3disk.c 2023-08-07 17:40:55.200957746 +0200 > > > > > > > > +++ b/drivers/block/ps3disk.c 2023-08-07 17:46:39.702964129 +0200 > > > > > > > > @@ -85,10 +93,14 @@ > > > > > > > > struct bio_vec bvec; > > > > > > > > > > > > > > > > rq_for_each_segment(bvec, req, iter) { > > > > > > > > + dev_dbg(&dev->sbd.core, "%s:%u: %u sectors from %llu\n", > > > > > > > > + __func__, __LINE__, bio_sectors(iter.bio), > > > > > > > > > > > > > > In the future, please note that all dev_dbg() calls have __func__ built > > > > > > > into them, and I think __LINE__ as well, so there's no need to ever add > > > > > > > that to the output. Take a look at the documentation for more details > > > > > > > on how to see that in the log. > > > > > > > > > > > > That does not seem to be true in v6.18-rc6: the function name and line > > > > > > number are not included. > > > > > > > > > > What changed to remove them? Look at > > > > > Documentation/admin-guide/dynamic-debug-howto.rst for how to enable both > > > > > of these for any dynamic debug message in the kernel. > > > > > > > > > > Does that not work properly here? > > > > > > > > Oh, dynamic debug, dunno ;-) > > > > It does not work with #define DEBUG at the top of a source file. > > > > > > Nor should it, that's a really old scheme :) > > > > That method is still documented in > > Documentation/admin-guide/dynamic-debug-howto.rst, and I use it a lot. > > > > It does mean "all dev_dbg() calls have __func__ built in to them" is false... > > But it's there, just set it from the debugfs api, right? Only with dynamic debug, not with -DDEBUG, so "all" is not appropriate. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-11-18 7:47 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-14 14:30 [RESEND PATCH] Fix ps3disk: use memcpy_{from,to}_bvec index Rene Rebe
2025-11-14 15:25 ` Christoph Hellwig
2025-11-14 16:11 ` Jens Axboe
2025-11-16 12:13 ` Greg Kroah-Hartman
2025-11-17 9:47 ` Geert Uytterhoeven
2025-11-17 10:16 ` René Rebe
2025-11-17 12:39 ` Greg Kroah-Hartman
2025-11-17 13:05 ` Geert Uytterhoeven
2025-11-17 13:13 ` Greg Kroah-Hartman
2025-11-17 13:31 ` Geert Uytterhoeven
2025-11-18 2:36 ` Greg Kroah-Hartman
2025-11-18 7:46 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox