Re: FIPS fingerprint in .data not .rodata

2012-02-22 Thread Jeffrey Walton
On Tue, Feb 21, 2012 at 3:51 PM, Andy Polyakov wrote: >> Another option (but shoot it down if its bogus :-): I noticed that if I >> compile >> fipscanister.o without "-fPIC", then the const variables do get placed in >> the (really readonly) .rodata section as desired. I thought maybe if I did >>

Re: FIPS fingerprint in .data not .rodata

2012-02-21 Thread Kevin Fowler
On Tue, Feb 21, 2012 at 3:51 PM, Andy Polyakov wrote: >> Another option (but shoot it down if its bogus :-): I noticed that if I >> compile >> fipscanister.o without "-fPIC", then the const variables do get placed in >> the (really readonly) .rodata section as desired. I thought maybe if I did >>

Re: FIPS fingerprint in .data not .rodata

2012-02-21 Thread Andy Polyakov
> Another option (but shoot it down if its bogus :-): I noticed that if I > compile > fipscanister.o without "-fPIC", then the const variables do get placed in > the (really readonly) .rodata section as desired. I thought maybe if I did > that and went the static route - build libcrypto with no-sh

Re: FIPS fingerprint in .data not .rodata

2012-02-21 Thread Kevin Fowler
On Tue, Feb 21, 2012 at 1:11 PM, Andy Polyakov wrote: >> Though in FIPS 2.0 there is new option that might work in this case. >> Besides switching to another compiler that is. Introduced to rectify >> situation with rodata segments not being position-independent on Win64, >> defini

Re: FIPS fingerprint in .data not .rodata

2012-02-21 Thread Andy Polyakov
> Though in FIPS 2.0 there is new option that might work in this case. > Besides switching to another compiler that is. Introduced to rectify > situation with rodata segments not being position-independent on Win64, > defining __fips_constseg might prove useful even in this situatio

Re: FIPS fingerprint in .data not .rodata

2012-02-20 Thread Kevin Fowler
On Mon, Feb 20, 2012 at 5:18 AM, Andy Polyakov wrote: > > >>> Though in FIPS 2.0 there is new option that might work in this case. > >>> Besides switching to another compiler that is. Introduced to rectify > >>> situation with rodata segments not being position-independent on Win64, > >>> defining

Re: FIPS fingerprint in .data not .rodata

2012-02-20 Thread Andy Polyakov
>>> Though in FIPS 2.0 there is new option that might work in this case. >>> Besides switching to another compiler that is. Introduced to rectify >>> situation with rodata segments not being position-independent on Win64, >>> defining __fips_constseg might prove useful even in this situation. See >

Re: FIPS fingerprint in .data not .rodata

2012-02-19 Thread Kevin Fowler
On Sun, Feb 19, 2012 at 3:50 PM, Kevin Fowler wrote: > > > On Sun, Feb 19, 2012 at 11:52 AM, Andy Polyakov wrote: > >> >>> After I had gotten the extra "-f" options from Harvey for this >> platform >> >>> (BSD-powerpc), >> >> Using -f[data|function]-sections options is inappropriate as they >> >

Re: FIPS fingerprint in .data not .rodata

2012-02-19 Thread Kevin Fowler
On Sun, Feb 19, 2012 at 11:52 AM, Andy Polyakov wrote: > >>> After I had gotten the extra "-f" options from Harvey for this platform > >>> (BSD-powerpc), > >> Using -f[data|function]-sections options is inappropriate as they > >> undermine the idea of "capturing" fipscanister code and rodata betw

Re: FIPS fingerprint in .data not .rodata

2012-02-19 Thread Andy Polyakov
>>> After I had gotten the extra "-f" options from Harvey for this platform >>> (BSD-powerpc), >> Using -f[data|function]-sections options is inappropriate as they >> undermine the idea of "capturing" fipscanister code and rodata between >> start/end symbols. It was bad advice/idea, do *not* use th

Re: FIPS fingerprint in .data not .rodata

2012-02-19 Thread Kevin Fowler
On Sat, Feb 18, 2012 at 6:13 PM, Andy Polyakov wrote: > > The key thing I realized is that the incore script that comes with the > FIPS > > Object Module v2.0 tarball > > handles both native AND cross-compile scenarios. > > Even though FIPS 2.0 util/incore is capable of handling arbitrary ELF >

Re: FIPS fingerprint in .data not .rodata

2012-02-18 Thread Andy Polyakov
> The key thing I realized is that the incore script that comes with the FIPS > Object Module v2.0 tarball > handles both native AND cross-compile scenarios. Even though FIPS 2.0 util/incore is capable of handling arbitrary ELF binary (native or not), it's not used in non-cross-compile/native cas

Re: FIPS fingerprint in .data not .rodata

2012-02-18 Thread Kevin Fowler
On Fri, Feb 17, 2012 at 10:25 PM, Dr. Stephen Henson wrote: > On Fri, Feb 17, 2012, Kevin Fowler wrote: > > > Thanks Harvey, > > This seems to have worked as far as getting the .rodata section used. > This > > is what I see now: > > > > 001b5740 g O .rodata0010 FIPS_rodata_start >

Re: FIPS fingerprint in .data not .rodata

2012-02-17 Thread Dr. Stephen Henson
On Fri, Feb 17, 2012, Kevin Fowler wrote: > Thanks Harvey, > This seems to have worked as far as getting the .rodata section used. This > is what I see now: > > 001b5740 g O .rodata0010 FIPS_rodata_start > 001b5750 l O .rodata0011 FIPS_hmac_key > 001b57bc g O .

Re: FIPS fingerprint in .data not .rodata

2012-02-17 Thread Kevin Fowler
Thanks Harvey, This seems to have worked as far as getting the .rodata section used. This is what I see now: 001b5740 g O .rodata0010 FIPS_rodata_start 001b5750 l O .rodata0011 FIPS_hmac_key 001b57bc g O .rodata0036 FIPS_bn_version 001c1e08 g O .

RE: FIPS fingerprint in .data not .rodata

2012-02-17 Thread Harvey Shepherd
Hi Kevin, I encountered this problem when compiling the 1.2.3 FIPS object module some time ago, with exactly the same compiler. After some experimentation I managed to get it to embed the fingerprint correctly using the following compiler options: -fno-common -fdata-sections -ffunction-section