* [PATCH] powerpc: compile kernel for linkstations optimized for size @ 2008-10-13 4:07 Rogério Brito 2008-10-13 4:51 ` [PATCH] powerpc: enable heap randomization for linkstations Rogério Brito ` (3 more replies) 0 siblings, 4 replies; 14+ messages in thread From: Rogério Brito @ 2008-10-13 4:07 UTC (permalink / raw) To: linux-kernel; +Cc: linuxppc-dev, akpm, rbrito From: Rogério Brito <rbrito@ime.usp.br> Since Linkstations and Kuroboxes often have *very* little memory (as they are embedded systems), it is desirable to get their kernels compiled optimized for size. Signed-off-by: Rogério Brito <rbrito@ime.usp.br> --- I have been using kernels optimized for size on my Kurobox (standard) for many different releases and I have experienced no problem with this option enabled. Thus, this patch. --- linux/arch/powerpc/configs/linkstation_defconfig.old 2008-10-13 00:33:00.000000000 -0300 +++ linux/arch/powerpc/configs/linkstation_defconfig 2008-10-13 00:38:58.000000000 -0300 @@ -90,7 +90,7 @@ CONFIG_NAMESPACES=y # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y # CONFIG_EMBEDDED is not set CONFIG_SYSCTL_SYSCALL=y -- Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] powerpc: enable heap randomization for linkstations 2008-10-13 4:07 [PATCH] powerpc: compile kernel for linkstations optimized for size Rogério Brito @ 2008-10-13 4:51 ` Rogério Brito 2008-10-13 18:05 ` Guennadi Liakhovetski ` (2 more replies) 2008-10-13 18:03 ` [PATCH] powerpc: compile kernel for linkstations optimized for size Guennadi Liakhovetski ` (2 subsequent siblings) 3 siblings, 3 replies; 14+ messages in thread From: Rogério Brito @ 2008-10-13 4:51 UTC (permalink / raw) To: linux-kernel; +Cc: linuxppc-dev, akpm, rbrito The current defconfig for Linkstation/Kuroboxes has the "Disable Heap Randomization" option enabled. Since some of these machines are facing the internet, it helps to have heap randomization enabled. This patch enables it. Signed-off-by: Rogério Brito <rbrito@ime.usp.br> --- --- linux/arch/powerpc/configs/linkstation_defconfig.old 2008-10-13 00:33:00.000000000 -0300 +++ linux/arch/powerpc/configs/linkstation_defconfig 2008-10-13 01:11:28.000000000 -0300 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.27-rc4 -# Thu Aug 21 00:52:05 2008 +# Linux kernel version: 2.6.27 +# Mon Oct 13 01:11:21 2008 # # CONFIG_PPC64 is not set @@ -101,7 +101,7 @@ CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y -CONFIG_COMPAT_BRK=y +# CONFIG_COMPAT_BRK is not set CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_ANON_INODES=y @@ -1211,7 +1211,6 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_ALAUDA is not set # CONFIG_USB_STORAGE_ONETOUCH is not set # CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_STORAGE_SIERRA is not set # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set # CONFIG_USB_LIBUSUAL is not set -- Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: enable heap randomization for linkstations 2008-10-13 4:51 ` [PATCH] powerpc: enable heap randomization for linkstations Rogério Brito @ 2008-10-13 18:05 ` Guennadi Liakhovetski 2008-10-13 18:44 ` Scott Wood 2008-10-17 9:38 ` Rogério Brito 2008-10-28 13:58 ` Kumar Gala 2 siblings, 1 reply; 14+ messages in thread From: Guennadi Liakhovetski @ 2008-10-13 18:05 UTC (permalink / raw) To: Rogério Brito; +Cc: linux-kernel, linuxppc-dev, akpm On Mon, 13 Oct 2008, Rogério Brito wrote: > The current defconfig for Linkstation/Kuroboxes has the "Disable Heap > Randomization" option enabled. > > Since some of these machines are facing the internet, it helps to have > heap randomization enabled. This patch enables it. Same as the previous patch - this is one of options, that users select according to their needs. If any specific distribution enables this option by default in their kernels, they can do this too, don't think this is critical enough to patch the defconfig. Thanks Guennadi > > > Signed-off-by: Rogério Brito <rbrito@ime.usp.br> > > --- > > --- linux/arch/powerpc/configs/linkstation_defconfig.old 2008-10-13 00:33:00.000000000 -0300 > +++ linux/arch/powerpc/configs/linkstation_defconfig 2008-10-13 01:11:28.000000000 -0300 > @@ -1,7 +1,7 @@ > # > # Automatically generated make config: don't edit > -# Linux kernel version: 2.6.27-rc4 > -# Thu Aug 21 00:52:05 2008 > +# Linux kernel version: 2.6.27 > +# Mon Oct 13 01:11:21 2008 > # > # CONFIG_PPC64 is not set > > @@ -101,7 +101,7 @@ CONFIG_HOTPLUG=y > CONFIG_PRINTK=y > CONFIG_BUG=y > CONFIG_ELF_CORE=y > -CONFIG_COMPAT_BRK=y > +# CONFIG_COMPAT_BRK is not set > CONFIG_BASE_FULL=y > CONFIG_FUTEX=y > CONFIG_ANON_INODES=y > @@ -1211,7 +1211,6 @@ CONFIG_USB_STORAGE=m > # CONFIG_USB_STORAGE_ALAUDA is not set > # CONFIG_USB_STORAGE_ONETOUCH is not set > # CONFIG_USB_STORAGE_KARMA is not set > -# CONFIG_USB_STORAGE_SIERRA is not set > # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set > # CONFIG_USB_LIBUSUAL is not set > > > -- > Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 > http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito > Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev > --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: enable heap randomization for linkstations 2008-10-13 18:05 ` Guennadi Liakhovetski @ 2008-10-13 18:44 ` Scott Wood 2008-10-13 19:27 ` Guennadi Liakhovetski ` (2 more replies) 0 siblings, 3 replies; 14+ messages in thread From: Scott Wood @ 2008-10-13 18:44 UTC (permalink / raw) To: Guennadi Liakhovetski Cc: Rogério Brito, linuxppc-dev, akpm, linux-kernel On Mon, Oct 13, 2008 at 08:05:09PM +0200, Guennadi Liakhovetski wrote: > On Mon, 13 Oct 2008, Rogério Brito wrote: > > > The current defconfig for Linkstation/Kuroboxes has the "Disable Heap > > Randomization" option enabled. > > > > Since some of these machines are facing the internet, it helps to have > > heap randomization enabled. This patch enables it. > > Same as the previous patch - this is one of options, that users select > according to their needs. If any specific distribution enables this option > by default in their kernels, they can do this too, don't think this is > critical enough to patch the defconfig. Just because users/distros can change it doesn't mean it's pointless to discuss what default is sane, and make changes if the current default isn't. For security-related options it's usually best to default to the more secure state, especially since the option description talks about it being needed mainly for libc5 compatibility -- did libc5 ever even exist for powerpc? The only reason it was turned on in the first place was likely the "default y", which in turn is there to avoid breaking old x86 distros. -Scott ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: enable heap randomization for linkstations 2008-10-13 18:44 ` Scott Wood @ 2008-10-13 19:27 ` Guennadi Liakhovetski 2008-10-13 20:56 ` Rogério Brito 2008-10-19 2:53 ` Rogério Brito 2 siblings, 0 replies; 14+ messages in thread From: Guennadi Liakhovetski @ 2008-10-13 19:27 UTC (permalink / raw) To: Scott Wood; +Cc: Rogério Brito, linuxppc-dev, akpm, linux-kernel On Mon, 13 Oct 2008, Scott Wood wrote: > On Mon, Oct 13, 2008 at 08:05:09PM +0200, Guennadi Liakhovetski wrote: > > On Mon, 13 Oct 2008, Rogério Brito wrote: > > > > > The current defconfig for Linkstation/Kuroboxes has the "Disable Heap > > > Randomization" option enabled. > > > > > > Since some of these machines are facing the internet, it helps to have > > > heap randomization enabled. This patch enables it. > > > > Same as the previous patch - this is one of options, that users select > > according to their needs. If any specific distribution enables this option > > by default in their kernels, they can do this too, don't think this is > > critical enough to patch the defconfig. > > Just because users/distros can change it doesn't mean it's pointless to > discuss what default is sane, and make changes if the current default > isn't. > > For security-related options it's usually best to default to the more > secure state, especially since the option description talks about it > being needed mainly for libc5 compatibility -- did libc5 ever even exist > for powerpc? In a 2.6.27-rc5-ish snapshot I counted 68 enabled and 11 disabled CONFIG_COMPAT_BRK under arch/powerpc/configs/. Ok, enabling it for all would be a bit rude, and one has to start somewhere... > The only reason it was turned on in the first place was likely the > "default y", which in turn is there to avoid breaking old x86 distros. Then maybe it would be better to make default y only for some platforms? Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: enable heap randomization for linkstations 2008-10-13 18:44 ` Scott Wood 2008-10-13 19:27 ` Guennadi Liakhovetski @ 2008-10-13 20:56 ` Rogério Brito 2008-10-19 2:53 ` Rogério Brito 2 siblings, 0 replies; 14+ messages in thread From: Rogério Brito @ 2008-10-13 20:56 UTC (permalink / raw) To: Scott Wood; +Cc: Guennadi Liakhovetski, linuxppc-dev, akpm, linux-kernel Hi, Scott, Guennadi. On 13/10/2008, at 16:44, Scott Wood wrote: > On Mon, Oct 13, 2008 at 08:05:09PM +0200, Guennadi Liakhovetski wrote: >> On Mon, 13 Oct 2008, Rogério Brito wrote: >> >>> The current defconfig for Linkstation/Kuroboxes has the "Disable >>> Heap >>> Randomization" option enabled. >>> >>> Since some of these machines are facing the internet, it helps to >>> have >>> heap randomization enabled. This patch enables it. >> >> Same as the previous patch - this is one of options, that users >> select >> according to their needs. If any specific distribution enables >> this option >> by default in their kernels, they can do this too, don't think >> this is >> critical enough to patch the defconfig. I think that the matter is not being critical or not, but of including a sane default as the kernel should be a place for best- current-practices. > Just because users/distros can change it doesn't mean it's > pointless to > discuss what default is sane, and make changes if the current default > isn't. Exactly my point. > For security-related options it's usually best to default to the more > secure state, especially since the option description talks about it > being needed mainly for libc5 compatibility -- did libc5 ever even > exist > for powerpc? I don't know, but even Debian's very ancient distributions all came with libc6 on powerpc. > The only reason it was turned on in the first place was likely the > "default y", which in turn is there to avoid breaking old x86 distros. Exactly. Agreed 100%. Regards, Rogério Brito. -- Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: enable heap randomization for linkstations 2008-10-13 18:44 ` Scott Wood 2008-10-13 19:27 ` Guennadi Liakhovetski 2008-10-13 20:56 ` Rogério Brito @ 2008-10-19 2:53 ` Rogério Brito 2008-10-19 3:16 ` Rogério Brito 2 siblings, 1 reply; 14+ messages in thread From: Rogério Brito @ 2008-10-19 2:53 UTC (permalink / raw) To: Scott Wood Cc: Guennadi Liakhovetski, linuxppc-dev, akpm, linux-kernel, paulus, benh Hi. On Oct 13 2008, Scott Wood wrote: > On Mon, Oct 13, 2008 at 08:05:09PM +0200, Guennadi Liakhovetski wrote: > > On Mon, 13 Oct 2008, Rogério Brito wrote: > > > The current defconfig for Linkstation/Kuroboxes has the "Disable > > > Heap Randomization" option enabled. > > > > > > Since some of these machines are facing the internet, it helps to > > > have heap randomization enabled. This patch enables it. > > > > Same as the previous patch - this is one of options, that users > > select according to their needs. If any specific distribution > > enables this option by default in their kernels, they can do this > > too, don't think this is critical enough to patch the defconfig. I guess, Guennadi, that this is questionable. Many people would base their configs on the defconfig. Also, the defconfig has many questionable settings for an embedded platform like the Kurobox. And it seems that there is something not quite right for these embedded systems. Here is something that I get with a vanilla linkstation_defconfig: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - drivers/rtc/hctosys.c: unable to open rtc device (rtc0) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This gets me (with bootlogd enabled): - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Wed Dec 31 21:00:15 1969: Cannot access the Hardware Clock via any known method. Wed Dec 31 21:00:15 1969: Use the --debug option to see the details of our search for an access method. Wed Dec 31 21:00:15 1969: Unable to set System Clock to: Thu Jan 1 00:00:15 UTC 1970 ^[[33m(warning).^[[39;49m - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I just saw that in the default config: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # CONFIG_PPC_CLOCK is not set - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Maybe this should be enabled? I can iterate once more to see if this option would make any difference here. > Just because users/distros can change it doesn't mean it's pointless > to discuss what default is sane, and make changes if the current > default isn't. 100% agreed again, Scott. To repeat myself here, I think that the defconfig should show the users the best current practices. > For security-related options it's usually best to default to the more > secure state, especially since the option description talks about it > being needed mainly for libc5 compatibility -- did libc5 ever even > exist for powerpc? > > The only reason it was turned on in the first place was likely the > "default y", which in turn is there to avoid breaking old x86 distros. I'm including both Paul and BenH here. Regards, Rogério Brito. -- Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: enable heap randomization for linkstations 2008-10-19 2:53 ` Rogério Brito @ 2008-10-19 3:16 ` Rogério Brito 0 siblings, 0 replies; 14+ messages in thread From: Rogério Brito @ 2008-10-19 3:16 UTC (permalink / raw) To: Scott Wood Cc: Guennadi Liakhovetski, linuxppc-dev, akpm, linux-kernel, paulus, benh, rbrito Hi again. On Oct 18 2008, Rogério Brito wrote: > And it seems that there is something not quite right for these embedded > systems. Here is something that I get with a vanilla linkstation_defconfig: > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > drivers/rtc/hctosys.c: unable to open rtc device (rtc0) > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (...) > I just saw that in the default config: > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # CONFIG_PPC_CLOCK is not set > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > Maybe this should be enabled? I can iterate once more to see if this > option would make any difference here. Even if I enable this option, I still get the same problem as above. :-( Regards, Rogério Brito. -- Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: enable heap randomization for linkstations 2008-10-13 4:51 ` [PATCH] powerpc: enable heap randomization for linkstations Rogério Brito 2008-10-13 18:05 ` Guennadi Liakhovetski @ 2008-10-17 9:38 ` Rogério Brito 2008-10-28 13:58 ` Kumar Gala 2 siblings, 0 replies; 14+ messages in thread From: Rogério Brito @ 2008-10-17 9:38 UTC (permalink / raw) To: linux-kernel; +Cc: linuxppc-dev, akpm, paulus Hi, This other patch was also sent some days ago and I would appreciate some feedback on it. Regards, Rogério Brito. On Oct 13 2008, Rogério Brito wrote: > The current defconfig for Linkstation/Kuroboxes has the "Disable Heap > Randomization" option enabled. > > Since some of these machines are facing the internet, it helps to have > heap randomization enabled. This patch enables it. > > > Signed-off-by: Rogério Brito <rbrito@ime.usp.br> > > --- > > --- linux/arch/powerpc/configs/linkstation_defconfig.old 2008-10-13 00:33:00.000000000 -0300 > +++ linux/arch/powerpc/configs/linkstation_defconfig 2008-10-13 01:11:28.000000000 -0300 > @@ -1,7 +1,7 @@ > # > # Automatically generated make config: don't edit > -# Linux kernel version: 2.6.27-rc4 > -# Thu Aug 21 00:52:05 2008 > +# Linux kernel version: 2.6.27 > +# Mon Oct 13 01:11:21 2008 > # > # CONFIG_PPC64 is not set > > @@ -101,7 +101,7 @@ CONFIG_HOTPLUG=y > CONFIG_PRINTK=y > CONFIG_BUG=y > CONFIG_ELF_CORE=y > -CONFIG_COMPAT_BRK=y > +# CONFIG_COMPAT_BRK is not set > CONFIG_BASE_FULL=y > CONFIG_FUTEX=y > CONFIG_ANON_INODES=y > @@ -1211,7 +1211,6 @@ CONFIG_USB_STORAGE=m > # CONFIG_USB_STORAGE_ALAUDA is not set > # CONFIG_USB_STORAGE_ONETOUCH is not set > # CONFIG_USB_STORAGE_KARMA is not set > -# CONFIG_USB_STORAGE_SIERRA is not set > # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set > # CONFIG_USB_LIBUSUAL is not set > > > -- > Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 > http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito > Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org -- Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: enable heap randomization for linkstations 2008-10-13 4:51 ` [PATCH] powerpc: enable heap randomization for linkstations Rogério Brito 2008-10-13 18:05 ` Guennadi Liakhovetski 2008-10-17 9:38 ` Rogério Brito @ 2008-10-28 13:58 ` Kumar Gala 2 siblings, 0 replies; 14+ messages in thread From: Kumar Gala @ 2008-10-28 13:58 UTC (permalink / raw) To: Rogério Brito; +Cc: linux-kernel, linuxppc-dev, akpm On Oct 12, 2008, at 11:51 PM, Rogério Brito wrote: > The current defconfig for Linkstation/Kuroboxes has the "Disable Heap > Randomization" option enabled. > > Since some of these machines are facing the internet, it helps to have > heap randomization enabled. This patch enables it. > > > Signed-off-by: Rogério Brito <rbrito@ime.usp.br> > > --- applied to merge. - k ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: compile kernel for linkstations optimized for size 2008-10-13 4:07 [PATCH] powerpc: compile kernel for linkstations optimized for size Rogério Brito 2008-10-13 4:51 ` [PATCH] powerpc: enable heap randomization for linkstations Rogério Brito @ 2008-10-13 18:03 ` Guennadi Liakhovetski 2008-10-13 21:28 ` Rogério Brito 2008-10-17 9:37 ` Rogério Brito 2008-10-28 13:58 ` Kumar Gala 3 siblings, 1 reply; 14+ messages in thread From: Guennadi Liakhovetski @ 2008-10-13 18:03 UTC (permalink / raw) To: Rogério Brito; +Cc: linux-kernel, linuxppc-dev, akpm On Mon, 13 Oct 2008, Rogério Brito wrote: > From: Rogério Brito <rbrito@ime.usp.br> > > Since Linkstations and Kuroboxes often have *very* little memory (as > they are embedded systems), it is desirable to get their kernels > compiled optimized for size. > > Signed-off-by: Rogério Brito <rbrito@ime.usp.br> > > --- > > I have been using kernels optimized for size on my Kurobox (standard) > for many different releases and I have experienced no problem with this > option enabled. Thus, this patch. The comment for this option says: "watch out for broken compilers," if this doesn't hold any more, it should be remove, if it still holds, I wouldn't turn this on by default, as I don't think we can test all possible (cross- or native-) compilers users might want to use. In any case this is one of options that users can select themselves, if it suits them. Also I don't think your CC list is correct, you wanted to send this to the powerpc list and one of powerpc / subarch maintainer. Thanks Guennadi > > --- linux/arch/powerpc/configs/linkstation_defconfig.old 2008-10-13 00:33:00.000000000 -0300 > +++ linux/arch/powerpc/configs/linkstation_defconfig 2008-10-13 00:38:58.000000000 -0300 > @@ -90,7 +90,7 @@ CONFIG_NAMESPACES=y > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > CONFIG_INITRAMFS_SOURCE="" > -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set > +CONFIG_CC_OPTIMIZE_FOR_SIZE=y > CONFIG_SYSCTL=y > # CONFIG_EMBEDDED is not set > CONFIG_SYSCTL_SYSCALL=y > > > -- > Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 > http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito > Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev > --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: compile kernel for linkstations optimized for size 2008-10-13 18:03 ` [PATCH] powerpc: compile kernel for linkstations optimized for size Guennadi Liakhovetski @ 2008-10-13 21:28 ` Rogério Brito 0 siblings, 0 replies; 14+ messages in thread From: Rogério Brito @ 2008-10-13 21:28 UTC (permalink / raw) To: Guennadi Liakhovetski; +Cc: linux-kernel, linuxppc-dev, akpm Hi, Guennadi. On 13/10/2008, at 16:03, Guennadi Liakhovetski wrote: > On Mon, 13 Oct 2008, Rogério Brito wrote: > >> From: Rogério Brito <rbrito@ime.usp.br> >> >> Since Linkstations and Kuroboxes often have *very* little memory (as >> they are embedded systems), it is desirable to get their kernels >> compiled optimized for size. >> >> Signed-off-by: Rogério Brito <rbrito@ime.usp.br> >> >> --- >> >> I have been using kernels optimized for size on my Kurobox (standard) >> for many different releases and I have experienced no problem with >> this >> option enabled. Thus, this patch. > > The comment for this option says: "watch out for broken compilers," if > this doesn't hold any more, it should be remove, if it still holds, I > wouldn't turn this on by default, as I don't think we can test all Pragmatically speaking, -O2 can be broken too (and see the amount of ICEs that you can get with newer kernels even compiling with -O2). Unless you prove that the compiler is correct and keeps all its invariants, then you can rely on this. But, pragmatically speaking again, gcc has bugs. But leaving the mathematical situation aside (Dijkstra would have spanked all of us here :)), as I mentioned below the signed off line, I have been using -Os and it is working fine. It's serving me quite well and with a decent uptime: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lutz:~# uptime 19:22:53 up 17 days, 5:56, 1 user, load average: 0.00, 0.00, 0.00 lutz:~# uname -a Linux lutz 2.6.27-rc6.try02 #8 Fri Sep 26 11:29:55 BRT 2008 ppc GNU/ Linux lutz:~# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - And, despite the 0.00 load, I'm streaming music with it via mt-daapd and serving cifs mounts. > possible (cross- or native-) compilers users might want to use. In any > case this is one of options that users can select themselves, if it > suits > them. And that is, not to mention, with a very home-brew and quick'n'dirty cross-compiled kernel (with a vanilla gcc 4.2.0 taken straight from gcc.gnu.org; the same with the kernel: no patches applied). -- Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: compile kernel for linkstations optimized for size 2008-10-13 4:07 [PATCH] powerpc: compile kernel for linkstations optimized for size Rogério Brito 2008-10-13 4:51 ` [PATCH] powerpc: enable heap randomization for linkstations Rogério Brito 2008-10-13 18:03 ` [PATCH] powerpc: compile kernel for linkstations optimized for size Guennadi Liakhovetski @ 2008-10-17 9:37 ` Rogério Brito 2008-10-28 13:58 ` Kumar Gala 3 siblings, 0 replies; 14+ messages in thread From: Rogério Brito @ 2008-10-17 9:37 UTC (permalink / raw) To: linux-kernel; +Cc: linuxppc-dev, akpm, paulus Hi, It's been some days since I sent the patch below. I would appreciate if any feedback was given. Thanks, Rogério Brito. On Oct 13 2008, Rogério Brito wrote: > From: Rogério Brito <rbrito@ime.usp.br> > > Since Linkstations and Kuroboxes often have *very* little memory (as > they are embedded systems), it is desirable to get their kernels > compiled optimized for size. > > Signed-off-by: Rogério Brito <rbrito@ime.usp.br> > > --- > > I have been using kernels optimized for size on my Kurobox (standard) > for many different releases and I have experienced no problem with this > option enabled. Thus, this patch. > > --- linux/arch/powerpc/configs/linkstation_defconfig.old 2008-10-13 00:33:00.000000000 -0300 > +++ linux/arch/powerpc/configs/linkstation_defconfig 2008-10-13 00:38:58.000000000 -0300 > @@ -90,7 +90,7 @@ CONFIG_NAMESPACES=y > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > CONFIG_INITRAMFS_SOURCE="" > -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set > +CONFIG_CC_OPTIMIZE_FOR_SIZE=y > CONFIG_SYSCTL=y > # CONFIG_EMBEDDED is not set > CONFIG_SYSCTL_SYSCALL=y > > > -- > Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 > http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito > Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org -- Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8 http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: compile kernel for linkstations optimized for size 2008-10-13 4:07 [PATCH] powerpc: compile kernel for linkstations optimized for size Rogério Brito ` (2 preceding siblings ...) 2008-10-17 9:37 ` Rogério Brito @ 2008-10-28 13:58 ` Kumar Gala 3 siblings, 0 replies; 14+ messages in thread From: Kumar Gala @ 2008-10-28 13:58 UTC (permalink / raw) To: Rogério Brito; +Cc: linux-kernel, linuxppc-dev, akpm On Oct 12, 2008, at 11:07 PM, Rogério Brito wrote: > From: Rogério Brito <rbrito@ime.usp.br> > > Since Linkstations and Kuroboxes often have *very* little memory (as > they are embedded systems), it is desirable to get their kernels > compiled optimized for size. > > Signed-off-by: Rogério Brito <rbrito@ime.usp.br> > > --- applied to merge. - k ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2008-10-28 13:59 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-10-13 4:07 [PATCH] powerpc: compile kernel for linkstations optimized for size Rogério Brito 2008-10-13 4:51 ` [PATCH] powerpc: enable heap randomization for linkstations Rogério Brito 2008-10-13 18:05 ` Guennadi Liakhovetski 2008-10-13 18:44 ` Scott Wood 2008-10-13 19:27 ` Guennadi Liakhovetski 2008-10-13 20:56 ` Rogério Brito 2008-10-19 2:53 ` Rogério Brito 2008-10-19 3:16 ` Rogério Brito 2008-10-17 9:38 ` Rogério Brito 2008-10-28 13:58 ` Kumar Gala 2008-10-13 18:03 ` [PATCH] powerpc: compile kernel for linkstations optimized for size Guennadi Liakhovetski 2008-10-13 21:28 ` Rogério Brito 2008-10-17 9:37 ` Rogério Brito 2008-10-28 13:58 ` Kumar Gala
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).