Saturday, November 04, 2023

Re: devel/boost syscall(2) removal

On Fri, Nov 03, 2023 at 09:03:20PM -0400, Brad Smith wrote:

> On Sun, Oct 29, 2023 at 08:13:45AM -0400, Brad Smith wrote:
> > On Sun, Oct 29, 2023 at 10:52:39AM +0000, Stuart Henderson wrote:
> > > Doesn't hurt but we probably don't need #ifdef around SYS_getrandom tbh.
> > >
> > > Has anyone looked at updating boost recently? It would be a good time in our
> > > release cycle and I can do an i386 bulk if anyone has a diff handy.
> > >
> > > --
> > > Sent from a phone, apologies for poor formatting.
> >
> > The existing Boost::Context diffs do not apply as is, there were some changes there.
> > Someone more familiar with this neeeds to look at what needs to be done for i386.
> >
> > https://github.com/boostorg/context/commit/2f0b5034b72cbb858849bd744ffb06df04521e5a
> >
> > https://github.com/boostorg/context/commit/e286649f08a6312ba3d88aa3eafa179ec3eab163
> > https://github.com/boostorg/context/commit/0eb42637058741bef2456e0fb165e02d47670c8a
>
> Here is an updated diff with the reverted 1.80 ASM.

That does not look like the correct verisons of the assmebly. What we
need is the 1.80 assembly *after* the patches in the 1.80 port have
been applied.

-Otto

>
>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/devel/boost/Makefile,v
> diff -u -p -u -p -r1.136 Makefile
> --- Makefile 28 Oct 2023 14:03:31 -0000 1.136
> +++ Makefile 3 Nov 2023 22:49:54 -0000
> @@ -8,17 +8,16 @@ COMMENT-md= machine-dependent libraries
> # if updating >=1.81.0 review ports using boost_context that have USE_NOBTCFI
> # set and see if it can be removed (definite problems seen with pdns_recursor);
> # sqlite3 /usr/local/share/sqlports "select * from wantlib where value like 'boost_context%'"
> -VERSION= 1.80.0
> -EPOCH = 0
> +VERSION= 1.83.0
> DISTNAME= boost_${VERSION:S/./_/g}
> PKGNAME= boost-${VERSION}
> -REVISION-main= 3
> +EPOCH= 0
> CATEGORIES= devel
> SITES= https://boostorg.jfrog.io/artifactory/main/release/${VERSION}/source/
> EXTRACT_SUFX= .tar.bz2
> FIX_EXTRACT_PERMISSIONS = Yes
>
> -SO_VERSION= 21.0
> +SO_VERSION= 22.0
> BOOST_LIBS= boost_atomic-mt \
> boost_chrono-mt boost_chrono \
> boost_container-mt boost_container \
> @@ -53,6 +52,7 @@ BOOST_LIBS= boost_atomic-mt \
> boost_timer-mt boost_timer \
> boost_type_erasure-mt boost_type_erasure \
> boost_unit_test_framework-mt boost_unit_test_framework \
> + boost_url-mt boost_url \
> boost_wserialization-mt boost_wserialization \
> boost_wave-mt boost_wave
>
> @@ -129,6 +129,10 @@ CONFIGURE_ENV= BJAM_CONFIG="${BJAM_CONFI
> NO_TEST= Yes
>
> SUBST_VARS+= SO_VERSION
> +
> +# Revert back to Boost::Context 1.80.0 ASM code for i386
> +post-extract:
> + cp -f ${FILESDIR}/*_i386_sysv_elf_gas.S ${WRKSRC}/libs/context/src/asm/
>
> do-configure:
> echo "using ${TOOLSET} : : ${CXX} ;" >>${WRKSRC}/tools/build/src/user-config.jam
> Index: distinfo
> ===================================================================
> RCS file: /home/cvs/ports/devel/boost/distinfo,v
> diff -u -p -u -p -r1.21 distinfo
> --- distinfo 29 Aug 2022 17:28:18 -0000 1.21
> +++ distinfo 3 Nov 2023 18:21:40 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (boost_1_80_0.tar.bz2) = HhlWXYLkO8WSCaFo9ayJnTukcdVcdhDGd9TM8snFAMA=
> -SIZE (boost_1_80_0.tar.bz2) = 115869904
> +SHA256 (boost_1_83_0.tar.bz2) = ZHjt/i8zBRJ8/+jK9z6gF2xTdp9L8Vhb4jfrMHmMO44=
> +SIZE (boost_1_83_0.tar.bz2) = 122892751
> Index: files/jump_i386_sysv_elf_gas.S
> ===================================================================
> RCS file: files/jump_i386_sysv_elf_gas.S
> diff -N files/jump_i386_sysv_elf_gas.S
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ files/jump_i386_sysv_elf_gas.S 3 Nov 2023 18:34:01 -0000
> @@ -0,0 +1,83 @@
> +/*
> + Copyright Oliver Kowalke 2009.
> + Distributed under the Boost Software License, Version 1.0.
> + (See accompanying file LICENSE_1_0.txt or copy at
> + http://www.boost.org/LICENSE_1_0.txt)
> +*/
> +
> +/****************************************************************************************
> + * *
> + * ---------------------------------------------------------------------------------- *
> + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | *
> + * ---------------------------------------------------------------------------------- *
> + * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | *
> + * ---------------------------------------------------------------------------------- *
> + * | fc_mxcsr|fc_x87_cw| EDI | ESI | EBX | EBP | EIP | hidden | *
> + * ---------------------------------------------------------------------------------- *
> + * ---------------------------------------------------------------------------------- *
> + * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
> + * ---------------------------------------------------------------------------------- *
> + * | 0x20 | 0x24 | | *
> + * ---------------------------------------------------------------------------------- *
> + * | to | data | | *
> + * ---------------------------------------------------------------------------------- *
> + * *
> + ****************************************************************************************/
> +
> +.file "jump_i386_sysv_elf_gas.S"
> +.text
> +.globl jump_fcontext
> +.align 2
> +.type jump_fcontext,@function
> +jump_fcontext:
> + leal -0x18(%esp), %esp /* prepare stack */
> +
> +#if !defined(BOOST_USE_TSX)
> + stmxcsr (%esp) /* save MMX control- and status-word */
> + fnstcw 0x4(%esp) /* save x87 control-word */
> +

No comments:

Post a Comment