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

Update libpfm4 #64

Merged
merged 1 commit into from
Aug 24, 2023
Merged

Conversation

gcongiu
Copy link
Contributor

@gcongiu gcongiu commented Aug 14, 2023

Pull Request Description

Original commit:

Author: William Cohen <wcohen@redhat.com>
Date:   Fri Jun 30 15:06:22 2023 -0400

    Correct the arguments in a number of printf statements

    Adjusted the printf statements to fix the following issues flagged by
    static analsysis:

     Error: PRINTF_ARGS (CWE-685): [#def66]
     libpfm-4.13.0/lib/pfmlib_intel_x86.c:87: extra_argument: This argument was not used by the format string: "e->fstr".
     #   85|                __pfm_vbprintf(" any=%d", reg.sel_anythr);
     #   86|
     #   87|->      __pfm_vbprintf("]", e->fstr);
     #   88|
     #   89|        for (i = 1 ; i < e->count; i++)

     Error: PRINTF_ARGS (CWE-685): [#def11]
     libpfm-4.13.0/lib/pfmlib_amd64_perf_event.c:78: missing_argument: No argument for format specifier "%d".
     #   76|
     #   77|        if (e->count > 1) {
     #   78|->              DPRINT("%s: unsupported count=%d\n", e->count);
     #   79|                return PFM_ERR_NOTSUPP;
     #   80|        }

     Error: PRINTF_ARGS (CWE-685): [#def14]
     libpfm-4.13.0/lib/pfmlib_common.c:1151: missing_argument: No argument for format specifier "%d".
     # 1149|
     # 1150|                if (pfmlib_is_blacklisted_pmu(p)) {
     # 1151|->                      DPRINT("%d PMU blacklisted, skipping initialization\n");
     # 1152|                        continue;
     # 1153|                }

     Error: PRINTF_ARGS (CWE-685): [#def15]
     libpfm-4.13.0/lib/pfmlib_common.c:1367: missing_argument: No argument for format specifier "%s".
     # 1365|                        ainfo->equiv= NULL;
     # 1366|                        if (*endptr) {
     # 1367|->                              DPRINT("raw umask (%s) is not a number\n");
     # 1368|                                return PFM_ERR_ATTR;
     # 1369|

     Error: PRINTF_ARGS (CWE-685): [#def34]
     libpfm-4.13.0/lib/pfmlib_intel_skx_unc_cha.c:60: missing_argument: No argument for format specifier "%x".
     #   58|        f.val = e->codes[1];
     #   59|
     #   60|->      __pfm_vbprintf("[UNC_CHA_FILTER0=0x%"PRIx64" thread_id=%d source=0x%x state=0x%x"
     #   61|                       " state=0x%x]\n",
     #   62|                        f.val,

     Error: PRINTF_ARGS (CWE-685): [#def83]
     libpfm-4.13.0/lib/pfmlib_intel_x86_perf_event.c:100: missing_argument: No argument for format specifier "%d".
     #   98|
     #   99|        if (e->count > 2) {
     #  100|->              DPRINT("%s: unsupported count=%d\n", e->count);
     #  101|                return PFM_ERR_NOTSUPP;
     #  102|        }

    Signed-off-by: William Cohen <wcohen@redhat.com>

Author Checklist

  • Description
    Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
  • Commits
    Commits are self contained and only do one thing
    Commits have a header of the form: module: short description
    Commits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
  • Tests
    The PR needs to pass all the tests

Original commit:

    Author: William Cohen <wcohen@redhat.com>
    Date:   Fri Jun 30 15:06:22 2023 -0400

        Correct the arguments in a number of printf statements

        Adjusted the printf statements to fix the following issues flagged by
        static analsysis:

         Error: PRINTF_ARGS (CWE-685): [#def66]
         libpfm-4.13.0/lib/pfmlib_intel_x86.c:87: extra_argument: This argument was not used by the format string: "e->fstr".
         #   85|                __pfm_vbprintf(" any=%d", reg.sel_anythr);
         #   86|
         #   87|->      __pfm_vbprintf("]", e->fstr);
         #   88|
         #   89|        for (i = 1 ; i < e->count; i++)

         Error: PRINTF_ARGS (CWE-685): [#def11]
         libpfm-4.13.0/lib/pfmlib_amd64_perf_event.c:78: missing_argument: No argument for format specifier "%d".
         #   76|
         #   77|        if (e->count > 1) {
         #   78|->              DPRINT("%s: unsupported count=%d\n", e->count);
         #   79|                return PFM_ERR_NOTSUPP;
         #   80|        }

         Error: PRINTF_ARGS (CWE-685): [#def14]
         libpfm-4.13.0/lib/pfmlib_common.c:1151: missing_argument: No argument for format specifier "%d".
         # 1149|
         # 1150|                if (pfmlib_is_blacklisted_pmu(p)) {
         # 1151|->                      DPRINT("%d PMU blacklisted, skipping initialization\n");
         # 1152|                        continue;
         # 1153|                }

         Error: PRINTF_ARGS (CWE-685): [#def15]
         libpfm-4.13.0/lib/pfmlib_common.c:1367: missing_argument: No argument for format specifier "%s".
         # 1365|                        ainfo->equiv= NULL;
         # 1366|                        if (*endptr) {
         # 1367|->                              DPRINT("raw umask (%s) is not a number\n");
         # 1368|                                return PFM_ERR_ATTR;
         # 1369|

         Error: PRINTF_ARGS (CWE-685): [#def34]
         libpfm-4.13.0/lib/pfmlib_intel_skx_unc_cha.c:60: missing_argument: No argument for format specifier "%x".
         #   58|        f.val = e->codes[1];
         #   59|
         #   60|->      __pfm_vbprintf("[UNC_CHA_FILTER0=0x%"PRIx64" thread_id=%d source=0x%x state=0x%x"
         #   61|                       " state=0x%x]\n",
         #   62|                        f.val,

         Error: PRINTF_ARGS (CWE-685): [#def83]
         libpfm-4.13.0/lib/pfmlib_intel_x86_perf_event.c:100: missing_argument: No argument for format specifier "%d".
         #   98|
         #   99|        if (e->count > 2) {
         #  100|->              DPRINT("%s: unsupported count=%d\n", e->count);
         #  101|                return PFM_ERR_NOTSUPP;
         #  102|        }

        Signed-off-by: William Cohen <wcohen@redhat.com>
@gcongiu gcongiu merged commit 6219c5d into icl-utk-edu:master Aug 24, 2023
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants