lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 1 Aug 2015 15:12:42 +0800
From:	yalin wang <yalin.wang2010@...il.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	Neil Horman <nhorman@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Kershner <david.kershner@...sys.com>, tj@...nel.org,
	laijs@...fujitsu.com, nacc@...ux.vnet.ibm.com, mingo@...hat.com,
	open list <linux-kernel@...r.kernel.org>,
	jes.sorensen@...hat.com, sparmaintainer@...sys.com
Subject: Re: [PATCH v2] kthread: Export kthread functions


> 在 2015年7月31日,22:14,Thomas Gleixner <tglx@...utronix.de> 写道:
> 
> 
> On Fri, 31 Jul 2015, Thomas Gleixner wrote:
> 
>> On Fri, 31 Jul 2015, yalin wang wrote:
>>> it is optimised to 2 instructions ,
>>> 
>>> this is my patch, hope can be merged :
>> 
>> We are not exposing the internals of kthread management. Period.
> 
> And your 'optimization' is completely bogus:
> 
> Before your modification:
> 
> size kernel/built-in.o
> 
>   text	   data	    bss	    dec	    hex	filename
> 1091514	 141498  341928 1574940  18081c	../build/kernel/built-in.o
> 
> After:
> 
>   text	   data	    bss	    dec	    hex	filename
> 1091664  141498  341928 1575090  1808b2	../build/kernel/built-in.o
> 
> That's an increase of text size by 150 byte. Interesting optimization.
> 
> Thanks,
> 
> 	tglx
> 
> 
strange,  this is my test result:

size   built-in.o*
  text	   data	    bss	    dec	    hex	filename
743937	  50786	  56008	 850731	  cfb2b	built-in.o        // with the patch
744069	  50786	  56008	 850863	  cfbaf	built-in.o_old  // with out the patch

you can see text size is reduced.
in addition, because we don’t use EXPORT_SYMBOLS() for inline function,
some data can also be removed,

[27] __ksymtab_strings PROGBITS         0000000000000000  000a7fe0
      0000000000003907  0000000000000000   A       0     0     1
0x3907

[27] __ksymtab_strings PROGBITS         0000000000000000  000a8020
      000000000000392f  0000000000000000   A       0     0     1
0x392f

you can see after apply the patch, this string section is also reduced,
but size command output seems not calculate these special section,
there are lots of special sections in linux kernel image,
i think size command is not suitable to calculate kernel image, maybe it just
calculate formal section which name like   .data  .text   etc..

Thanks--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ