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:	Thu, 26 Apr 2007 13:02:04 +0900
From:	Keiichi KII <k-keiichi@...jp.nec.com>
To:	Stephen Hemminger <shemminger@...ux-foundation.org>
CC:	Andrew Morton <akpm@...ux-foundation.org>, mpm@...enic.com,
	davem@...emloft.net, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [RFC][PATCH -mm take4 2/6] support multiple logging

>>>> Well..  before you can finish this work we need to decide upon what the
>>>> interface to userspace will be.
>>>>
>>>> - The miscdev isn't appropriate
>>>>
>>> Why isn't miscdev appropriate? 
>>> We just shouldn't use miscdev for networking conventionally?
>>>
>> Yes it's rather odd, especially for networking.
>>
>> What does the miscdev _do_ anyway?  Is it purely a target for the ioctls?

Yes, I purely use miscdev for the ioctls.

I want to use sysfs and ioctl to implement the dynamic configurabillity.
The sysfs shows/changes netconsole configurations(IP address, port and so on).
A userland application using the ioctl adds/removes netconsole port.

I thought that the dynamic configurability could be realized without a 
userland application. in the kernel only.
(e.g. only sysfs, no userland application)
But I think we need the function to automatically resolve the destination 
MAC address from IP address because of the resolving cost and 
I should implement a userland application, not netconsole kernel module.
The netconsle will become more useful by implementing the above function.

> Some other speculations:
> 1. Would it be possible to add ioctl's to /dev/console? This would be more in
>     keeping with older Unix style model.
> 
> 2. Using sysfs makes sense if there is a device object that exists to
>    add the sysfs attributes to.
> 
> 3. Procfs is handy for summary type tables.
> 
> 4. Netlink does feel like overkill for this. Although newer generic netlink
>    makes it easier.

If I use sysfs, Is it proper location that adds each attributes of netconsole 
port in "/sys/class/misc/netconsole/port[0-9]*", or another locations in /sys/?

Stephen Hemminger said "The configuration of netconsole's looks like the 
configuration of routes".
I think so too.
So I think ioctl commands for adding/removing port and the following userland 
application like route(8) command by using the ioctl.

e.g.
1. add port
# netconfig add 192.168.0.10 6666

2. remove port
# netconfig remove 1

3. show port info
# netconfig
id status  Source IP   Source Port Destination IP Destination Port Destination MAC
1  enable  192.168.0.1 6665        192.168.0.10   6666             00:11:22:33:44:55
2  disable 192.168.0.1 6665        192.168.0.20   6666             00:11:22:33:44:66

route(8) command uses ioctl for Netlink.
But, I'm going to implement ioctl's to /dev/console because of the above comments.

Thank you for your comments.
Any comments very welcome.
-- 
Keiichi KII
NEC Corporation OSS Promotion Center
E-mail: k-keiichi@...jp.nec.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ