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, 19 Oct 2022 10:08:01 +0200
From:   Johannes Berg <johannes@...solutions.net>
To:     Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc:     netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
        jiri@...nulli.us, razor@...ckwall.org, nicolas.dichtel@...nd.com,
        gnault@...hat.com, jacob.e.keller@...el.com, fw@...len.de
Subject: Re: [PATCH net-next 06/13] genetlink: add policies for both doit
 and dumpit in ctrl_dumppolicy_start()

On Tue, 2022-10-18 at 16:07 -0700, Jakub Kicinski wrote:
> 
>  
> -		if (!op.policy)
> -			return -ENODATA;
> +		if (doit.policy) {
> +			err = netlink_policy_dump_add_policy(&ctx->state,
> +							     doit.policy,
> +							     doit.maxattr);
> +			if (err)
> +				goto err_free_state;
> +		}
> +		if (dump.policy) {

nit: to me a blank line in places like that would be nicer, but ymmv

>  	for (i = 0; i < genl_get_cmd_cnt(rt); i++) {
> +		struct genl_split_ops doit, dumpit;
> +
>  		genl_get_cmd_by_index(i, rt, &op);
>  
> -		if (op.policy) {
> +		genl_cmd_full_to_split(&doit, ctx->rt, &op, GENL_CMD_CAP_DO);
> +		genl_cmd_full_to_split(&dumpit, ctx->rt,
> +				       &op, GENL_CMD_CAP_DUMP);
> +
> +		if (doit.policy) {
> +			err = netlink_policy_dump_add_policy(&ctx->state,
> +							     doit.policy,
> +							     doit.maxattr);
> +			if (err)
> +				goto err_free_state;
> +		}
> +		if (dumpit.policy) {

same here

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ