Re: sys_kcmp (was: Re: [PATCH 1/2] ARM: add finit_module syscall toARM)

From: Cyrill Gorcunov
Date: Mon Sep 24 2012 - 14:55:44 EST


On Mon, Sep 24, 2012 at 02:16:09PM -0400, Mark Salter wrote:
> > > > #else
> > > > +#define mmap_min_addr 0UL
> > > > #define dac_mmap_min_addr 0UL
> > > > #endif
> > > >
> >
> > I think better to add CONFIG_MMU test here.
>
> Well, my patch was just something quick to get the kernel to build, but
> thinking about it a bit, I still prefer it. The CONFIG_MMU check is in
> security.h already so I think it is less clutter and better for future
> code which may use mmap_min_addr. In any case, the compiler will drop
> any test for "x < 0UL" so the end result is the same.

Well, sure compiler should optimize it out but frankly i prefer #ifdef here.
Anyway, i'm cooking some new patch. Will post once it's ready and tested.
--
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/