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] [day] [month] [year] [list]
Message-ID: <f7cf4c91-7ba6-5771-7a1d-70bed1213dd9@gmail.com>
Date:   Sat, 9 Dec 2017 09:28:17 -0700
From:   David Ahern <dsahern@...il.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Roman Gushchin <guro@...com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-team@...com, ast@...nel.org, daniel@...earbox.net,
        kafai@...com, Quentin Monnet <quentin.monnet@...ronome.com>
Subject: Re: [PATCH v3 net-next 4/4] bpftool: implement cgroup bpf operations

On 12/8/17 4:46 PM, Jakub Kicinski wrote:
>> +	argc -= 2;
>> +	argv = &argv[2];
>> +	prog_fd = prog_parse_fd(&argc, &argv);
>> +	if (prog_fd < 0)
>> +		goto exit_cgroup;
>> +
>> +	for (i = 0; i < argc; i++) {
>> +		if (strcmp(argv[i], "allow_multi") == 0) {
>> +			attach_flags |= BPF_F_ALLOW_MULTI;
>> +		} else if (strcmp(argv[i], "allow_override") == 0) {
>> +			attach_flags |= BPF_F_ALLOW_OVERRIDE;
> 
> I don't feel about this strongly but as I said I was trying to follow
> iproute2's conventions, and it allows aliasing.  So if you type "ip a"
> it will give you the first thing that starts with a, not necessarily
> alphabetically, more likely in order of usefulness or order in which
> things were added.  IOW if "allow_" selects "allow_mutli" that's what I
> would actually expect it to do..
> 
> Maybe others disagree?

The iproute2 syntax is very user friendly, and I agree with following
the conventions.

With respect to the attach flags, allow_yyyyy is a lot to type, but
having 'a .. allow_' mean one flag over the other is going to be
confusing. Perhaps dropping the 'allow_' prefix in favor of just 'multi'
and 'override' and doing prefix match on it? User commands do not need
to follow flag names precisely.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ