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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Jul 2022 18:57:44 +0000
From:   "Keller, Jacob E" <jacob.e.keller@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [net-next PATCH 1/2] devlink: add dry run attribute to flash
 update



> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Thursday, July 21, 2022 9:48 AM
> To: Keller, Jacob E <jacob.e.keller@...el.com>
> Cc: netdev@...r.kernel.org
> Subject: Re: [net-next PATCH 1/2] devlink: add dry run attribute to flash update
> 
> On Wed, 20 Jul 2022 11:34:32 -0700 Jacob Keller wrote:
> > +	nla_dry_run = info->attrs[DEVLINK_ATTR_DRY_RUN];
> > +	if (nla_dry_run) {
> > +		if (!(supported_params &
> DEVLINK_SUPPORT_FLASH_UPDATE_DRY_RUN)) {
> > +			NL_SET_ERR_MSG_ATTR(info->extack, nla_dry_run,
> > +					    "flash update is supported, but dry run
> is not supported for this device");
> > +			release_firmware(params.fw);
> > +			return -EOPNOTSUPP;
> > +		}
> > +		params.dry_run = true;
> > +	}
> 
> Looks over-indented. You can do this, right?
> 
> 	params.dry_run = nla_get_flag(info->attrs[DEVLINK_ATTR_DRY_RUN]);
> 	if (params.dry_run &&
> 	    !(supported_params &
> DEVLINK_SUPPORT_FLASH_UPDATE_DRY_RUN)) {
> 		/* error handling */
> 	}

Yea that makes more sense.

Thanks,
Jake

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ