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:   Thu, 2 Feb 2023 12:58:09 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     alejandro.lucero-palau@....com
Cc:     netdev@...r.kernel.org, linux-net-drivers@....com,
        davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        edumazet@...gle.com, habetsm.xilinx@...il.com,
        ecree.xilinx@...il.com, linux-doc@...r.kernel.org, corbet@....net,
        jiri@...dia.com
Subject: Re: [PATCH v5 net-next 2/8] sfc: add devlink info support for ef100

Thu, Feb 02, 2023 at 12:14:17PM CET, alejandro.lucero-palau@....com wrote:
>From: Alejandro Lucero <alejandro.lucero-palau@....com>
>
>Support for devlink info command.

You are quite brief for couple hundred line patch. Care to shed some
more details for the reader? Also, use imperative mood (applies to the
rest of the pathes)

[...]


>+static int efx_devlink_info_get(struct devlink *devlink,
>+				struct devlink_info_req *req,
>+				struct netlink_ext_ack *extack)
>+{
>+	struct efx_devlink *devlink_private = devlink_priv(devlink);
>+	struct efx_nic *efx = devlink_private->efx;
>+	char msg[NETLINK_MAX_FMTMSG_LEN];
>+	int errors_reported = 0;
>+	int rc;
>+
>+	/* Several different MCDI commands are used. We report first error
>+	 * through extack along with total number of errors. Specific error
>+	 * information via system messages.
>+	 */
>+	rc = efx_devlink_info_board_cfg(efx, req);
>+	if (rc) {
>+		sprintf(msg, "Getting board info failed");
>+		errors_reported++;
>+	}
>+	rc = efx_devlink_info_stored_versions(efx, req);
>+	if (rc) {
>+		if (!errors_reported)
>+			sprintf(msg, "Getting stored versions failed");
>+		errors_reported += rc;
>+	}
>+	rc = efx_devlink_info_running_versions(efx, req);
>+	if (rc) {
>+		if (!errors_reported)
>+			sprintf(msg, "Getting board info failed");
>+		errors_reported++;


Under which circumstances any of the errors above happen? Is it a common
thing? Or is it result of some fatal event?

You treat it like it is quite common, which seems very odd to me.
If they are rare, just return error right away to the caller.



>+	}
>+
>+	if (errors_reported)
>+		NL_SET_ERR_MSG_FMT(extack,
>+				   "%s. %d total errors. Check system messages",
>+				   msg, errors_reported);
>+	return 0;
>+}
>+
> static const struct devlink_ops sfc_devlink_ops = {
>+	.info_get			= efx_devlink_info_get,
> };

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ