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:   Tue, 20 Sep 2016 12:59:42 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Nikolay Aleksandrov' <nikolay@...ulusnetworks.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "roopa@...ulusnetworks.com" <roopa@...ulusnetworks.com>,
        "sashok@...ulusnetworks.com" <sashok@...ulusnetworks.com>,
        "davem@...emloft.net" <davem@...emloft.net>
Subject: RE: [PATCH net] ipmr, ip6mr: return lastuse relative to now

From: Nikolay Aleksandrov
> Sent: 20 September 2016 10:06
> When I introduced the lastuse member I made a subtle error because it was
> returned as an absolute value but that is meaningless to user-space as it
> doesn't allow to see how old exactly an entry is. Let's make it similar to
> how the bridge returns such values and make it relative to "now" (jiffies).
> This allows us to show the actual age of the entries and is much more
> useful (e.g. user-space daemons can age out entries, iproute2 can display
> the lastuse properly).
> 
...
> +			      jiffies_to_clock_t(jiffies -
> +						 c->mfc_un.res.lastuse),

You probably need to ensure the 'age' isn't negative because
'lastuse' got updated after 'jiffies' was read and there was
a clock interrupt in the gap.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ