Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Me nochange #3779

Draft
wants to merge 54 commits into
base: openh264v2.3.0
Choose a base branch
from
Draft

Commits on Aug 30, 2022

  1. Configuration menu
    Copy the full SHA
    013c75d View commit details
    Browse the repository at this point in the history
  2. Add ASAN build configuration

    jrmuizel committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    96a1f7b View commit details
    Browse the repository at this point in the history
  3. Add fuzzing to CI

    jrmuizel committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    9986d59 View commit details
    Browse the repository at this point in the history
  4. fix oss-fuzz issue-45607. checking if reference pic count < maximum r…

    …eference count allowed.
    xiaotiansf authored and jrmuizel committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    062f9cb View commit details
    Browse the repository at this point in the history
  5. Add platform-gnu.mk

    This is actually exactly the same as platform-linux.mk since it's basically
    describing the GNU toolchain, thus factorizing into build/platform-gnu-chain.mk.
    sthibaul authored and jrmuizel committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    fa3f9a2 View commit details
    Browse the repository at this point in the history
  6. WelsThread: port to GNU/Hurd

    It is providing sched_getaffinity like Linux.
    sthibaul authored and jrmuizel committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    ef27036 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2022

  1. meson: Don't use gas-preprocessor and armasm when building for arm64 …

    …with clang-cl (cisco#3571)
    
    Since meson 0.58.0, meson accepts adding '.S' assembly files as
    source files to the clang-cl compiler.
    
    For arm, gas-preprocessor is still required when building clang-cl,
    for rewriting the assembly into a thumb-compatible form on the fly.
    mstorsjo authored Sep 20, 2022
    Configuration menu
    Copy the full SHA
    b9d3491 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2022

  1. Configuration menu
    Copy the full SHA
    0c19a5c View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2022

  1. Save xmm7 in DyadicBilinearQuarterDownsampler_sse

    Static analysis of chrome.dll showed that xmm7 was being used but not
    preserved in this function. The Windows calling convention requires
    that xmm7 be preserved so this change adds the necessary "PUSH_XMM 8"
    and POP_XMM directives to fix this.
    
    This fixes issue cisco#3585. This may fix a bug in Chrome but that is
    unknown.
    randomascii authored and jrmuizel committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    db95667 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2022

  1. 1 Configuration menu
    Copy the full SHA
    8422de8 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2022

  1. Configuration menu
    Copy the full SHA
    9003acb View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2022

  1. Configuration menu
    Copy the full SHA
    8535525 View commit details
    Browse the repository at this point in the history
  2. Improve checking for GCC >= 8 and Clang for passing -Wno-class-memacc…

    …ess (cisco#3598)
    
    Don't pass -Wno-class-memaccess to Clang, which doesn't support that
    option name. (When inspecting $(CXX) with a pattern, "clang++" also
    matches the pattern "%g++".)
    
    Simplify the pattern checking; use $(filter %g++,$(CXX)) instead of
    $(patsubst %g++,,$(CXX)) making it less obscure. (This requires
    changing the ifeq ($(),) into ifneq.)
    
    Check for %clang++ in addition to %g++.
    
    Also use a similar pattern for checking for clang++ instead of plain
    exact matches for "clang++", for passing the option
    -Wc++11-compat-reserved-user-defined-literal - this allows applying
    the option when CXX contains a path, or if "clang++" is prefixed by
    a cross triple.
    mstorsjo authored Dec 22, 2022
    Configuration menu
    Copy the full SHA
    d2f5b21 View commit details
    Browse the repository at this point in the history
  3. Silence warnings from Clang about using bitwise | with boolean operan…

    …ds (cisco#3605)
    
    This fixes the following warnings:
    
    codec/decoder/core/src/mv_pred.cpp:398:25: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
      bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) | IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy])) > 0;
                           ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                     ||
    
    codec/decoder/core/src/mv_pred.cpp:618:25: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
      bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) | IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy])) > 0;
                           ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                     ||
    mstorsjo authored Dec 22, 2022
    Configuration menu
    Copy the full SHA
    b044589 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    886b9a5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a52d3b1 View commit details
    Browse the repository at this point in the history
  6. Use WelsSnprintf instead of direct snprintf in tests (cisco#3608)

    Versions of MSVC before 2015 lack snprintf; within the codec codebase
    itself, this is wrapped into WelsSnprintf. Within the testcases, there
    were no uses of snprintf previously, only sprintf.
    
    We could of course decide to stop caring about older versions of
    MSVC, but so far, those versions have still worked just fine.
    However, that requires changes to the build files for Windows Phone
    ("make OS=msvc-wp"), which currently expect to be built with MSVC 2013.
    
    Define NOMINMAX before including windows.h, to avoid windows.h
    breaking std::min in test code.
    mstorsjo authored Dec 22, 2022
    Configuration menu
    Copy the full SHA
    0b2ef5e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e6a1e91 View commit details
    Browse the repository at this point in the history
  8. 1 Configuration menu
    Copy the full SHA
    4d8729c View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2022

  1. Configuration menu
    Copy the full SHA
    be615a4 View commit details
    Browse the repository at this point in the history
  2. Add unit test for IdctResAddPred8x8_c/lsx (cisco#3591)

    The meson test -C builddir -v outputs on LoongArch:
    
    [----------] 5 tests from DecoderDecodeMbAux
    [ RUN      ] DecoderDecodeMbAux.IdctResAddPred_c
    [       OK ] DecoderDecodeMbAux.IdctResAddPred_c (1 ms)
    [ RUN      ] DecoderDecodeMbAux.IdctResAddPred_lsx
    [       OK ] DecoderDecodeMbAux.IdctResAddPred_lsx (1 ms)
    [ RUN      ] DecoderDecodeMbAux.WelsNonZeroCount_c
    [       OK ] DecoderDecodeMbAux.WelsNonZeroCount_c (0 ms)
    [ RUN      ] DecoderDecodeMbAux.IdctResAddPred8x8_c
    [       OK ] DecoderDecodeMbAux.IdctResAddPred8x8_c (8 ms)
    [ RUN      ] DecoderDecodeMbAux.IdctResAddPred8x8_lsx
    [       OK ] DecoderDecodeMbAux.IdctResAddPred8x8_lsx (6 ms)
    [----------] 5 tests from DecoderDecodeMbAux (16 ms total)
    
    Co-authored-by: Jin Bo <[email protected]>
    jinboson and jinboson authored Dec 23, 2022
    Configuration menu
    Copy the full SHA
    c4156d5 View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2022

  1. pick up PR#3261 (cisco#3599)

    1. switch from ant to gradle
    2. use clang as the default toolchain
    Co-authored-by: alexcohn <[email protected]>
    GuangweiWang authored Dec 27, 2022
    2 Configuration menu
    Copy the full SHA
    b16f0c2 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2023

  1. Switch building of the unittest from Ant to Gradle (cisco#3612)

    This was missed in b16f0c2
    where the other targets were switched from Ant to Gradle.
    
    This fixes building after switching to a newer version of the
    Android SDK (suppporting Gradle) where Ant no longer is supported.
    mstorsjo authored Jan 4, 2023
    1 Configuration menu
    Copy the full SHA
    045aeac View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2023

  1. Use getauxval to detect cpu capabilities (cisco#3628)

    Will crash if cpucfg instruction is not supported.
    jinboson authored Feb 28, 2023
    Configuration menu
    Copy the full SHA
    f8aeaae View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2023

  1. Fix PSkip fast algorithm from screen-sharing (cisco#3638)

    Co-authored-by: Yu-Chen (Eric) Sun <[email protected]>
    YCSun-Meta and Yu-Chen (Eric) Sun authored Mar 24, 2023
    Configuration menu
    Copy the full SHA
    290eea3 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2023

  1. Fix NOMINMAX macro redefined issue (cisco#3641)

    * Fix PSkip fast algorithm from screen-sharing
    
    * Fix NOMINMAX macro redefined issue
    
    ---------
    
    Co-authored-by: Yu-Chen (Eric) Sun <[email protected]>
    YCSun-Meta and Yu-Chen (Eric) Sun authored Mar 29, 2023
    Configuration menu
    Copy the full SHA
    09a4f3e View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2023

  1. Bump the API version to add support for new requirements from Firefox. (

    cisco#3648)
    
    Export the updated presentation timestamp from the decoder. This
    resolves frame jank in Firefox with B frames by displaying frames in
    order, without being dropped due to being too old for display.
    
    Implement Reset to flush pending frames from the decoder. This resolves
    seeking in Firefox with the updated presentation timestamps, where old
    frames would get processed and interfere with the seek.
    
    Expose more options for encoding so that we can potentially implement a
    generic GMP video encoder wrapper.
    aosmond authored Apr 20, 2023
    Configuration menu
    Copy the full SHA
    1772156 View commit details
    Browse the repository at this point in the history
  2. Avoid providing a warning if the requested number of threads is the (c…

    …isco#3618)
    
    current number of threads
    
    It seems that this thread number parameter is always defined.
    
    When starting multiple contexts, it is seem hard to not specify this.
    
    Therefore, you end up with many warnings.
    
    Thank you for considering
    hmaarrfk authored Apr 20, 2023
    Configuration menu
    Copy the full SHA
    6967c09 View commit details
    Browse the repository at this point in the history
  3. add simd optimizations and fix for loongarch (cisco#3649)

    * Add SIMD for loongarch
    
    1. Add VAACalcSadBgd_lasx.
    2. Refine WelsSampleSad8x8x2_lasx & WelsIDctT4Rec_lasx & WelsIDctFourT4Rec_lasx.
    
    * Fix ninja build warning and remove unneeded head files
    
    ===>
    ../codec/encoder/core/loongarch/sample_lasx.c: In function ‘WelsIntra8x8Combined3Sad_lasx’:
    ../codec/encoder/core/loongarch/sample_lasx.c:62:14: warning: implicit declaration of function
    ‘WelsSampleSad8x8_lasx’; did you mean ‘WelsSampleSad8x8_c’? [-Wimplicit-function-declaration]
       iCurCost = WelsSampleSad8x8_lasx(pDstChroma, 8, pEncCb, iEncStride);
                  ^~~~~~~~~~~~~~~~~~~~~
                  WelsSampleSad8x8_c
    <===
    
    (1) WelsSampleSad8x8_lasx called in .c file but wrapped by #if defined(HAVE_LASX) in sad_common.h,
        so need to add HAVE_LASX define for .c files.
    (2) lsx/lasx simd codes are in .c files, so there is no need to add -mlsx/-mlasx for .cpp files.
    jinboson authored Apr 20, 2023
    Configuration menu
    Copy the full SHA
    9866066 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. Configuration menu
    Copy the full SHA
    8f7fc38 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2023

  1. compatible build with andrandroid-ndk-r18 (cisco#3672)

    compatible build with android-ndk-r18
    BenzhengZhang authored Oct 8, 2023
    1 Configuration menu
    Copy the full SHA
    008465e View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2023

  1. Fix for out of bounds read issue by introducing bounds check on iPicB…

    …uffIdx in CWelsDecoder::ReleaseBufferedReadyPictureReorder (cisco#3685)
    calvano-fb authored Oct 23, 2023
    2 Configuration menu
    Copy the full SHA
    986bd65 View commit details
    Browse the repository at this point in the history
  2. A fuzzer found a null pointer dereference in welsDecoderExt.c (cisco#…

    …3686)
    
    This commit adds a NULL check before the pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb object is dereferenced in CWelsDecoder::BufferingReadyPicture
    calvano-fb authored Oct 23, 2023
    Configuration menu
    Copy the full SHA
    859a08c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b3feec2 View commit details
    Browse the repository at this point in the history
  4. Use Ant compile demo and UT projects when NDK version lower than r18 (c…

    …isco#3690)
    
    * android-ndk-r18b and below use Ant to compile demo and unit_test projects
    
    * give the ndk-version-check.sh executable permissions
    BenzhengZhang authored Oct 23, 2023
    Configuration menu
    Copy the full SHA
    15d02fc View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2023

  1. 4 Configuration menu
    Copy the full SHA
    34e14ea View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2023

  1. Configuration menu
    Copy the full SHA
    34a0d2d View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2023

  1. Fix off by one regression in decoder (cisco#3704)

    Fix iPicBuffIdx bounds check introduced in commit
    986bd65 and allow 0 as an index value.
    
    This fixes Big_Buck_Bunny_720_10s_30MB.mp4 playback with gst-play-1.0.
    kalev authored Dec 4, 2023
    Configuration menu
    Copy the full SHA
    fd66e67 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2023

  1. Add security policy (cisco#3708)

    * Add security policy
    
    Signed-off-by: Pedro Kaj Kjellerup Nacht <[email protected]>
    
    * Not all maintainers are volunteers
    
    * Use BenzhengZhang's email
    
    Signed-off-by: Pedro Kaj Kjellerup Nacht <[email protected]>
    
    * Only use email
    
    Signed-off-by: Pedro Kaj Kjellerup Nacht <[email protected]>
    
    ---------
    
    Signed-off-by: Pedro Kaj Kjellerup Nacht <[email protected]>
    pnacht authored Dec 14, 2023
    Configuration menu
    Copy the full SHA
    cfbd589 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. Fix glitches that sometimes happen near the scene changes. (cisco#3707)

    * Add missing iLastWrittenPOC setting in unbuffered reordering.
    
    In CWelsDecoder::ReorderPicturesInDisplay(), iLastWrittenPOC was
    not set in unbuffered-reordering case. Due to this problem, it
    sometimes reordered the frames incorrectly. This patch fixes the
    issue.
    
    * Prevent frame buffer from overwrite at GOP change.
    
    When bNewSeqBegin got true, iRefCount was forcibly reset even if the
    buffer was still used for reordering. Due to this problem, the buffer
    in use was sometimes overwritten with newly decoded frame. This commit
    is for fixing that problem.
    
    * Fix test failure due to the issue of the previous commit.
    
    * Fix glitch occurs when multiple scene changes happen in a short time.
    
    Previously, when more than 2 frame sequences exist in the reordering
    buffer, the reordering does not work correctly. This is because the
    management based on bLastGOP flag does not work in this case.
    Instead, this patch introduces frame sequence number (iSeqNum) to
    distingish frames belonging to each sequence and drops bLastGOP flag.
    tyan0 authored Jan 19, 2024
    Configuration menu
    Copy the full SHA
    4f01c15 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. Configuration menu
    Copy the full SHA
    b29fd81 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. Configuration menu
    Copy the full SHA
    c59550a View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2024

  1. Fix regression in PR#3707 for multi-thread decoding (cisco#3734)

    * Fix regression in PR#3707 for multi-thread decoding
    
    The variable iSeqNum introduced in PR#3707 should be common within
    the decoder, however each decoding thread in the same decoder had
    its own one. Due to this issue, multi-thread decoding failed.
    This patch fixes that.
    
    * Fix segfault caused in WelsDecodeInitAccessUnitStart()
    
    ... if CWelsDecoder::InitDecoderCtx() is not called.
    tyan0 authored Apr 1, 2024
    Configuration menu
    Copy the full SHA
    c0e5ea2 View commit details
    Browse the repository at this point in the history
  2. Fix WelsTraceCallback conversion. (cisco#3722)

    Signed-off-by: ayamir <[email protected]>
    ayamir authored Apr 1, 2024
    Configuration menu
    Copy the full SHA
    28b533a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f86f0e4 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. Fix crash on multi-thread decoding. (cisco#3736)

    When decoding:
    https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov
    in multi-threads, openh264 crashes with segfault. This patch fixes
    the issue.
    tyan0 authored Apr 10, 2024
    Configuration menu
    Copy the full SHA
    1debdae View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2024

  1. Fix race issue among decoding threads which causes broken frame. (cis…

    …co#3735)
    
    Trim event timings for multi-thread cooperation.
    tyan0 authored Apr 18, 2024
    Configuration menu
    Copy the full SHA
    1c23887 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. Remove unused pSpatialLayer variable in DetermineTemporalSettings (ci…

    …sco#3761)
    
    * Remove unused pSpatialLayer and iSliceIndex variables
    
    which break on Mac CI settings due to the variables being unused
    
    * one more
    
    * moar
    fippo authored Jul 1, 2024
    Configuration menu
    Copy the full SHA
    de02617 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. Change picOrderCnt to 2 (cisco#3752)

    * Change picOrderCnt to 2
    
    changes the picOrderCnt field to 2 (which means the output order
    is the same as the decode order) which is more suited to realtime
    usage and allows the decoder to immediately decode a frame without
    waiting for out-of-order frames. This reduces the decoding latency
    on Qualcomm hardware decoders which do not honor the VUI parameter
      max_num_reorder_frames
    
    * bump hashes
    
    * bump asan hashes
    
    * Revert "bump asan hashes"
    
    This reverts commit 7aa8b3d.
    
    * fix last hashes
    
    * update second hash for ASAN
    
    * fix more hashes
    fippo authored Jul 3, 2024
    Configuration menu
    Copy the full SHA
    478e5ab View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2024

  1. Configuration menu
    Copy the full SHA
    4ab86b8 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2024

  1. Fix deadlock at the end of decoding. (cisco#3767)

    For some h264 files, h264dec hangs at the end of decoding. This is
    regression caused by the commit 1c23887. This patch fixes the
    issue by adding SET_EVENT(&m_sReleaseBufferEvent) to SetOption(
    DECODER_OPTION_END_OF_STREAM) and CloseDecoderThreads().
    tyan0 authored Jul 18, 2024
    Configuration menu
    Copy the full SHA
    e0bbb7f View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2024

  1. Fix frame-decode errors. (cisco#3723)

    * Enable ReorderRefList2() which was added by the commit 1b8caef.
    
    ... and fix trivial issue of that function. This solves the some
    frame decode error.
    
    * Add workaround for frame decode error due to emulation byte.
    
    * Fix a bug which seems due to a typo in WelsReorderRefList2()
    
    This fixes the fuzzing test failure.
    
    Addresses: cisco#3772
    tyan0 authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    fa6d099 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. build: fix build with meson on riscv64 (cisco#3773)

    RISC-V is a rising open-standarded RISC ISA. This commit makes mesonbuild
    fallbacks to C implementation correctly on riscv64 platform instead of
    throwing a "FIXME: unhandled CPU family" error.
    
    Signed-off-by: Yao Zi <[email protected]>
    ziyao233 authored Aug 19, 2024
    Configuration menu
    Copy the full SHA
    cea886e View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2024

  1. Enable pac bti support (cisco#3775)

    * readme: update meson build command
    
    Fixes warning:
    WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
    
    Signed-off-by: Bill Roberts <[email protected]>
    
    * meson.build: fix suffix on HAVE_NEON_AARCH64
    
    rename HAVE_NEON_AARCH64 to the in-use define for
    controlling NEON: HAVE_NEON_AARCH64
    
    Signed-off-by: Bill Roberts <[email protected]>
    
    * aarch64: enable PAC/BTI
    
    Enable Pointer Authentication Codes (PAC) and Branch Target
    Identification (BTI) support for ARM 64 targets.
    
    OpenH264 does not require any of the PAC signing and verification as the
    leaf functions do not store x30 to the stack. Also, no indirect branches
    are performed so no need to annotate branch targets with bti j landing
    pad instructions. The only thing required is to label the function entry
    points with bti c instructions and ensure the GNU Notes are updated for
    their respective features when enabled for ELF files.
    
    A detailed summary on how PAC and BTI work are provided below for
    clarity.
    
    PAC works by signing the LR with either an A key or B key and verifying
    the return address. There are quite a few instructions capable of doing
    this, however, the Linux ARM ABI is to use hint compatible instructions
    that can be safely NOP'd on older hardware and can be assembled and
    linked with older binutils. This limits the instruction set to paciasp,
    pacibsp, autiasp and autibsp. Instructions prefixed with pac are for
    signing and instructions prefixed with aut are for signing. Both
    instructions are then followed with an a or b to indicate which signing
    key they are using. The keys can be controlled using
    -mbranch-protection=pac-ret for the A key and
    -mbranch-protection=pac-ret+b-key for the B key.
    
    BTI works by marking all indirect call and jump positions with bti c
    and bti j instructions respectively. If execution control transfers
    to an instruction other than a BTI instruction, the execution is
    killed via SIGILL. Note that to remove one instruction, the
    aforementioned pac instructions will also work as a BTI landing pad
    for bti c usages.
    
    For BTI to work, all object files linked for a unit of execution,
    whether an executable or a library must have the GNU Notes section of
    the ELF file marked to indicate BTI support. This is so loader/linkers
    can apply the proper permission bits (PROT_BRI) on the memory region.
    
    PAC can also be annotated in the GNU ELF notes section, but it's not
    required for enablement, as interleaved PAC and non-pac code works as
    expected since it's the callee that performs all the checking.
    
    Testing was done under the following CFLAGS and CXXFLAGS for all
    combinations:
    
    1. -mbranch-protection=none
    2. -mbranch-protection=standard
    3. -mbranch-protection=pac-ret
    4. -mbranch-protection=pac-ret+b-key
    5. -mbranch-protection=bti
    
    Signed-off-by: Bill Roberts <[email protected]>
    
    ---------
    
    Signed-off-by: Bill Roberts <[email protected]>
    billatarm authored Aug 21, 2024
    Configuration menu
    Copy the full SHA
    3668daf View commit details
    Browse the repository at this point in the history