Re: [PATCH] m68k: Use generic strncpy_from_user(), strlen_user(),and strnlen_user()

From: Philippe De Muyter
Date: Wed Jun 06 2012 - 11:20:33 EST


Hi Geert,

On Wed, Jun 06, 2012 at 03:44:03PM +0200, Geert Uytterhoeven wrote:
> On Wed, May 30, 2012 at 4:04 PM, Philippe De Muyter <phdm@xxxxxxxxx> wrote:
> >> > Sorry, I did not follow what happened to unaligned accesses, but
> >> > CPU32 family (at least 68340) crashes on unaligned accesses.
> >>
> >> We don't seem to have CONFIG_M68340 in arch/m68k/Kconfig.cpu?
> >
> > I have a local port here (but based on an ancient linux kernel, 2.6.2 IIRC)
>
> Just to be sure: basically include/asm-m68knommu/unaligned.h has always
> been wrong (also in 2.6.2), so you had to fix this locally?

I have just verified, and you are right :

include/asm-m68knommu/unaligned.h was wrong in 2.6.2

But I did not have to fix it locally.

I remember the ppp driver kernel doing by error unaligned accesses
(of course without using unaligned macros) and crashing my kernel.
I fixed the error in the ppp driver and the fix went into the
mainline kernel.

I am not aware that unaligned macros were used in the parts of the
kernel I used on this board. Just to be sure I made a quick list :

$ find -name \*.o | sed -e 's/\.o$/.c/' | xargs grep t_unaligned 2> /dev/null
./fs/partitions/msdos.c:#define SYS_IND(p) (get_unaligned(&p->sys_ind))
./fs/partitions/msdos.c: get_unaligned(&p->nr_sects); \
./fs/partitions/msdos.c: get_unaligned(&p->start_sect); \
./drivers/net/slhc.c: put_unaligned(ip_fast_csum(icp, ip->ihl),

I am 100% sure I did not use msdos partitions on that board. I don't
know why msdos.c was compiled in. For the slhc case, I surmise that it
was not used because its usage depends on some option we did not use.

Best regards

Philippe

--
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles
--
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/