Re: more cause code 0x22 and /etc/chandev.conf
Granted, I was reared by my parents (or wolves; historians aren't sure on that point) to believe that it is ok. My parents -WERE- wolves ... har, har. Nature and nature's laws lay hid in night: God said, 'Let Newton Be!' and all was light. - Alexander Pope It did not last; the Devil howling 'Ho! Let Einstein Be!' restored the status quo.- John Collings Squire God Rolled his dice, to Einstein's great dismay: 'Let Feynman Be!' and all was clear as day. - Jagdish Mehra Gordon W. Wolfe, Ph. D. VM Technical Services, The Boeing Company -- From: Alan Altmark Reply To: Linux on 390 Port Sent: Wednesday, March 10, 2004 5:12 PM To: [EMAIL PROTECTED] Subject: Re: more cause code 0x22 and /etc/chandev.conf On Wednesday, 03/10/2004 at 06:49 CST, Richard Troth [EMAIL PROTECTED] wrote: You let VM and MVS kernels read plain files. Why should Linux be different? Where and when and how MVS and VM read plain files doesn't necessarily match where, when, how Linux does. Even if they lined up, it doesn't follow that Linux should follow. VM is wonderful, as you know, Alan. But just because VM does something doesn't make it right. Why should Linux be different? Because of the Unix model Linux is based on. Another example would be where MVS has such a weak notion of filesystem. Unix, Windows, OS/2, and many others, including CMS and CP, all have a much stronger concept of filesystem. FS is one point. User/kernel sep is another. MVS has a filesystem that is integrated into the base operating system; it seems pretty strong to me. It is CP has *no* integrated filesystem. I find nothing inherently evil about a kernel reading user-space files. Granted, I was reared by my parents (or wolves; historians aren't sure on that point) to believe that it is ok. Apparently others were brought up to believe otherwise. I can respect that. Because that's the way it's always been done doesn't *have* to be the rule we live by, eh? :-) Alan Altmark Sr. Software Engineer IBM z/VM Development -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: more cause code 0x22 and /etc/chandev.conf
Honest opinion as a kernel module writer: No, it is not okay. I believe that kernel modules should take arguments on the insmod (modprobe, whatever) and/or configuration via /proc (or ioctl()s on /dev, /udev entries) and/or static values from previous loads of the module left in kernel storage under a key, but not files. Reading from a file while in kernel-space is kludgy at best, and quite error-prone at worst. Eric Rossman Linux on 390 Port [EMAIL PROTECTED] wrote on 03/10/2004 06:12:29 PM: It has always worried me that drivers would read a file. Files are user space and drivers are supposed to be kernel space. But I have to ask, are my worries justified? SNIP Perhaps I'm being a purist. So I pose the question to the group: Is it okay for kernel code to read plain files for config info? -- R; -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: more cause code 0x22 and /etc/chandev.conf
On Wednesday, 03/10/2004 at 05:12 CST, Richard Troth [EMAIL PROTECTED] wrote: Perhaps I'm being a purist. So I pose the question to the group: Is it okay for kernel code to read plain files for config info? Let it go. :-) You let VM and MVS kernels read plain files. Why should Linux be different? Alan Altmark Sr. Software Engineer IBM z/VM Development -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: more cause code 0x22 and /etc/chandev.conf
Richard Troth wrote: Perhaps I'm being a purist. So I pose the question to the group: Is it okay for kernel code to read plain files for config info? No, this is not OK; which is why chandev.conf featured prominently in Arjan van de Ven's How to NOT write kernel drivers paper at the 2002 Ottawa Linux Symposium ;-) See that paper for details why it is not OK. We've gotten rid of chandev.conf for the 2.6 kernel. Network devices are now configured via sysfs attributes, hopefully abstracted away via a hotplug framework. Bye, Ulrich -- Dr. Ulrich Weigand [EMAIL PROTECTED] -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: more cause code 0x22 and /etc/chandev.conf
You mean such as these files on Intel Linux? /etc/devfsd.conf /etc/fstab /etc/ioctl /etc/modules.conf /lib/modules/`uname -r`/modules.dep Mark Post -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of Richard Troth Sent: Wednesday, March 10, 2004 6:12 PM To: [EMAIL PROTECTED] Subject: more cause code 0x22 and /etc/chandev.conf -snip- Perhaps I'm being a purist. So I pose the question to the group: Is it okay for kernel code to read plain files for config info? -- R; -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: more cause code 0x22 and /etc/chandev.conf
You mean such as these files on Intel Linux? /etc/devfsd.conf /etc/fstab /etc/ioctl /etc/modules.conf /lib/modules/`uname -r`/modules.dep Yeah, sure. Those are good examples. Of the lot, only the first would be read from kernel space, and that I'm not sure of either. Certainly /etc/fstab, /etc/modules.conf, and /lib/modules/*/modules.dep are all handled by user space programs, with privs, making system calls. They are NOT read by the kernel itself. So the example set you give supports my argument: Don't poke holes in that wall between user and kernel. Poking holes, making special arrangements, having exceptions, sounds a lot like Microsoft methodology to me. -- R; -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: more cause code 0x22 and /etc/chandev.conf
You let VM and MVS kernels read plain files. Why should Linux be different? Where and when and how MVS and VM read plain files doesn't necessarily match where, when, how Linux does. Even if they lined up, it doesn't follow that Linux should follow. VM is wonderful, as you know, Alan. But just because VM does something doesn't make it right. Why should Linux be different? Because of the Unix model Linux is based on. Another example would be where MVS has such a weak notion of filesystem. Unix, Windows, OS/2, and many others, including CMS and CP, all have a much stronger concept of filesystem. FS is one point. User/kernel sep is another. That clear idea of filesystem -vs- the underlying media (disk or otherwise) proves invaluable to VM, Unix, and the rest. Similarly, a strong isolation between kernel and user space enhances stability and security. If someone took a short-cut (in reading /etc/chandev.conf instead of taking module parms) ... ... well, that's one of the reasons some of us are so mad at Redmond. I'm asking. I'm open. But if there's a bad trend starting, then let's see it changed in the next DevWorks release. Please? -- R; -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: more cause code 0x22 and /etc/chandev.conf
On Wednesday, 03/10/2004 at 06:49 CST, Richard Troth [EMAIL PROTECTED] wrote: You let VM and MVS kernels read plain files. Why should Linux be different? Where and when and how MVS and VM read plain files doesn't necessarily match where, when, how Linux does. Even if they lined up, it doesn't follow that Linux should follow. VM is wonderful, as you know, Alan. But just because VM does something doesn't make it right. Why should Linux be different? Because of the Unix model Linux is based on. Another example would be where MVS has such a weak notion of filesystem. Unix, Windows, OS/2, and many others, including CMS and CP, all have a much stronger concept of filesystem. FS is one point. User/kernel sep is another. MVS has a filesystem that is integrated into the base operating system; it seems pretty strong to me. It is CP has *no* integrated filesystem. I find nothing inherently evil about a kernel reading user-space files. Granted, I was reared by my parents (or wolves; historians aren't sure on that point) to believe that it is ok. Apparently others were brought up to believe otherwise. I can respect that. Because that's the way it's always been done doesn't *have* to be the rule we live by, eh? :-) Alan Altmark Sr. Software Engineer IBM z/VM Development -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: more cause code 0x22 and /etc/chandev.conf
That'll all change for 2.6. sysfs udev will be used to configure things and the channel configuration file will disappear. -Original Message- So I pose the question to the group: Is it okay for kernel code to read plain files for config info? -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: more cause code 0x22 and /etc/chandev.conf
On Wed, 2004-03-10 at 19:12, Alan Altmark wrote: I was reared by my parents (or wolves; historians aren't sure on that point) As a historian (pardon me: as a person with an advanced degree from an Ivy League school, and an elevated nose and extended pinky finger, an historian), I vote for the wolves. Yrs., Adam -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390