Re: svn commit: r338861 - head/lib/libc

2018-09-24 Thread Ed Maste
On 21 September 2018 at 16:11, Xin Li  wrote:
> On 9/21/18 10:49, Ed Maste wrote:
>> Author: emaste
>> Date: Fri Sep 21 17:49:37 2018
>> New Revision: 338861
>> URL: https://svnweb.freebsd.org/changeset/base/338861
>>
>> Log:
>>   libc: require ifunc-capable linker for amd64/i386
>>
>
> It seems that this would break bootstraping from a FreeBSD -CURRENT
> before ifunc?

Should be fixed by r338903.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r338861 - head/lib/libc

2018-09-23 Thread Ed Maste
On 21 September 2018 at 16:11, Xin Li  wrote:
> On 9/21/18 10:49, Ed Maste wrote:
>> Author: emaste
>> Date: Fri Sep 21 17:49:37 2018
>> New Revision: 338861
>> URL: https://svnweb.freebsd.org/changeset/base/338861
>>
>> Log:
>>   libc: require ifunc-capable linker for amd64/i386
>>
>>   We expect to introduce optimized libc routines in the near future,
>>   which requires use of a linker that supports ifuncs.
>>
>>   Approved by:re (gjb, kib)
>>   Sponsored by:   The FreeBSD Foundation
>>
>> Modified:
>>   head/lib/libc/Makefile
>>
>> Modified: head/lib/libc/Makefile
>> ==
>> --- head/lib/libc/MakefileFri Sep 21 17:44:05 2018(r338860)
>> +++ head/lib/libc/MakefileFri Sep 21 17:49:37 2018(r338861)
>> @@ -21,6 +21,11 @@ LIBC_ARCH=${MACHINE_ARCH}
>>  LIBC_ARCH=${MACHINE_CPUARCH}
>>  .endif
>>
>> +.if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \
>> +defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
>> +.error ${LIBC_ARCH} libc requires linker ifunc support
>> +.endif
>> +
>>  # All library objects contain FreeBSD revision strings by default; they may 
>> be
>>  # excluded as a space-saving measure.  To produce a library that does
>>  # not contain these strings, add -DSTRIP_FBSDID (see ) to 
>> CFLAGS
>
> It seems that this would break bootstraping from a FreeBSD -CURRENT
> before ifunc?

It looks like it needs to be made conditional on the make target as
well. I should have a fix tomorrow morning.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r338861 - head/lib/libc

2018-09-22 Thread Shawn Webb
On Fri, Sep 21, 2018 at 01:11:46PM -0700, Xin Li wrote:
> On 9/21/18 10:49, Ed Maste wrote:
> > Author: emaste
> > Date: Fri Sep 21 17:49:37 2018
> > New Revision: 338861
> > URL: https://svnweb.freebsd.org/changeset/base/338861
> > 
> > Log:
> >   libc: require ifunc-capable linker for amd64/i386
> >   
> >   We expect to introduce optimized libc routines in the near future,
> >   which requires use of a linker that supports ifuncs.
> >   
> >   Approved by:  re (gjb, kib)
> >   Sponsored by:   The FreeBSD Foundation
> > 
> > Modified:
> >   head/lib/libc/Makefile
> > 
> > Modified: head/lib/libc/Makefile
> > ==
> > --- head/lib/libc/Makefile  Fri Sep 21 17:44:05 2018(r338860)
> > +++ head/lib/libc/Makefile  Fri Sep 21 17:49:37 2018(r338861)
> > @@ -21,6 +21,11 @@ LIBC_ARCH=${MACHINE_ARCH}
> >  LIBC_ARCH=${MACHINE_CPUARCH}
> >  .endif
> >  
> > +.if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \
> > +defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
> > +.error ${LIBC_ARCH} libc requires linker ifunc support
> > +.endif
> > +
> >  # All library objects contain FreeBSD revision strings by default; they 
> > may be
> >  # excluded as a space-saving measure.  To produce a library that does
> >  # not contain these strings, add -DSTRIP_FBSDID (see ) to 
> > CFLAGS
> 
> It seems that this would break bootstraping from a FreeBSD -CURRENT
> before ifunc?

It does. The HardenedBSD nightly build server is running 11-STABLE and
now cannot build 12-CURRENT:

https://jenkins.hardenedbsd.org/jenkins/job/HardenedBSD-CURRENT-amd64/1332/console

Thanks,


-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

Tor-ified Signal:+1 443-546-8752
Tor+XMPP+OTR:latt...@is.a.hacker.sx
GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


Re: svn commit: r338861 - head/lib/libc

2018-09-21 Thread Xin Li
On 9/21/18 10:49, Ed Maste wrote:
> Author: emaste
> Date: Fri Sep 21 17:49:37 2018
> New Revision: 338861
> URL: https://svnweb.freebsd.org/changeset/base/338861
> 
> Log:
>   libc: require ifunc-capable linker for amd64/i386
>   
>   We expect to introduce optimized libc routines in the near future,
>   which requires use of a linker that supports ifuncs.
>   
>   Approved by:re (gjb, kib)
>   Sponsored by:   The FreeBSD Foundation
> 
> Modified:
>   head/lib/libc/Makefile
> 
> Modified: head/lib/libc/Makefile
> ==
> --- head/lib/libc/MakefileFri Sep 21 17:44:05 2018(r338860)
> +++ head/lib/libc/MakefileFri Sep 21 17:49:37 2018(r338861)
> @@ -21,6 +21,11 @@ LIBC_ARCH=${MACHINE_ARCH}
>  LIBC_ARCH=${MACHINE_CPUARCH}
>  .endif
>  
> +.if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \
> +defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
> +.error ${LIBC_ARCH} libc requires linker ifunc support
> +.endif
> +
>  # All library objects contain FreeBSD revision strings by default; they may 
> be
>  # excluded as a space-saving measure.  To produce a library that does
>  # not contain these strings, add -DSTRIP_FBSDID (see ) to CFLAGS

It seems that this would break bootstraping from a FreeBSD -CURRENT
before ifunc?

Cheers,




signature.asc
Description: OpenPGP digital signature


Re: svn commit: r338861 - head/lib/libc

2018-09-21 Thread Ed Maste
On 21 September 2018 at 14:11, Cy Schubert  wrote:
>
> Should this require bumping __FreeBSD_version?

Shouldn't be necessary - as of r336901 we've had an ifunc-capable
linker in the toolchain for both amd64 and i386. This commit is just a
safety belt to make sure that if someone builds libc outside of the
standard process and uses old GNU ld we get a hard error rather than a
mysterious failure.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r338861 - head/lib/libc

2018-09-21 Thread Cy Schubert
In message <201809211749.w8lhnbap091...@repo.freebsd.org>, Ed Maste 
writes:
> Author: emaste
> Date: Fri Sep 21 17:49:37 2018
> New Revision: 338861
> URL: https://svnweb.freebsd.org/changeset/base/338861
>
> Log:
>   libc: require ifunc-capable linker for amd64/i386
>   
>   We expect to introduce optimized libc routines in the near future,
>   which requires use of a linker that supports ifuncs.
>   
>   Approved by:re (gjb, kib)
>   Sponsored by:   The FreeBSD Foundation
>
> Modified:
>   head/lib/libc/Makefile
>
> Modified: head/lib/libc/Makefile
> =
> =
> --- head/lib/libc/MakefileFri Sep 21 17:44:05 2018(r338860)
> +++ head/lib/libc/MakefileFri Sep 21 17:49:37 2018(r338861)
> @@ -21,6 +21,11 @@ LIBC_ARCH=${MACHINE_ARCH}
>  LIBC_ARCH=${MACHINE_CPUARCH}
>  .endif
>  
> +.if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \
> +defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
> +.error ${LIBC_ARCH} libc requires linker ifunc support
> +.endif
> +
>  # All library objects contain FreeBSD revision strings by default; they may 
> be
>  # excluded as a space-saving measure.  To produce a library that does
>  # not contain these strings, add -DSTRIP_FBSDID (see ) to CFLAG
> S
>

Should this require bumping __FreeBSD_version?


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r338861 - head/lib/libc

2018-09-21 Thread Ed Maste
Author: emaste
Date: Fri Sep 21 17:49:37 2018
New Revision: 338861
URL: https://svnweb.freebsd.org/changeset/base/338861

Log:
  libc: require ifunc-capable linker for amd64/i386
  
  We expect to introduce optimized libc routines in the near future,
  which requires use of a linker that supports ifuncs.
  
  Approved by:  re (gjb, kib)
  Sponsored by:   The FreeBSD Foundation

Modified:
  head/lib/libc/Makefile

Modified: head/lib/libc/Makefile
==
--- head/lib/libc/Makefile  Fri Sep 21 17:44:05 2018(r338860)
+++ head/lib/libc/Makefile  Fri Sep 21 17:49:37 2018(r338861)
@@ -21,6 +21,11 @@ LIBC_ARCH=${MACHINE_ARCH}
 LIBC_ARCH=${MACHINE_CPUARCH}
 .endif
 
+.if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \
+defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
+.error ${LIBC_ARCH} libc requires linker ifunc support
+.endif
+
 # All library objects contain FreeBSD revision strings by default; they may be
 # excluded as a space-saving measure.  To produce a library that does
 # not contain these strings, add -DSTRIP_FBSDID (see ) to CFLAGS
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"