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]
Date:	Thu, 21 Jun 2007 15:39:32 +0530
From:	"Satyam Sharma" <satyam.sharma@...il.com>
To:	"Keiichi KII" <k-keiichi@...jp.nec.com>
Cc:	"Matt Mackall" <mpm@...enic.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"David Miller" <davem@...emloft.net>, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [RFC][PATCH -mm take5 6/7] add ioctls for adding/removing target

Hi Keiichi,

> > Please do consider configfs. Note that we'll have to lose the sysfs
> > symlink from your target's kobject to the kobject of the ethernet
> > device if we switch to configfs, but was that symlink needed for
> > some essential functionality or was it simply for informational
> > purpose? IMHO, this patchset only needs to bring in functionality
> > to be able to create, destroy, and modify netconsole targets at
> > run-time, and all these reconfiguration tasks would be handled
> > quite well by configfs, AFAICT.
>
> It was for informational pupose. But, if we used symlink to the net_device
> kobject in sysfs, we could easily keep up with changing network device name by
> changing symbolic link.

In that case (because it is non-essential) we can drop that link entirely.
(This means the associated code for the temporary modify_list, the
extra mutex and the kasprintf() stuff can also be dropped too!) I guess
the netconsole_event() notifier could now become simply:

	if (event == NETDEV_CHANGENAME) {
		spin_lock_irqsave(&target_list_lock, ...);
		list_for_each_entry(nt, ..., &target_list, ...)
			if (nt->np.dev == dev)
				strcpy(nt->np.dev_name, dev->name);
		spin_unlock_irqrestore(&target_list_lock, ...);
	}

> In the case of configfs, Do we use config_item related to the network interface
> because the configfs doesn't have symlink that refers to net_device kobject
> (e.g. "network_interface" in configfs, "network_interface" value is "eth0")?

Yes, that's a good idea, this way we continue to give the information we
were giving previously. We could do this by defining another configfs
attribute of the target's config_item which could then be a proxy for
the char dev_name[IFNAMSIZ] member of the target's underlying netpoll
structure. (this attribute would naturally be read-only from userspace;
sort of similar to what you're doing for the local_mac attribute currently).

Please feel free to discuss anything else regarding this with me off-list,
if you want.

Thanks,
Satyam
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ