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: <20181210141020.535f042a@xeon-e3>
Date:   Mon, 10 Dec 2018 14:10:20 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Leon Romanovsky <leonro@...lanox.com>,
        David Ahern <dsahern@...il.com>
Cc:     netdev@...r.kernel.org
Subject: [iproute] rdma broken on 32 bit

It appears that RDMA is broken on 32 bit platforms.
Sure you don't run on 32bit, but iproute2 needs to build everywhere.

The issue is that  you are assuming a C enum can hold 64 bits.
The standard says enum only has to hold "int" values.
So it breaks on 32bit.

The issue is deeper than just a trivial fix. Please either change iproute
config script to not build RDMA if sizeof(enum) < 64 or fix the code to
use a safe value like uint64_t.

rdma
    CC       rdma.o
    CC       utils.o
    CC       dev.o
    CC       link.o
In file included from rdma.h:26:0,
                 from dev.c:12:
dev.c: In function ‘dev_caps_to_str’:
../include/utils.h:269:38: warning: left shift count >= width of type [-Wshift-count-overflow]
 #define BIT(nr)                 (1UL << (nr))
                                      ^
rdma.h:32:61: note: in expansion of macro ‘BIT’
 #define RDMA_BITMAP_ENUM(name, bit_no) RDMA_BITMAP_##name = BIT(bit_no),
                                                             ^~~
If you wade through the macro swamp:
dev.c
#define RDMA_DEV_FLAGS(x) \

	x(SG_GAPS_REG, 32) \

	enum { RDMA_DEV_FLAGS(RDMA_BITMAP_ENUM) };

Expands to:
	enum {
		RDMA_BITMAP_SG_GAPS_REG = (1UL << (32)),
	};
		

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ