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:   Wed, 7 Sep 2022 08:51:56 +0000
From:   "Zhou, Jie2X" <jie2x.zhou@...el.com>
To:     Ido Schimmel <idosch@...sch.org>
CC:     "andrii@...nel.org" <andrii@...nel.org>,
        "mykolal@...com" <mykolal@...com>,
        "ast@...nel.org" <ast@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "martin.lau@...ux.dev" <martin.lau@...ux.dev>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "hawk@...nel.org" <hawk@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Li, Philip" <philip.li@...el.com>,
        "petrm@...dia.com" <petrm@...dia.com>
Subject: Re: test ./tools/testing/selftests/bpf/test_offload.py failed

hi,

>Most likely a bug in netdevsim itself as it sets the mode of this file
>as "rw" instead of "w". The test actually knows to skip such files:
>Can you test the following patch?
Sorry, I want to confirm that have you ever run test_offload.py test?
What is the output of test_offload.py?

best regards,

________________________________________
From: Ido Schimmel <idosch@...sch.org>
Sent: Wednesday, September 7, 2022 2:43 PM
To: Zhou, Jie2X
Cc: andrii@...nel.org; mykolal@...com; ast@...nel.org; daniel@...earbox.net; martin.lau@...ux.dev; davem@...emloft.net; kuba@...nel.org; hawk@...nel.org; netdev@...r.kernel.org; bpf@...r.kernel.org; linux-kselftest@...r.kernel.org; linux-kernel@...r.kernel.org; Li, Philip; petrm@...dia.com
Subject: Re: test ./tools/testing/selftests/bpf/test_offload.py failed

On Wed, Sep 07, 2022 at 01:16:57PM +0800, Jie2x Zhou wrote:
> I found that "disable_ifindex" file do not set read function, so return -EINVAL when do read.
> Is it a bug in test_offload.py?

Most likely a bug in netdevsim itself as it sets the mode of this file
as "rw" instead of "w". The test actually knows to skip such files:

            p = os.path.join(path, f)
            if not os.stat(p).st_mode & stat.S_IRUSR:
                continue

Can you test the following patch?

diff --git a/drivers/net/netdevsim/hwstats.c b/drivers/net/netdevsim/hwstats.c
index 605a38e16db0..0e58aa7f0374 100644
--- a/drivers/net/netdevsim/hwstats.c
+++ b/drivers/net/netdevsim/hwstats.c
@@ -433,11 +433,11 @@ int nsim_dev_hwstats_init(struct nsim_dev *nsim_dev)
                goto err_remove_hwstats_recursive;
        }

-       debugfs_create_file("enable_ifindex", 0600, hwstats->l3_ddir, hwstats,
+       debugfs_create_file("enable_ifindex", 0200, hwstats->l3_ddir, hwstats,
                            &nsim_dev_hwstats_l3_enable_fops.fops);
-       debugfs_create_file("disable_ifindex", 0600, hwstats->l3_ddir, hwstats,
+       debugfs_create_file("disable_ifindex", 0200, hwstats->l3_ddir, hwstats,
                            &nsim_dev_hwstats_l3_disable_fops.fops);
-       debugfs_create_file("fail_next_enable", 0600, hwstats->l3_ddir, hwstats,
+       debugfs_create_file("fail_next_enable", 0200, hwstats->l3_ddir, hwstats,
                            &nsim_dev_hwstats_l3_fail_fops.fops);

        INIT_DELAYED_WORK(&hwstats->traffic_dw,

>
> test output:
>  selftests: bpf: test_offload.py
>  Test destruction of generic XDP...
> ......
>      raise Exception("Command failed: %s\n%s" % (proc.args, stderr))
>  Exception: Command failed: cat /sys/kernel/debug/netdevsim/netdevsim0//ports/0/dev/hwstats/l3/disable_ifindex
>
>  cat: /sys/kernel/debug/netdevsim/netdevsim0//ports/0/dev/hwstats/l3/disable_ifindex: Invalid argument
>  not ok 20 selftests: bpf: test_offload.py # exit=1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ