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] [day] [month] [year] [list]
Message-Id: <20200722.180718.1511521016153348074.davem@davemloft.net>
Date:   Wed, 22 Jul 2020 18:07:18 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     parav@...lanox.com
Cc:     netdev@...r.kernel.org, kuba@...nel.org, jiri@...lanox.com
Subject: Re: [PATCH net-next] devlink: Always use user_ptr[0] for devlink
 and simplify post_doit

From: Parav Pandit <parav@...lanox.com>
Date: Wed, 22 Jul 2020 18:57:11 +0300

> Currently devlink instance is searched on all doit() operations.
> But it is optionally stored into user_ptr[0]. This requires
> rediscovering devlink again doing post_doit().
> 
> Few devlink commands related to port shared buffers needs 3 pointers
> (devlink, devlink_port, and devlink_sb) while executing doit commands.
> Though devlink pointer can be derived from the devlink_port during
> post_doit() operation when doit() callback has acquired devlink
> instance lock, relying on such scheme to access devlik pointer makes
> code very fragile.
> 
> Hence, to avoid ambiguity in post_doit() and to avoid searching
> devlink instance again, simplify code by always storing devlink
> instance in user_ptr[0] and derive devlink_sb pointer in their
> respective callback routines.
> 
> Signed-off-by: Parav Pandit <parav@...lanox.com>
> Reviewed-by: Jiri Pirko <jiri@...lanox.com>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ