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: <20181214121910.5ec0fac9@endymion>
Date:   Fri, 14 Dec 2018 12:19:10 +0100
From:   Jean Delvare <jdelvare@...e.de>
To:     netdev@...r.kernel.org
Subject: Identifying a network namespace

Hi all,

The question: is there any way to uniquely identify a network namespace
in the kernel?

The context: for debugging purposes, I need to log information about
network devices. netdev_info() uses the device name to identify the
device, however there can be several devices by that name in different
namespaces. To know which device the message relates to, I would need
to know the namespace in addition to the device name. For all I know,
the namespace's name is a user-space thing and the kernel has no idea.
But I would at least need some kind of unique identifier to group log
message by device.

So far I'm using the struct address returned by dev_net() as the unique
ID, but leaking kernel addresses to userspace is not recommended. So I
am wondering, is there another recommended way to uniquely identify a
network namespace in a log message?

Thanks,
-- 
Jean Delvare
SUSE L3 Support

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ