From: Bernhard Reutner-F. <rep...@gm...> - 2013-01-21 13:37:08
|
Signed-off-by: Bernhard Reutner-Fischer <rep...@gm...> --- mem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mem.c b/mem.c index 0279030..53fcf85 100644 --- a/mem.c +++ b/mem.c @@ -159,6 +159,9 @@ static const struct xlat mmap_flags[] = { #ifdef MAP_STACK { MAP_STACK, "MAP_STACK" }, #endif +#ifdef MAP_UNINITIALIZE + { MAP_UNINITIALIZE,"MAP_UNINITIALIZE"}, +#endif #ifdef MAP_NOSYNC { MAP_NOSYNC, "MAP_NOSYNC" }, #endif -- 1.7.10.4 |
From: Bernhard Reutner-F. <rep...@gm...> - 2013-01-21 13:37:08
|
Signed-off-by: Bernhard Reutner-Fischer <rep...@gm...> --- system.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system.c b/system.c index 270bd5b..bc284aa 100644 --- a/system.c +++ b/system.c @@ -56,6 +56,7 @@ #define MS_KERNMOUNT (1<<22) #define MS_I_VERSION (1<<23) #define MS_STRICTATIME (1<<24) +#define MS_NOSEC (1<<28) #define MS_BORN (1<<29) #define MS_ACTIVE (1<<30) #define MS_NOUSER (1<<31) @@ -91,6 +92,7 @@ static const struct xlat mount_flags[] = { { MS_KERNMOUNT, "MS_KERNMOUNT" }, { MS_I_VERSION, "MS_I_VERSION" }, { MS_STRICTATIME,"MS_STRICTATIME"}, + { MS_NOSEC, "MS_NOSEC" }, { MS_BORN, "MS_BORN" }, { MS_MANDLOCK, "MS_MANDLOCK" }, { MS_NOATIME, "MS_NOATIME" }, -- 1.7.10.4 |
From: Dmitry V. L. <ld...@al...> - 2013-01-21 14:23:30
|
On Mon, Jan 21, 2013 at 02:36:55PM +0100, Bernhard Reutner-Fischer wrote: > Signed-off-by: Bernhard Reutner-Fischer <rep...@gm...> > --- > mem.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/mem.c b/mem.c > index 0279030..53fcf85 100644 > --- a/mem.c > +++ b/mem.c > @@ -159,6 +159,9 @@ static const struct xlat mmap_flags[] = { > #ifdef MAP_STACK > { MAP_STACK, "MAP_STACK" }, > #endif > +#ifdef MAP_UNINITIALIZE > + { MAP_UNINITIALIZE,"MAP_UNINITIALIZE"}, > +#endif > #ifdef MAP_NOSYNC > { MAP_NOSYNC, "MAP_NOSYNC" }, > #endif You mean MAP_UNINITIALIZED? -- ldv |
From: Bernhard Reutner-F. <rep...@gm...> - 2013-01-22 09:16:51
|
On 21 January 2013 15:23, Dmitry V. Levin <ld...@al...> wrote: > On Mon, Jan 21, 2013 at 02:36:55PM +0100, Bernhard Reutner-Fischer wrote: >> Signed-off-by: Bernhard Reutner-Fischer <rep...@gm...> >> --- >> mem.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/mem.c b/mem.c >> index 0279030..53fcf85 100644 >> --- a/mem.c >> +++ b/mem.c >> @@ -159,6 +159,9 @@ static const struct xlat mmap_flags[] = { >> #ifdef MAP_STACK >> { MAP_STACK, "MAP_STACK" }, >> #endif >> +#ifdef MAP_UNINITIALIZE >> + { MAP_UNINITIALIZE,"MAP_UNINITIALIZE"}, >> +#endif >> #ifdef MAP_NOSYNC >> { MAP_NOSYNC, "MAP_NOSYNC" }, >> #endif > > You mean MAP_UNINITIALIZED? ugh, it seems that the name changed mid-flight :( So yes, i mean MAP_UNINITIALIZED, i will change uClibc to add the 'D'. Do you want me to resend this hunk with the D added or can you take care of this? thanks, |
From: Dmitry V. L. <ld...@al...> - 2013-01-22 09:35:29
|
On Tue, Jan 22, 2013 at 10:16:42AM +0100, Bernhard Reutner-Fischer wrote: > On 21 January 2013 15:23, Dmitry V. Levin <ld...@al...> wrote: > > On Mon, Jan 21, 2013 at 02:36:55PM +0100, Bernhard Reutner-Fischer wrote: > >> Signed-off-by: Bernhard Reutner-Fischer <rep...@gm...> > >> --- > >> mem.c | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/mem.c b/mem.c > >> index 0279030..53fcf85 100644 > >> --- a/mem.c > >> +++ b/mem.c > >> @@ -159,6 +159,9 @@ static const struct xlat mmap_flags[] = { > >> #ifdef MAP_STACK > >> { MAP_STACK, "MAP_STACK" }, > >> #endif > >> +#ifdef MAP_UNINITIALIZE > >> + { MAP_UNINITIALIZE,"MAP_UNINITIALIZE"}, > >> +#endif > >> #ifdef MAP_NOSYNC > >> { MAP_NOSYNC, "MAP_NOSYNC" }, > >> #endif > > > > You mean MAP_UNINITIALIZED? > > ugh, it seems that the name changed mid-flight :( > So yes, i mean MAP_UNINITIALIZED, i will change uClibc to add the 'D'. OK, is there a chance to get MAP_UNINITIALIZED defined to 0? If yes, then there needs to be a check for that case, e.g. #if MAP_UNINITIALIZED > 0 -- ldv |
From: Bernhard Reutner-F. <rep...@gm...> - 2013-01-22 17:09:56
|
On 22 January 2013 10:35, Dmitry V. Levin <ld...@al...> wrote: > On Tue, Jan 22, 2013 at 10:16:42AM +0100, Bernhard Reutner-Fischer wrote: >> On 21 January 2013 15:23, Dmitry V. Levin <ld...@al...> wrote: >> > On Mon, Jan 21, 2013 at 02:36:55PM +0100, Bernhard Reutner-Fischer wrote: >> >> Signed-off-by: Bernhard Reutner-Fischer <rep...@gm...> >> >> --- >> >> mem.c | 3 +++ >> >> 1 file changed, 3 insertions(+) >> >> >> >> diff --git a/mem.c b/mem.c >> >> index 0279030..53fcf85 100644 >> >> --- a/mem.c >> >> +++ b/mem.c >> >> @@ -159,6 +159,9 @@ static const struct xlat mmap_flags[] = { >> >> #ifdef MAP_STACK >> >> { MAP_STACK, "MAP_STACK" }, >> >> #endif >> >> +#ifdef MAP_UNINITIALIZE >> >> + { MAP_UNINITIALIZE,"MAP_UNINITIALIZE"}, >> >> +#endif >> >> #ifdef MAP_NOSYNC >> >> { MAP_NOSYNC, "MAP_NOSYNC" }, >> >> #endif >> > >> > You mean MAP_UNINITIALIZED? >> >> ugh, it seems that the name changed mid-flight :( >> So yes, i mean MAP_UNINITIALIZED, i will change uClibc to add the 'D'. > > OK, is there a chance to get MAP_UNINITIALIZED defined to 0? AFAICS no. > If yes, then there needs to be a check for that case, e.g. > #if MAP_UNINITIALIZED > 0 #if defined MAP_UNINITIALIZED && MAP_UNINITIALIZED + 0 > 0 for a redundant, exhaustive check but no, it is always 0x4000000 |
From: Dmitry V. L. <ld...@al...> - 2013-01-22 18:55:01
|
On Tue, Jan 22, 2013 at 06:09:50PM +0100, Bernhard Reutner-Fischer wrote: > On 22 January 2013 10:35, Dmitry V. Levin <ld...@al...> wrote: > > On Tue, Jan 22, 2013 at 10:16:42AM +0100, Bernhard Reutner-Fischer wrote: > >> On 21 January 2013 15:23, Dmitry V. Levin <ld...@al...> wrote: > >> > On Mon, Jan 21, 2013 at 02:36:55PM +0100, Bernhard Reutner-Fischer wrote: > >> >> Signed-off-by: Bernhard Reutner-Fischer <rep...@gm...> > >> >> --- > >> >> mem.c | 3 +++ > >> >> 1 file changed, 3 insertions(+) > >> >> > >> >> diff --git a/mem.c b/mem.c > >> >> index 0279030..53fcf85 100644 > >> >> --- a/mem.c > >> >> +++ b/mem.c > >> >> @@ -159,6 +159,9 @@ static const struct xlat mmap_flags[] = { > >> >> #ifdef MAP_STACK > >> >> { MAP_STACK, "MAP_STACK" }, > >> >> #endif > >> >> +#ifdef MAP_UNINITIALIZE > >> >> + { MAP_UNINITIALIZE,"MAP_UNINITIALIZE"}, > >> >> +#endif > >> >> #ifdef MAP_NOSYNC > >> >> { MAP_NOSYNC, "MAP_NOSYNC" }, > >> >> #endif > >> > > >> > You mean MAP_UNINITIALIZED? > >> > >> ugh, it seems that the name changed mid-flight :( > >> So yes, i mean MAP_UNINITIALIZED, i will change uClibc to add the 'D'. > > > > OK, is there a chance to get MAP_UNINITIALIZED defined to 0? > > AFAICS no. linux/include/uapi/asm-generic/mman-common.h contains this: #ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED # define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */ #else # define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ #endif So I'm not quite sure it cannot be defined to 0x0. > > If yes, then there needs to be a check for that case, e.g. > > #if MAP_UNINITIALIZED > 0 > > #if defined MAP_UNINITIALIZED && MAP_UNINITIALIZED + 0 > 0 > for a redundant, exhaustive check but no, it is always 0x4000000 Is there any need for this " + 0" arithemtics? -- ldv |
From: Mike F. <va...@ge...> - 2013-01-22 18:06:14
Attachments:
signature.asc
|
On Tuesday 22 January 2013 04:16:42 Bernhard Reutner-Fischer wrote: > On 21 January 2013 15:23, Dmitry V. Levin <ld...@al...> wrote: > > On Mon, Jan 21, 2013 at 02:36:55PM +0100, Bernhard Reutner-Fischer wrote: > >> --- a/mem.c > >> +++ b/mem.c > >> > >> +#ifdef MAP_UNINITIALIZE > >> + { MAP_UNINITIALIZE,"MAP_UNINITIALIZE"}, > >> +#endif > > > > You mean MAP_UNINITIALIZED? > > ugh, it seems that the name changed mid-flight :( > So yes, i mean MAP_UNINITIALIZED, i will change uClibc to add the 'D'. > Do you want me to resend this hunk with the D added or can you take > care of this? we named it MAP_UNINITIALIZE when we first implemented it on the Blackfin side, but it was tweaked while getting merged to mainline linux. we forgot to update the uClibc side and no one noticed because userland provides its own defines rather than including kernel headers :). -mike |
From: Dmitry V. L. <ld...@al...> - 2013-01-22 18:56:31
|
On Tue, Jan 22, 2013 at 01:10:13PM -0500, Mike Frysinger wrote: > On Tuesday 22 January 2013 04:16:42 Bernhard Reutner-Fischer wrote: > > On 21 January 2013 15:23, Dmitry V. Levin <ld...@al...> wrote: > > > On Mon, Jan 21, 2013 at 02:36:55PM +0100, Bernhard Reutner-Fischer wrote: > > >> --- a/mem.c > > >> +++ b/mem.c > > >> > > >> +#ifdef MAP_UNINITIALIZE > > >> + { MAP_UNINITIALIZE,"MAP_UNINITIALIZE"}, > > >> +#endif > > > > > > You mean MAP_UNINITIALIZED? > > > > ugh, it seems that the name changed mid-flight :( > > So yes, i mean MAP_UNINITIALIZED, i will change uClibc to add the 'D'. > > Do you want me to resend this hunk with the D added or can you take > > care of this? > > we named it MAP_UNINITIALIZE when we first implemented it on the Blackfin side, > but it was tweaked while getting merged to mainline linux. we forgot to > update the uClibc side and no one noticed because userland provides its own > defines rather than including kernel headers :). Shouldn't MAP_UNINITIALIZED be also added to glibc then? -- ldv |
From: Mike F. <va...@ge...> - 2013-01-22 21:54:11
Attachments:
signature.asc
|
On Tuesday 22 January 2013 13:56:24 Dmitry V. Levin wrote: > On Tue, Jan 22, 2013 at 01:10:13PM -0500, Mike Frysinger wrote: > > On Tuesday 22 January 2013 04:16:42 Bernhard Reutner-Fischer wrote: > > > On 21 January 2013 15:23, Dmitry V. Levin wrote: > > > > On Mon, Jan 21, 2013 Bernhard Reutner-Fischer wrote: > > > >> --- a/mem.c > > > >> +++ b/mem.c > > > >> > > > >> +#ifdef MAP_UNINITIALIZE > > > >> + { MAP_UNINITIALIZE,"MAP_UNINITIALIZE"}, > > > >> +#endif > > > > > > > > You mean MAP_UNINITIALIZED? > > > > > > ugh, it seems that the name changed mid-flight :( > > > So yes, i mean MAP_UNINITIALIZED, i will change uClibc to add the 'D'. > > > Do you want me to resend this hunk with the D added or can you take > > > care of this? > > > > we named it MAP_UNINITIALIZE when we first implemented it on the Blackfin > > side, but it was tweaked while getting merged to mainline linux. we > > forgot to update the uClibc side and no one noticed because userland > > provides its own defines rather than including kernel headers :). > > Shouldn't MAP_UNINITIALIZED be also added to glibc then? in theory, yes, and someone will probably do it at some point as part of a general sync. in practice, it doesn't really matter because the flag is only respected on nommu kernel builds (and only if you opted into it in your kernel build), and glibc cannot run under a nommu kernel. i guess the only time it might matter is if you took a program compiled against uClibc for a nommu target (e.g. arm/nommu) and ran it under a kernel that had mmu support (e.g. arm/mmu) with a glibc userland. but that seems pretty uncommon :). -mike |