All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] uselib: default depending if libc5 was used
@ 2015-11-27 11:14 Riku Voipio
  2015-11-27 20:07 ` Josh Triplett
  0 siblings, 1 reply; 7+ messages in thread
From: Riku Voipio @ 2015-11-27 11:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Riku Voipio, Josh Triplett

uselib hasn't been used since libc5; glibc does not use it.
Deprecate uselib a bit more, by making the default y only
if libc5 was widely used on the plaform.

This makes arm64 kernel built with defconfig slighly smaller

bloat-o-meter:
add/remove: 0/3 grow/shrink: 0/2 up/down: 0/-1390 (-1390)
function                                     old     new   delta
kernel_config_data                         18164   18162      -2
uselib_flags                                  20       -     -20
padzero                                      216     192     -24
sys_uselib                                   380       -    -380
load_elf_library                             964       -    -964

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Cc: Josh Triplett <josh@joshtriplett.org>
---
v2: Disable on X86_64 if no 32bit support
 init/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/Kconfig b/init/Kconfig
index c24b6f7..a4bc657 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -285,7 +285,7 @@ config FHANDLE
 
 config USELIB
 	bool "uselib syscall"
-	default y
+	def_bool ALPHA || M68K || SPARC || X86_32 || (X86_64 && IA32_EMULATION)
 	help
 	  This option enables the uselib syscall, a system call used in the
 	  dynamic linker from libc5 and earlier.  glibc does not use this
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] uselib: default depending if libc5 was used
  2015-11-27 11:14 [PATCH v2] uselib: default depending if libc5 was used Riku Voipio
@ 2015-11-27 20:07 ` Josh Triplett
  2015-12-01  0:31   ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Josh Triplett @ 2015-11-27 20:07 UTC (permalink / raw)
  To: Riku Voipio; +Cc: linux-kernel, akpm

On Fri, Nov 27, 2015 at 01:14:20PM +0200, Riku Voipio wrote:
> uselib hasn't been used since libc5; glibc does not use it.
> Deprecate uselib a bit more, by making the default y only
> if libc5 was widely used on the plaform.
> 
> This makes arm64 kernel built with defconfig slighly smaller
> 
> bloat-o-meter:
> add/remove: 0/3 grow/shrink: 0/2 up/down: 0/-1390 (-1390)
> function                                     old     new   delta
> kernel_config_data                         18164   18162      -2
> uselib_flags                                  20       -     -20
> padzero                                      216     192     -24
> sys_uselib                                   380       -    -380
> load_elf_library                             964       -    -964

One question below.

> v2: Disable on X86_64 if no 32bit support
>  init/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/init/Kconfig b/init/Kconfig
> index c24b6f7..a4bc657 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -285,7 +285,7 @@ config FHANDLE
>  
>  config USELIB
>  	bool "uselib syscall"
> -	default y
> +	def_bool ALPHA || M68K || SPARC || X86_32 || (X86_64 && IA32_EMULATION)

IA32_EMULATION depends on X86_64, so doesn't that reduce to:
	def_bool ALPHA || M68K || SPARC || X86_32 || IA32_EMULATION

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] uselib: default depending if libc5 was used
  2015-11-27 20:07 ` Josh Triplett
@ 2015-12-01  0:31   ` Andrew Morton
  2015-12-01  1:06     ` Josh Triplett
  2015-12-01  8:46     ` Geert Uytterhoeven
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Morton @ 2015-12-01  0:31 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Riku Voipio, linux-kernel

On Fri, 27 Nov 2015 12:07:10 -0800 Josh Triplett <josh@joshtriplett.org> wrote:

> On Fri, Nov 27, 2015 at 01:14:20PM +0200, Riku Voipio wrote:
> > uselib hasn't been used since libc5; glibc does not use it.
> > Deprecate uselib a bit more, by making the default y only
> > if libc5 was widely used on the plaform.
> > 
> > This makes arm64 kernel built with defconfig slighly smaller
> > 
> > bloat-o-meter:
> > add/remove: 0/3 grow/shrink: 0/2 up/down: 0/-1390 (-1390)
> > function                                     old     new   delta
> > kernel_config_data                         18164   18162      -2
> > uselib_flags                                  20       -     -20
> > padzero                                      216     192     -24
> > sys_uselib                                   380       -    -380
> > load_elf_library                             964       -    -964
> 
> One question below.
> 
> > v2: Disable on X86_64 if no 32bit support
> >  init/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/init/Kconfig b/init/Kconfig
> > index c24b6f7..a4bc657 100644
> > --- a/init/Kconfig
> > +++ b/init/Kconfig
> > @@ -285,7 +285,7 @@ config FHANDLE
> >  
> >  config USELIB
> >  	bool "uselib syscall"
> > -	default y
> > +	def_bool ALPHA || M68K || SPARC || X86_32 || (X86_64 && IA32_EMULATION)
> 
> IA32_EMULATION depends on X86_64, so doesn't that reduce to:
> 	def_bool ALPHA || M68K || SPARC || X86_32 || IA32_EMULATION

It's a bit old fashioned to add an expression like this at the
definition site anyway.  The cool new thing is to do

	def_bool ARCH_WANT_USELIB

then go off and define ARCH_WANT_USELIB in the appropriate places in
the per-arch Kconfig files.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] uselib: default depending if libc5 was used
  2015-12-01  0:31   ` Andrew Morton
@ 2015-12-01  1:06     ` Josh Triplett
  2015-12-01  8:46     ` Geert Uytterhoeven
  1 sibling, 0 replies; 7+ messages in thread
From: Josh Triplett @ 2015-12-01  1:06 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Riku Voipio, linux-kernel

On Mon, Nov 30, 2015 at 04:31:29PM -0800, Andrew Morton wrote:
> On Fri, 27 Nov 2015 12:07:10 -0800 Josh Triplett <josh@joshtriplett.org> wrote:
> 
> > On Fri, Nov 27, 2015 at 01:14:20PM +0200, Riku Voipio wrote:
> > > uselib hasn't been used since libc5; glibc does not use it.
> > > Deprecate uselib a bit more, by making the default y only
> > > if libc5 was widely used on the plaform.
> > > 
> > > This makes arm64 kernel built with defconfig slighly smaller
> > > 
> > > bloat-o-meter:
> > > add/remove: 0/3 grow/shrink: 0/2 up/down: 0/-1390 (-1390)
> > > function                                     old     new   delta
> > > kernel_config_data                         18164   18162      -2
> > > uselib_flags                                  20       -     -20
> > > padzero                                      216     192     -24
> > > sys_uselib                                   380       -    -380
> > > load_elf_library                             964       -    -964
> > 
> > One question below.
> > 
> > > v2: Disable on X86_64 if no 32bit support
> > >  init/Kconfig | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/init/Kconfig b/init/Kconfig
> > > index c24b6f7..a4bc657 100644
> > > --- a/init/Kconfig
> > > +++ b/init/Kconfig
> > > @@ -285,7 +285,7 @@ config FHANDLE
> > >  
> > >  config USELIB
> > >  	bool "uselib syscall"
> > > -	default y
> > > +	def_bool ALPHA || M68K || SPARC || X86_32 || (X86_64 && IA32_EMULATION)
> > 
> > IA32_EMULATION depends on X86_64, so doesn't that reduce to:
> > 	def_bool ALPHA || M68K || SPARC || X86_32 || IA32_EMULATION
> 
> It's a bit old fashioned to add an expression like this at the
> definition site anyway.  The cool new thing is to do
> 
> 	def_bool ARCH_WANT_USELIB
> 
> then go off and define ARCH_WANT_USELIB in the appropriate places in
> the per-arch Kconfig files.

Good point; that does seem cleaner.

- Josh Triplett

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] uselib: default depending if libc5 was used
  2015-12-01  0:31   ` Andrew Morton
  2015-12-01  1:06     ` Josh Triplett
@ 2015-12-01  8:46     ` Geert Uytterhoeven
  2015-12-01 12:35       ` Riku Voipio
  1 sibling, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2015-12-01  8:46 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Josh Triplett, Riku Voipio, linux-kernel

Hi Andrew,

On Tue, Dec 1, 2015 at 1:31 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 27 Nov 2015 12:07:10 -0800 Josh Triplett <josh@joshtriplett.org> wrote:
>> On Fri, Nov 27, 2015 at 01:14:20PM +0200, Riku Voipio wrote:
>> > uselib hasn't been used since libc5; glibc does not use it.
>> > Deprecate uselib a bit more, by making the default y only
>> > if libc5 was widely used on the plaform.
>> >
>> > This makes arm64 kernel built with defconfig slighly smaller
>> >
>> > bloat-o-meter:
>> > add/remove: 0/3 grow/shrink: 0/2 up/down: 0/-1390 (-1390)
>> > function                                     old     new   delta
>> > kernel_config_data                         18164   18162      -2
>> > uselib_flags                                  20       -     -20
>> > padzero                                      216     192     -24
>> > sys_uselib                                   380       -    -380
>> > load_elf_library                             964       -    -964
>>
>> One question below.
>>
>> > v2: Disable on X86_64 if no 32bit support
>> >  init/Kconfig | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/init/Kconfig b/init/Kconfig
>> > index c24b6f7..a4bc657 100644
>> > --- a/init/Kconfig
>> > +++ b/init/Kconfig
>> > @@ -285,7 +285,7 @@ config FHANDLE
>> >
>> >  config USELIB
>> >     bool "uselib syscall"
>> > -   default y
>> > +   def_bool ALPHA || M68K || SPARC || X86_32 || (X86_64 && IA32_EMULATION)
>>
>> IA32_EMULATION depends on X86_64, so doesn't that reduce to:
>>       def_bool ALPHA || M68K || SPARC || X86_32 || IA32_EMULATION
>
> It's a bit old fashioned to add an expression like this at the
> definition site anyway.  The cool new thing is to do
>
>         def_bool ARCH_WANT_USELIB
>
> then go off and define ARCH_WANT_USELIB in the appropriate places in
> the per-arch Kconfig files.

That's useful for new to-be-implemented features, but this dependency list is
(hopefully) cast in stone. No new architecture should need this.
So I see no reason to clutter up more Kconfig files.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] uselib: default depending if libc5 was used
  2015-12-01  8:46     ` Geert Uytterhoeven
@ 2015-12-01 12:35       ` Riku Voipio
  2015-12-01 16:23         ` Josh Triplett
  0 siblings, 1 reply; 7+ messages in thread
From: Riku Voipio @ 2015-12-01 12:35 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Andrew Morton, Josh Triplett, linux-kernel

On 1 December 2015 at 10:46, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, Dec 1, 2015 at 1:31 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
>> On Fri, 27 Nov 2015 12:07:10 -0800 Josh Triplett <josh@joshtriplett.org> wrote:
>>> IA32_EMULATION depends on X86_64, so doesn't that reduce to:
>>>       def_bool ALPHA || M68K || SPARC || X86_32 || IA32_EMULATION

Ok. looks cleaner to me.

>> It's a bit old fashioned to add an expression like this at the
>> definition site anyway.  The cool new thing is to do
>>
>>         def_bool ARCH_WANT_USELIB
>>
>> then go off and define ARCH_WANT_USELIB in the appropriate places in
>> the per-arch Kconfig files.
>
> That's useful for new to-be-implemented features, but this dependency list is
> (hopefully) cast in stone. No new architecture should need this.
> So I see no reason to clutter up more Kconfig files.

I agree. Splitting oneline patch to a patch that changes 5 files around kernel
tree only risks merge conflicts in this case.

Riku

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] uselib: default depending if libc5 was used
  2015-12-01 12:35       ` Riku Voipio
@ 2015-12-01 16:23         ` Josh Triplett
  0 siblings, 0 replies; 7+ messages in thread
From: Josh Triplett @ 2015-12-01 16:23 UTC (permalink / raw)
  To: Riku Voipio; +Cc: Geert Uytterhoeven, Andrew Morton, linux-kernel

On Tue, Dec 01, 2015 at 02:35:24PM +0200, Riku Voipio wrote:
> On 1 December 2015 at 10:46, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Tue, Dec 1, 2015 at 1:31 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
> >> On Fri, 27 Nov 2015 12:07:10 -0800 Josh Triplett <josh@joshtriplett.org> wrote:
> >>> IA32_EMULATION depends on X86_64, so doesn't that reduce to:
> >>>       def_bool ALPHA || M68K || SPARC || X86_32 || IA32_EMULATION
> 
> Ok. looks cleaner to me.
> 
> >> It's a bit old fashioned to add an expression like this at the
> >> definition site anyway.  The cool new thing is to do
> >>
> >>         def_bool ARCH_WANT_USELIB
> >>
> >> then go off and define ARCH_WANT_USELIB in the appropriate places in
> >> the per-arch Kconfig files.
> >
> > That's useful for new to-be-implemented features, but this dependency list is
> > (hopefully) cast in stone. No new architecture should need this.
> > So I see no reason to clutter up more Kconfig files.
> 
> I agree. Splitting oneline patch to a patch that changes 5 files around kernel
> tree only risks merge conflicts in this case.

True; I take back what I said about that approach being cleaner.  It
does ease maintenance in cases where the list may change, but in this
case, the list should never change again.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-12-01 16:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-27 11:14 [PATCH v2] uselib: default depending if libc5 was used Riku Voipio
2015-11-27 20:07 ` Josh Triplett
2015-12-01  0:31   ` Andrew Morton
2015-12-01  1:06     ` Josh Triplett
2015-12-01  8:46     ` Geert Uytterhoeven
2015-12-01 12:35       ` Riku Voipio
2015-12-01 16:23         ` Josh Triplett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.