Re: [PATCH 001 of 2] Prepare for __copy_from_user_inatomic to not zero missed bytes.

From: Neil Brown
Date: Thu May 25 2006 - 08:23:35 EST


On Thursday May 25, dhowells@xxxxxxxxxx wrote:
>
> NeilBrown <neilb@xxxxxxx> wrote:
>
> > Interestingly 'frv' disables preempt in kmap_atomic, but its
> > copy_from_user doesn't expect faults and never zeros the tail...
>
> What gives you the idea that copy_from_user() on FRV doesn't expect or handle
> faults when CONFIG_MMU is set? And why do you say it never zeroes the tail?
>
> David

Sloppy reading of the code I expect :-( I was probably expecting it
to look more like what I had seen in other ARCHs.

Have looked more closely, I see that it does expect and handle faults,
and copy_from_user does zero the tail, however __copy_from_user*
does not zero the tail and this is what filemap_copy_from_user
and ntfs_copy_user* actually use, so on that arch, we seem
to fail the other way - we don't zero the tail sometimes when
we should.

Thanks for reading the patch and asking the question.

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/