lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 3 Mar 2023 11:25:13 +0530
From:   Ravi Bangoria <ravi.bangoria@....com>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     peterz@...radead.org, eranian@...gle.com, acme@...nel.org,
        mark.rutland@....com, jolsa@...nel.org, irogers@...gle.com,
        bp@...en8.de, x86@...nel.org, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org, sandipan.das@....com,
        ananth.narayan@....com, santosh.shukla@....com,
        Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [PATCH 2/2] perf test: Add selftest to test IBS invocation via
 core pmu events

Hi Namhyung,

>> +static int test__ibs_via_core_pmu(struct test_suite *text __maybe_unused,
>> +                                 int subtest __maybe_unused)
>> +{
>> +       struct perf_pmu *ibs_pmu;
>> +       int ret = TEST_OK;
>> +       int fd, i;
>> +
>> +       if (list_empty(&pmus))
>> +               perf_pmu__scan(NULL);
>> +
>> +       ibs_pmu = perf_pmu__find("ibs_op");
>> +       if (!ibs_pmu)
>> +               return TEST_SKIP;
>> +
>> +       for (i = 0; i < NR_SUB_TESTS; i++) {
>> +               fd = event_open(sub_tests[i].type, sub_tests[i].config);
>> +               pr_debug("type: 0x%x, config: 0x%lx, fd: %d  -  ", sub_tests[i].type,
>> +                        sub_tests[i].config, fd);
>> +               if ((sub_tests[i].valid && fd == -1) ||
>> +                   (!sub_tests[i].valid && fd > 0)) {
>> +                       pr_debug("Fail\n");
>> +                       ret = TEST_FAIL;
> 
> You need to close(fd) when it's succeeded for invalid one.

Yup. Will fix it.

Thanks,
Ravi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ