Bug 242950 - [exp-run] replacing libssp with BSDL version
Summary: [exp-run] replacing libssp with BSDL version
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-29 03:46 UTC by Kyle Evans
Modified: 2020-05-14 19:56 UTC (History)
2 users (show)

See Also:
kevans: exp-run?


Attachments
git(1) diff against base (12.57 KB, patch)
2019-12-29 03:46 UTC, Kyle Evans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer freebsd_triage 2019-12-29 03:46:42 UTC
Created attachment 210298 [details]
git(1) diff against base

Attached patch against base removes our dependency on gcclibs' libssp/libssp_nonshared and just builds it from our own libc implementation with some stubs for the parts that we don't support.
Comment 1 Antoine Brodin freebsd_committer freebsd_triage 2019-12-29 07:04:45 UTC
I don't understand,  there are 3 different exp-run requests from 3 different people about libssp..
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-12-29 08:43:32 UTC
@Kyle If your patch is different from that in #bug 229348, please attach it there

*** This bug has been marked as a duplicate of bug 229348 ***
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2019-12-29 10:04:06 UTC
Re-open,  this patch is not duplicate of bug #229348
Comment 4 Kyle Evans freebsd_committer freebsd_triage 2019-12-29 13:41:00 UTC
(In reply to Antoine Brodin from comment #1)

The other two are trying to assess when/if it still needs to be linked into libssp, this one is attempting to determine if ours is an all-around suitable replacement.

I suspect emaste's supercedes pfg's, then this one's independent because we're both keeping libssp and libssp.so needs to be exercised, and we're swapping out the version linked into libc which could break i386.

While their effort could make part of this futile, we're still flexing additional bits that may break.
Comment 5 Antoine Brodin freebsd_committer freebsd_triage 2020-01-04 16:51:01 UTC
There is 1 new failure on i386

Failure log:

http://pb2.nyi.freebsd.org/data/headi386PR242950-default/2020-01-02_11h04m33s/logs/errors/oo2c-2.1.11_13.log
Comment 6 Kyle Evans freebsd_committer freebsd_triage 2020-01-04 20:02:33 UTC
(In reply to Antoine Brodin from comment #5)

Thanks! Looks like libssp_nonshared was missing an -fPIC in the build.

I re-tested that the build is fine locally following that change- since it appears to be a leaf port and the only one, I'm going to go ahead and close this and commit. Thanks again for the exp-run!
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-01-04 20:20:08 UTC
A commit references this bug:

Author: kevans
Date: Sat Jan  4 20:19:28 UTC 2020
New revision: 356356
URL: https://svnweb.freebsd.org/changeset/base/356356

Log:
  Provide libssp based on libc

  For libssp.so, rebuild stack_protector.c with FORTIFY_SOURCE stubs that just
  abort built into it.

  For libssp_nonshared.a, steal stack_protector_compat.c from
  ^/lib/libc/secure and massage it to maintain that __stack_chk_fail_local
  is a hidden symbol.

  libssp is now built unconditionally regardless of {WITH,WITHOUT}_SSP in the
  build environment, and the gcclibs version has been disconnected from the
  build in favor of this one.

  PR:		242950 (exp-run)
  Reviewed by:	kib, emaste, pfg, Oliver Pinter (earlier version)
  Also discussed with:	kan
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D22943

Changes:
  head/Makefile.inc1
  head/ObsoleteFiles.inc
  head/gnu/lib/Makefile
  head/lib/Makefile
  head/lib/libssp/
  head/lib/libssp/Makefile
  head/lib/libssp/Symbol.map
  head/lib/libssp/Versions.def
  head/lib/libssp/fortify_stubs.c
  head/lib/libssp_nonshared/
  head/lib/libssp_nonshared/Makefile
  head/lib/libssp_nonshared/libssp_nonshared.c
  head/share/mk/local.dirdeps.mk
  head/share/mk/local.gendirdeps.mk
  head/share/mk/src.libnames.mk
  head/tools/build/mk/OptionalObsoleteFiles.inc
Comment 8 Ed Maste freebsd_committer freebsd_triage 2020-01-05 16:43:21 UTC
(In reply to Antoine Brodin from comment #1)
My PR 242941 is trying to eliminate one of the SSP-related components that I believe is not used on most FreeBSD targets.
Comment 9 commit-hook freebsd_committer freebsd_triage 2020-02-14 19:31:50 UTC
A commit references this bug:

Author: dim
Date: Fri Feb 14 19:31:24 UTC 2020
New revision: 357929
URL: https://svnweb.freebsd.org/changeset/base/357929

Log:
  Remove /usr/include/ssp from BSD.include.dist after r356356

  This avoids having to delete it every time with "make delete-old".

  PR:		242950
  MFC after:	2 weeks
  X-MFC-With:	r356356

Changes:
  head/etc/mtree/BSD.include.dist
Comment 10 commit-hook freebsd_committer freebsd_triage 2020-03-02 07:13:44 UTC
A commit references this bug:

Author: dim
Date: Mon Mar  2 07:13:00 UTC 2020
New revision: 358528
URL: https://svnweb.freebsd.org/changeset/base/358528

Log:
  MFC r357929:

  Remove /usr/include/ssp from BSD.include.dist after r356356

  This avoids having to delete it every time with "make delete-old".

  PR:		242950

Changes:
_U  stable/12/
  stable/12/etc/mtree/BSD.include.dist
Comment 11 commit-hook freebsd_committer freebsd_triage 2020-05-14 19:42:38 UTC
A commit references this bug:

Author: dim
Date: Thu May 14 19:41:45 UTC 2020
New revision: 361051
URL: https://svnweb.freebsd.org/changeset/base/361051

Log:
  MFC r357929:

  Remove /usr/include/ssp from BSD.include.dist after r356356

  This avoids having to delete it every time with "make delete-old".

  PR:		242950

Changes:
_U  stable/11/
  stable/11/etc/mtree/BSD.include.dist
Comment 12 commit-hook freebsd_committer freebsd_triage 2020-05-14 19:56:42 UTC
A commit references this bug:

Author: dim
Date: Thu May 14 19:56:16 UTC 2020
New revision: 361052
URL: https://svnweb.freebsd.org/changeset/base/361052

Log:
  MF11 r361051:

  MFC r357929:

  Remove /usr/include/ssp from BSD.include.dist after r356356

  This avoids having to delete it every time with "make delete-old".

  Approved by:	re (gjb)
  PR:		242950

Changes:
_U  releng/11.4/
  releng/11.4/etc/mtree/BSD.include.dist