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: <20150924.225508.2124748200966556070.davem@davemloft.net>
Date:	Thu, 24 Sep 2015 22:55:08 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	sfeldma@...il.com
Cc:	vivien.didelot@...oirfairelinux.com, jiri@...nulli.us,
	netdev@...r.kernel.org, idosch@...lanox.com, eladr@...lanox.com,
	f.fainelli@...il.com, linux@...ck-us.net, rami.rosen@...el.com,
	roopa@...ulusnetworks.com, pjonnala@...adcom.com, andrew@...n.ch,
	gospo@...ulusnetworks.com, jiri@...lanox.com
Subject: Re: [patch net-next v3 02/10] switchdev: introduce transaction
 item queue for attr_set and obj_add

From: Scott Feldman <sfeldma@...il.com>
Date: Thu, 24 Sep 2015 22:29:43 -0700

> I'd rather keep 2-phase not optional, or at least make it some what of
> a pain for drivers to opt-out of 2-phase.  Forcing the driver to see
> both phases means the driver needs to put some code to skip phase 1
> (and hopefully has some persistent comment explaining why its being
> skipped).  Something like:
> 
> /* I'm skipping phase 1 prepare for this operation.  I have infinite hardware
>  * resources and I'm not setting any persistent state in the driver or device
>  * and I don't need any dynamic resources from the kernel, so its impossible
>  * for me to fail phase 2 commit.  Nothing to prepare, sorry.
>  */

I agree with Scott here.

If you can opt out of something, you can not think about it and thus
more likely get it wrong.

I can just see a driver not implementing prepare at all and then doing
stupid things in commit when they hit some resource limit or whatever,
rather than taking care of such issues in prepare.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ