[RFC PATCH 1/2] ARM: use generic strnlen_user and strncpy_from_user functions

Will Deacon will.deacon at arm.com
Wed Oct 3 05:16:36 EDT 2012


On Wed, Oct 03, 2012 at 07:00:42AM +0100, Uwe Kleine-König wrote:
> On Tue, Oct 02, 2012 at 08:18:51PM +0100, Will Deacon wrote:
> > Ok, thanks for the heads-up. I didn't test it with an M-class CPU, but
> > hopefully that's understandable :)
>
> I think so, yes. But I intend to change that, and I heard your coworker
> gets an efm32 :-)

Yep, he'll be in charge of testing for us (!)

> > > > +#define user_addr_max() \
> > > > +	(segment_eq(get_fs(), USER_DS) ? TASK_SIZE : ~0UL)
> > > > +
> > > I think this is the problem as for no-mmu USER_DS == KERNEL_DS. I will
> > > take a look tomorrow.
> > 
> > I can't immediately see why that would cause a problem, so please let me
> > know if you get more information.
> BTW, I once saw the call to sys_mount fail:
> 
> 	sys_mount ->
> 	copy_mount_string ->
> 	strndup_user ->
> 	strnlen_user returns 0 which makes sys_mount fail with -EFAULT.
> 
> but that was not the problem I hit when I bisected (using merges instead
> of rebasing).

Was this also on your M3?

> We have a bank holiday today in Germany, so it's still tomorrow when I
> will look into the problem. So I hope to be able to give more details
> soon.

Ok, have a good day off.

Will



More information about the linux-arm-kernel mailing list