----- Original Message ----- > From: "Eyal Ben David" <bdeyal@xxxxxxxxx> > To: "Ewan D. Milne" <emilne@xxxxxxxxxx> > Cc: "Johannes Thumshirn" <jthumshirn@xxxxxxx>, dgilbert@xxxxxxxxxxxx, "Laurence Oberman" <loberman@xxxxxxxxxx>, > linux-scsi@xxxxxxxxxxxxxxx > Sent: Tuesday, November 22, 2016 3:55:44 PM > Subject: Re: SG does not ignore dxferp (direct io + mmap) > > On Tue, Nov 22, 2016 at 8:30 PM, Ewan D. Milne <emilne@xxxxxxxxxx> wrote: > > > > I see the behavior (zero byte) on the 4.4.34, 4.5.7, 4.6.7, and 4.7.10 > > -stable kernels. But not (of course) on 4.8.10 -stable. > > > > It doesn't look like the sg driver, might be something in the mmap code? > > > A kernel guy colleague suggested to look at copy_from_user / copy_to_user > code. > It was changed in 4.8 > > It was OK with 3.13 (Ubuntu 14.04) but from some kernel (prior or equal to > 4.4) > until 4.7 we see the bug. It was somehow fixed at 4.8. > > In order to fully understand what happened, there are two changes to find. > They might not even be related. > > Thanks! > Eyal > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > So 4.7.9 fails and 4.8.0 works and 4.8.0 is a rebase so we have [loberman@localhost linux-stable-4.8.10]$ git log --oneline v4.7.9..v4.8 | wc -l 14552 No obvious single commits stand out for me for copy_from* or copy_to* There is this: 3fa6c50 mm: optimize copy_page_to/from_iter_iovec 6e05050 sh: fix copy_from_user() e697100 x86/uaccess: force copy_*_user() to be inlined I will have to do this the hard way with bisects to figure out which commit addresses this. Back when I have had enough time to do it. Thanks Laurence -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html