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]
Message-ID: <SA2PR11MB51001777DC391C7E2626E84AD6919@SA2PR11MB5100.namprd11.prod.outlook.com>
Date:   Thu, 21 Jul 2022 20:32:25 +0000
From:   "Keller, Jacob E" <jacob.e.keller@...el.com>
To:     Jiri Pirko <jiri@...nulli.us>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Jakub Kicinski <kuba@...nel.org>
Subject: RE: [net-next PATCH 1/2] devlink: add dry run attribute to flash
 update



> -----Original Message-----
> From: Jiri Pirko <jiri@...nulli.us>
> Sent: Wednesday, July 20, 2022 10:55 PM
> To: Keller, Jacob E <jacob.e.keller@...el.com>
> Cc: netdev@...r.kernel.org; Jakub Kicinski <kuba@...nel.org>
> Subject: Re: [net-next PATCH 1/2] devlink: add dry run attribute to flash update

<...>

> > struct devlink_region;
> > struct devlink_info_req;
> >diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
> >index b3d40a5d72ff..e24a5a808a12 100644
> >--- a/include/uapi/linux/devlink.h
> >+++ b/include/uapi/linux/devlink.h
> >@@ -576,6 +576,14 @@ enum devlink_attr {
> > 	DEVLINK_ATTR_LINECARD_TYPE,		/* string */
> > 	DEVLINK_ATTR_LINECARD_SUPPORTED_TYPES,	/* nested */
> >
> >+	/* Before adding this attribute to a command, user space should check
> >+	 * the policy dump and verify the kernel recognizes the attribute.
> >+	 * Otherwise older kernels which do not recognize the attribute may
> >+	 * silently accept the unknown attribute while not actually performing
> >+	 * a dry run.
> 
> Why this comment is needed? Isn't that something generic which applies
> to all new attributes what userspace may pass and kernel may ignore?
> 

Because other attributes may not have such a negative and unexpected side effect. In most cases the side effect will be "the thing you wanted doesn't happen", but in this case its "the thing you didn't want to happen does". I think that deserves some warning. A dry run is a request to *not* do something.

Thanks,
Jake

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ