Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Dag-Erling Smørgrav
Václav Haisman [EMAIL PROTECTED] writes: Deciding that some features are bad beforehand, before you evaluate them is IMO bad idea. Let interested people write a bunch of C++ modules with the complete language before deciding on what shouldn't be used. It's not that simple. The complete

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Dag-Erling Smørgrav
[EMAIL PROTECTED] writes: But prior to long-term discussion, please commit my 4 patches firstly. They are nearly CPP-independent and do no harm to current FreeBSD kernel. We don't do the kind of changes you propose without discussion. --- kern.mk.orig Fri Jun 30 05:15:25 2006 +++

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread mag
Dag-Erling [iso-8859-1] Sm grav wrote: [EMAIL PROTECTED] writes: But prior to long-term discussion, please commit my 4 patches firstly. They are nearly CPP-independent and do no harm to current FreeBSD kernel. We don't do the kind of changes you propose without discussion. ---

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Dag-Erling Smørgrav
[EMAIL PROTECTED] writes: But -ffreestanding doesn't work with C++. While the C++ standard does define hosted and freestanding implementations, its definition is different from (and less useful than) that in the C standard. For instance, the C++ standard requires the existence of abort(),

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Xin LI
在 2006-07-11二的 16:13 [EMAIL PROTECTED] [...] I agree with you. Firstly, we may keep up with OpenDarwin, just as what's on http://developer.apple.com/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/Features/chapter_2_section_6.html At the same time, we may port/rewrite C++

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Matthias Andree
Václav Haisman [EMAIL PROTECTED] writes: Binary compatibility is always a problem, no mater the language used. Besides, doesn't the FreeBSD kernel build system always compile all modules? It can be configured in make.conf if you want only a subset of modules. Deciding that some features are

Re: Stop further socket() or connect() calls.

2006-07-11 Thread Oliver Fromme
mal content [EMAIL PROTECTED] wrote: I was looking for a way to write a small wrapper program that disables network access and then exec()'s a given program. Sorry for the late reply, but ... The easiest way to do what you described is to run the program in a jail which has a jail IP that

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread mag
Dag-Erling [iso-8859-1] Sm grav wrote: [EMAIL PROTECTED] writes: But -ffreestanding doesn't work with C++. While the C++ standard does define hosted and freestanding implementations, its definition is different from (and less useful than) that in the C standard. For instance, the C++

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Dag-Erling Smørgrav
[EMAIL PROTECTED] writes: Dag-Erling [iso-8859-1] Sm grav wrote: [EMAIL PROTECTED] writes: But -ffreestanding doesn't work with C++. While the C++ standard does define hosted and freestanding implementations, its definition is different from (and less useful than) that in the C standard.

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Joerg Sonnenberger
On Tue, Jul 11, 2006 at 10:45:52PM +0800, [EMAIL PROTECTED] wrote: Just as you said, C++ is more complicated than C. However, without C++ exception and other advanced features, it hasn't brought much complexity to C++ runtime library. Early C++ compiler even translates C++ code into C code

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread John Baldwin
On Tuesday 11 July 2006 10:57, Dag-Erling Smørgrav wrote: For example, I think C++ exception handling is really poorly suited for low-level code. Exception handling is required by the standard, even for freestanding implementations. Standards aside, in Darwin, the C++ Apple uses does not

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Matthias Andree
(please don't Cc me on list replies; chopping down the Cc list) On Tue, 11 Jul 2006, [EMAIL PROTECTED] wrote: Just as you said, C++ is more complicated than C. However, without C++ exception and other advanced features, it hasn't brought much complexity to C++ runtime library. Early C++

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread M. Warner Losh
In message: [EMAIL PROTECTED] Václav Haisman [EMAIL PROTECTED] writes: : Deciding that some features are bad beforehand, before you evaluate them : is IMO bad idea. Let interested people write a bunch of C++ modules with : the complete language before deciding on what shouldn't be

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread M. Warner Losh
In message: [EMAIL PROTECTED] [EMAIL PROTECTED] writes: : --- systm.h.orig Mon Jul 10 05:42:58 2006 : +++ systm.hMon Jul 10 18:44:01 2006 : @@ -203,7 +203,7 @@ : int suword16(void *base, int word); : int suword32(void *base, int32_t word); : int

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread M. Warner Losh
In message: [EMAIL PROTECTED] [EMAIL PROTECTED] writes: : You can LOOK DOWN UPON me again and again. But is it really your patent, : a FreeBSD security team member's patent: you know what FreeBSD kernel : and C++ is, but I am too BRAINLESS to understand FreeBSD kernel and C++? I don't

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread M. Warner Losh
In message: [EMAIL PROTECTED] John Baldwin [EMAIL PROTECTED] writes: : and OS X both of which I've written a PCI driver for) we require device : driver writers to go through a lot more hoops to do certain things like : allocate resources. At the very least there is much that can be

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread mag
John Baldwin wrote: On Tuesday 11 July 2006 10:57, Dag-Erling Sm grav wrote: For example, I think C++ exception handling is really poorly suited for low-level code. Exception handling is required by the standard, even for freestanding implementations. Standards aside, in Darwin, the C++

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Dag-Erling Smørgrav
John Baldwin [EMAIL PROTECTED] writes: On Tuesday 11 July 2006 10:57, Dag-Erling Smørgrav wrote: [EMAIL PROTECTED] writes: What's more, can the object model function really as OpenDarwin's IOKit class model? Does it need to? He's trying to port IOKit to FreeBSD for his exercise (if you

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread mag
Joerg Sonnenberger wrote: On Tue, Jul 11, 2006 at 10:45:52PM +0800, [EMAIL PROTECTED] wrote: Just as you said, C++ is more complicated than C. However, without C++ exception and other advanced features, it hasn't brought much complexity to C++ runtime library. Early C++ compiler even

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread mag
Dag-Erling [iso-8859-1] Sm grav wrote: John Baldwin [EMAIL PROTECTED] writes: On Tuesday 11 July 2006 10:57, Dag-Erling Sm grav wrote: [EMAIL PROTECTED] writes: What's more, can the object model function really as OpenDarwin's IOKit class model? Does it need to? He's trying to port

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread mag
Why do you all consider importing C++ code to FreeBSD kernel to be so complicated at the beginning? Matthias Andree wrote: (please don't Cc me on list replies; chopping down the Cc list) On Tue, 11 Jul 2006, [EMAIL PROTECTED] wrote: Just as you said, C++ is more complicated than C. However,

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread John Baldwin
On Tuesday 11 July 2006 12:33, M. Warner Losh wrote: In message: [EMAIL PROTECTED] John Baldwin [EMAIL PROTECTED] writes: : and OS X both of which I've written a PCI driver for) we require device : driver writers to go through a lot more hoops to do certain things like :

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread M. Warner Losh
In message: [EMAIL PROTECTED] John Baldwin [EMAIL PROTECTED] writes: : On Tuesday 11 July 2006 12:33, M. Warner Losh wrote: : In message: [EMAIL PROTECTED] : John Baldwin [EMAIL PROTECTED] writes: : : and OS X both of which I've written a PCI driver for) we require

Intel Vanderpool (VT) on FreeBSD or FreeBSD Xen

2006-07-11 Thread Mohacsi Janos
Dear All, Does anybody succeed to boot FreeBSD on an Intel Vanderpool capable machine? My colleague tried it and the result is a BTX halt as can be seen on the screenshots on page linked. He successfully run unmodified Linux, Windows 2003 under Xen virtual machines, but FreeBSD failed in the

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Garance A Drosehn
At 12:43 AM +0800 7/12/06, [EMAIL PROTECTED] wrote: Before I do enough experiments, naturally I would never talk about this thing. I don't know why Dag-Erling C. Smo/rgrav is so unfriendly to me ??? !!! He is commenting on your patches. Do not take those as personal attacks on you. You

Re: Intel Vanderpool (VT) on FreeBSD or FreeBSD Xen

2006-07-11 Thread Kip Macy
I asked the person who wrote vtxassist (only SVM supports paged real mode) - he thinks that it broke when support for big real mode was added. He did not seem particularly inclined to fix it. It may be that Xen's VT-x support is considered less interesting to his organization now that VMware is

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread John Baldwin
On Tuesday 11 July 2006 15:21, [EMAIL PROTECTED] wrote: John Baldwin wrote: On Tuesday 11 July 2006 12:33, M. Warner Losh wrote: In message: [EMAIL PROTECTED] John Baldwin [EMAIL PROTECTED] writes: : and OS X both of which I've written a PCI driver for) we require device

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread John Baldwin
On Tuesday 11 July 2006 14:48, M. Warner Losh wrote: In message: [EMAIL PROTECTED] John Baldwin [EMAIL PROTECTED] writes: : On Tuesday 11 July 2006 12:33, M. Warner Losh wrote: : In message: [EMAIL PROTECTED] : John Baldwin [EMAIL PROTECTED] writes: : : and OS X

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Warner Losh
It's less ugly than it used to be, esp. with the bus_read_X() stuff. There's no separate bus_alloc_resource/bus_setup_intr for interrupts though for example, just bus_setup_intr() equivalent. This is pretty simple though: /* OS X */ IOMemoryMap *myBarMap; void *myBar;

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread M. Warner Losh
In message: [EMAIL PROTECTED] [EMAIL PROTECTED] writes: : Why do you all consider importing C++ code to FreeBSD kernel to be so : complicated at the beginning? Many people reading this list have conducted experiments in the past at various employers. Everyone who has conducted the

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread M. Warner Losh
In message: [EMAIL PROTECTED] John Baldwin [EMAIL PROTECTED] writes: : On Tuesday 11 July 2006 15:21, [EMAIL PROTECTED] wrote: : John Baldwin wrote: : : On Tuesday 11 July 2006 12:33, M. Warner Losh wrote: : In message: [EMAIL PROTECTED] : John Baldwin [EMAIL

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Attilio Rao
2006/7/11, [EMAIL PROTECTED] [EMAIL PROTECTED]: Why do you all consider importing C++ code to FreeBSD kernel to be so complicated at the beginning? Matthias Andree wrote: (please don't Cc me on list replies; chopping down the Cc list) On Tue, 11 Jul 2006, [EMAIL PROTECTED] wrote: Just as

FreeBSD Status Report Second Quarter 2006

2006-07-11 Thread Max Laier
April-June 2006 Status Report Introduction With the release of FreeBSD 5.5 and FreeBSD 6.1, the second quarter of 2006 has been productive. Google is sponsoring 14 students to work on FreeBSD as part of their Summer of Code Program (most of which already submitted a report for

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Rick C. Petty
On Wed, Jul 12, 2006 at 02:25:21AM +0800, [EMAIL PROTECTED] wrote: Matthias Andree wrote: Why would people write Windows application with rather MFC/ATL/.NET Framework than direct Windows API? Because they like buggy code? (Not that the basic API is much better) Why is gtkmm created for

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Mike Meyer
In [EMAIL PROTECTED], Rick C. Petty [EMAIL PROTECTED] typed: On Wed, Jul 12, 2006 at 02:25:21AM +0800, [EMAIL PROTECTED] wrote: Good packages for various APIs are much easier to learn/debug than those original APIs. What makes you say that C++ would provide a good API? Good point. About the

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread mag
M. Warner Losh wrote: In message: [EMAIL PROTECTED] V lav Haisman [EMAIL PROTECTED] writes: : Deciding that some features are bad beforehand, before you evaluate them : is IMO bad idea. Let interested people write a bunch of C++ modules with : the complete language before deciding

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread mag
John Baldwin wrote: On Tuesday 11 July 2006 12:33, M. Warner Losh wrote: In message: [EMAIL PROTECTED] John Baldwin [EMAIL PROTECTED] writes: : and OS X both of which I've written a PCI driver for) we require device : driver writers to go through a lot more hoops to do certain

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread pfgshield-freebsd
FWIW and just IMHO; I think it would be really nice to have the IOKit, or a lookalike that uses kobj(), available on FreeBSD. Another interesting experiment that I've mentioned before is OpenBFS: http://www.bug-br.org.br/openbfs/index.phtml?section=development OpenBFS, as all file systems under

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Garance A Drosihn
At 7:03 PM -0400 7/11/06, Mike Meyer wrote: In [EMAIL PROTECTED], Rick C. Petty [EMAIL PROTECTED] typed: On Wed, Jul 12, 2006 at 02:25:21AM +0800, [EMAIL PROTECTED] wrote: Good packages for various APIs are much easier to learn/debug than those original APIs. What makes you say that

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Jason Slagle
On Wed, 12 Jul 2006, [EMAIL PROTECTED] wrote: I would repeat several sentences in my last reply. Why would people write Windows application with rather MFC/ATL/.NET Framework than direct Windows API? Why is gtkmm framework created for GTK+? Would you write a X11 application with original X11

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Intron
Jason Slagle wrote: On Wed, 12 Jul 2006, [EMAIL PROTECTED] wrote: I would repeat several sentences in my last reply. Why would people write Windows application with rather MFC/ATL/.NET Framework than direct Windows API? Why is gtkmm framework created for GTK+? Would you write a X11

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread mag
Jason Slagle wrote: On Wed, 12 Jul 2006, [EMAIL PROTECTED] wrote: I would repeat several sentences in my last reply. Why would people write Windows application with rather MFC/ATL/.NET Framework than direct Windows API? Why is gtkmm framework created for GTK+? Would you write a X11