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-next>] [day] [month] [year] [list]
Message-ID: <AANLkTin1LCgEpBNay_o4dzF1ONKanR1HRqcOu3AqqyHu@mail.gmail.com>
Date:	Wed, 12 Jan 2011 12:19:10 +0200
From:	Lucian Adrian Grijincu <lucian.grijincu@...il.com>
To:	netdev@...r.kernel.org, Thomas Graf <tgraf@...radead.org>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Alexey Kuznetsov <kuznet@....inr.ac.ru>,
	"Pekka Savola (ipv6)" <pekkas@...core.fi>,
	James Morris <jmorris@...ei.org>,
	Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
	Patrick McHardy <kaber@...sh.net>,
	Octavian Purdila <opurdila@...acom.com>,
	Vlad Dogaru <ddvlad@...edu.org>
Subject: [PATCH] ipv4: devconf: start IPV4_DEVCONF_* from 0

The IPV4_DEVCONF_* enums are never exposed to the userspace and it
would make code simpler to remove all the useless (-1) adjustments.

-----

Thomas Graf added an interface that exposes the enums (counting from 1)
for libnl which seems to be the only user of the interface:

commit 9f0f7272ac9506f4c8c05cc597b7e376b0b9f3e4
Author: Thomas Graf <tgraf@...radead.org>
Date:   Tue Nov 16 04:32:48 2010 +0000

    ipv4: AF_INET link address family

The development branch of libnl[0] redefines the enums in userspace
counting from 1 (to mimic the 2.6.37 kernel).

The stable[1] version of libnl does not define or use these enums.

This patch adjusts the number received from userspace to not break the
ABI, but given these circumstances, could we consider the 2.6.37 ABI
unstable and change the only user to start counting from 0?

[0] http://git.kernel.org/?p=libs/netlink/libnl.git
[1] http://git.kernel.org/?p=libs/netlink/libnl-stable.git

-----

    And the moral of the story is that we had better regard — after
    all those centuries! — zero as a most natural number.

    http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html

CC: Edsger Wybe Dijkstra <dijkstra@...utexas.edu>
CC: Thomas Graf <tgraf@...radead.org>
Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@...il.com>
---
 include/linux/inetdevice.h |    9 +++------
 net/ipv4/devinet.c         |   44 ++++++++++++++++++++++++++------------------
 2 files changed, 29 insertions(+), 24 deletions(-)

View attachment "0003-ipv4-devconf-start-IPV4_DEVCONF_-from-0.patch" of type "text/x-patch" (5017 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ