Installation of 5.3R on Medion MIM205 failed
Hello, few days ago, my wife bought me a Medion MIM2050 notebook. At first sight, it seems to be good but when I tried to install FreeBSD 5.3 using the mini-inst, it freezed when trying to detect the pci bus. Any idea ? How can I help ? Fred PS: I feel guilty... I installed an Ubuntu for the moment... but I promise, I'll switch to FreeBSD asap ;-) ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: Problem with FastTrak S150 SX4-M
It's not red but it is the PRI_RAID IDE connector. I have the controller set to IDE in the BIOS so it should act just as any other IDE controller (according to the manual and many other sources). I have two hard drives on the primary IDE (not on the controller) and a CD drive on the secondary IDE (also not on the controller). Then I have two more hard drives on the PRI_RAID channel (which *is* the P-ATA channel on the controller). Those two drives are getting the failure (or at least one is - see the error messages in my original text). I wish I had an S-ATA drive to test with so that I could verify that it's a problem with the P-ATA part of this controller. Any more ideas? dave myron -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2005 9:50 AM To: Dave Myron Cc: freebsd-hackers@freebsd.org; [EMAIL PROTECTED] Subject: RE: Problem with FastTrak S150 SX4-M On Tue, 25 Jan 2005, Dave Myron wrote: > I'm getting that same exact error with an onboard Promise 20378 (on an > Asus P4C800). > On this Promise controller I have two drives on one cable on the P-ATA > (PRI_RAID) IDE interface. Both S-ATA devices are not in use. During > POST, the drives are both correctly identified and enumerated. > If I disable the Promise controller then everything boots fine. I just wanted to throw this out there, I've got an Asus A8V with the same Promise controller and the system boots fine. However, I only have SATA drives (mirror) (no PATA drives) and two CDROM/DVD drives. Does your MB by chance have a PATA raid connector? It's an IDE connector that's red, but it's meant to raid two PATA drives. Just curious if your PATA drives are connected to the primary IDE bus, or to this parallel raid bus. Just a thought. Chris ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: OpenBSD's netcat in base or ports?
On Wed, Jan 26, 2005 at 12:00:46PM +, [EMAIL PROTECTED] wrote: > From: Coleman Kane <[EMAIL PROTECTED]> > Subject: Re: OpenBSD's netcat in base or ports? > To: Avleen Vig <[EMAIL PROTECTED]> > Cc: freebsd-hackers@freebsd.org > > I agree. I think even tcpdump, libpcap, and ssl stuff should be in > ports. Currently these are in the src/contrib tree. I know they > currently have utility there for the base system. With regard to SSL, of course, you can't readily have SSH without SSL support, and I assume you wouldn't really want to have the base config without secure network administration support. > We moved the base > away from perl dependence, I think these dependencies should be worked > out as well. I really dislike -stable and -release > having out-of-date versions of these packages. > > This is only my personal opinion. I think the WITH__OVERWITE_BASE > make options help substantiate it, however. I respect the virtue of keeping base minimal (and as a Perl fan, I particularly appreciate it with regard to Perl - it facilitates installing the desired version.) Not that I have a "vote" in this, but my opinion falls on the other side for the programs named here, including netcat as well as tcpdump. For me one of the more significant uses of netcat, like tcpdump, is as a troubleshooting/debugging tool. It's *particularly* useful to have it on a newly installed system if you can't get it on the network, or can't get some net functionality working. In that case you may not be able to pull down and build the port. With netcat I'd even go a little further and say, paraphrasing the original author, that it's one of those things that just seems like it should have been in all Unixes from the beginning, along with cat and sh; providing it feels like correcting an inexplicable omission of a useful tool for hooking files, sockets, and ports together. -- Clifton -- Clifton Royston -- [EMAIL PROTECTED] Tiki Technologies Lead Programmer/Software Architect "I'm gonna tell my son to grow up pretty as the grass is green And whip-smart as the English Channel's wide, And I'm gonna tell my son to keep his money in his mattress And his watch on any hand between his thighs, And I'm gonna lock my son up in a tower Till I write my whole life story on the back of his big brown eyes..." -- 'Whip-Smart', Liz Phair ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
bug in calcru()
hihi, doug - thanx for the suggestion - the notion of computing ut just with subtraction is really good, since it is likely to be the largest of the three values in most applications, but i'm a little worried that the 1024 multiplications aren't large enough when tt gets really large - i'll do the math on it and report its (provable) range of applicability and accuracy in a few days more soon, cal Chris Landauer Aerospace Integration Science Center The Aerospace Corporation [EMAIL PROTECTED] > Doug Ambrisko <[EMAIL PROTECTED]> wrote > ... > /* Subdivide tu. try to becareful of overflow */ > su = tu * (st * 1024 / tt) / 1024; > iu = tu * (it * 1024 / tt) / 1024; > uu = tu - (su + iu); > ... ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Installation of 5.3R on Medion MIM205 failed
Hello, few days ago, my wife bought me a Medion MIM2050 notebook. At first sight, it seems to be good but when I tried to install FreeBSD 5.3 using the mini-inst, it freezed when trying to detect the pci bus. Any idea ? How can I help ? Fred PS: I feel guilty... I installed an Ubuntu for the moment... but I promise I'll switch to FreeBSD asap ;-) pgppBM3IuN0gG.pgp Description: PGP signature
Re: bug in calcru()
hihi, doug - > Doug Ambrisko <[EMAIL PROTECTED]> wrote > ... > The assumption with this calculation is that st & it tend to be > small compared to tt so the 1024 X shouldn't overflow much. > ... > [EMAIL PROTECTED] wrote: > | ...but i'm a little worried that the 1024 multiplications aren't > | large enough when tt gets really large > | > Doug Ambrisko <[EMAIL PROTECTED]> wrote > | > ... > | > /* Subdivide tu. try to becareful of overflow */ > | > su = tu * (st * 1024 / tt) / 1024; > | > iu = tu * (it * 1024 / tt) / 1024; > | > uu = tu - (su + iu); > | > ... i'm not so worried about the overflow limit (that's what the mathematical analysis is intended to discover, and i assume that the bound is large enough to ignore the issue - that is the really clever part about computing su and iu first instead of uu), but the underflow - if st and it are small enough and tt is large enough, these equations produce 0 for both su and iu (and the reported percentage will rightly be 0.00%, but i want to see the rest of the detail for my time models) what i think i'll do is try out my set of if-protected equations, but with your choice of computing su and iu - that ought to avoid both problems #define TOOBIG 45254834 /* 32*sqrt(2)*10^6 */ if (tt >= TOOBIG && tu >= tt) { u_int64_t q, r; q = tu / tt; r = tu % tt; su = (q * st) + (r * st) / tt; iu = (q * it) + (r * it) / tt; } else{ su = (tu * st) / tt; iu = (tu * it) / tt; } uu = tu - (su + iu); of course, JUST using the lines su = (tu * st) / tt; iu = (tu * it) / tt; uu = tu - (su + iu); will help a lot already - perhaps this much should be done right now (according to the usual committment protocols) while we analyze the various alternative suggestions for improvement (or are there high-utilization processes that are more system time than user time?) general question - is it (interrupt time) where the unreported time is when user and system percentages add up to much less than 100%? i assume that the monotonicity rules are what makes programs report over 100% utilization (which i get occasionally, but only on very short programs) more later, cal Chris Landauer Aerospace Integration Science Center The Aerospace Corporation [EMAIL PROTECTED] PS - i'm sorry i don't speak "patch" well enough yet, but i will eventually ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: use loader to load kernel.gz and mfsroot.gz in an ext2 filesystem
But when I do this, Boot from the Ext2(or Dos) partition with grub And then use loader from the partition It says "Can't find kernel/kernel.old" Then I use the "ls" of loader by "ls " It says " ' ' is bad path " what's that?? From: Dan Nelson <[EMAIL PROTECTED]> To: "M. Warner Losh" <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], freebsd-hackers@freebsd.org Subject: Re: use loader to load kernel.gz and mfsroot.gz in an ext2 filesystem Date: Wed, 26 Jan 2005 10:30:48 -0600 In the last episode (Jan 26), M. Warner Losh said: > : I put loader,kernel.gz and mfsroot.gz in an ext2(dos) file system > : on harddisk,and want to directly use grub or use grub and freebsd > : loader(or other manner?) to boot the system. > > You'll need to add support to libstand to read ext2 and/or DOS file > systems. That's the first step... Libstand already supports both, and they are included into /boot/loader ( see the file_system[] array in /sys/boot/i386/loader/conf.c ), so it should be able to boot off of both filessytems just fine. -- Dan Nelson [EMAIL PROTECTED] _ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Cannot start adsl!
Hello,everybody. The first ,thank you for you help! bsd 5.3-release. pci :Realtek RTL8139/810x.adsl /2m When I follow handbook,/etc/ppp/ppp.conf is ok .it something wrong likes this: #ppp -ddial adsl working in ddial mode using interface:tun0 #ppp -ddial adsl working in ddial mode using interface:tun1 #ppp -ddial adsl working in ddial mode using interface:tun2 #ppp -ddial adsl warnning:no available tunnel devices found (no such file or director) #cd /dev #sh MAKEDEV tun0 it is nothing. I am a new user.I have spent on it two days. help me . thanks CCJJ - Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂 美女明星应有尽有,搜遍美图、艳图和酷图 1G就是1000兆,雅虎电邮自助扩容! ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
loader's device number(Urgent!!)
Hi,Everybody! Who can tell me what's the rule of loader's device number? Whether it's the same as grub's? For Example,the "disk1s1" is grub's (hd0,0)? Thanks at all^-^ _ 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
How can tell loader to use specified loader.rc?
Hi,Everybody! Another Question When I use grub and loader,how can I tell loader to use what loader.rc file? For Example:kernel /loader -* /loader.rc Thanks much _ 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: ATAPI CD changers anybody ?
On Mon, Jan 24, 2005 at 05:36:52PM +0100, S?ren Schmidt wrote: > > Seems I lost my lonely ATAPI CDROM with built in changer to the eternal > HW scrapyards, let it rest in peace :) > > Finding a new one seems difficult so I thought I'd ask around how many > still has one of these ? > > I ask because the support code for those seem to have suffered bitrot to > the degree that it most likely hasn't worked on -current (maybe even > 5.x) for a long time, but alas I cant test that. > > Now, since it seems that such devices are no longer made, and newer > really caught on, I need some good reasons to keep the (broken) support > in there. > I have two of these, a 4x and 6x: acd0-3: CDROM with 4 CD changer at ata1-master PIO3 I still use one under 4.x but since they will not read many newer CDR's and CDRW's their usefulness is waning. If you would like one in order to continue supporting them, send me your address and I will have one shipped. -- Chris D. Faulhaber - [EMAIL PROTECTED] - [EMAIL PROTECTED] FreeBSD: The Power To Serve - http://www.FreeBSD.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
kernel vm question
Hi, I have a kernel module with the following entry point : static int test_modevent(module_t mod, int type, void *unused) { int s; unsigned char *p = NULL; unsigned char v = 0x55; switch (type) { case MOD_LOAD: p = (unsigned char *)ip_output; s = splhigh(); v = p[0]; /* Page fault without this line */ p[0] = v; printf("val = %02X\n", v); splx(s); break; case MOD_UNLOAD: break; default: break; } return 0; } If I remove the line "Page fault without this line" line, I get a page fault when loading this module. This crash seems to be hardware as well as version specific - I can not reproduce the crash on 4.8 but on one particular piece of hardware it crashes consistently on 4.9 and 4.10. Could someone please help me in understanding this behaviour? Attached is the full kernel module source and a dmesg of the hardware in question. regards, jacques Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.10-RELEASE #2: Thu Jan 27 14:36:20 SAST 2005 [EMAIL PROTECTED]:/usr/src/sys/compile/MYKERN Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 2657822812 Hz CPU: Intel(R) Xeon(TM) CPU 2.66GHz (2657.82-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf29 Stepping = 9 Features=0xbfebfbff Hyperthreading: 2 logical CPUs real memory = 4160225280 (4062720K bytes) avail memory = 4054249472 (3959228K bytes) Preloaded elf kernel "kernel" at 0xc0353000. Warning: Pentium 4 CPU: PSE disabled Pentium Pro MTRR support enabled md0: Malloc disk Using $PIR table, 20 entries at 0xc00fde80 npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard pci0: on pcib0 pci0: (vendor=0x8086, dev=0x2541) at 0.1 pcib1: at device 2.0 on pci0 pci1: on pcib1 pci1: (vendor=0x8086, dev=0x1461) at 28.0 pcib2: at device 29.0 on pci1 pci2: on pcib2 pci1: (vendor=0x8086, dev=0x1461) at 30.0 pcib3: at device 31.0 on pci1 pci3: on pcib3 em0: port 0x7000-0x703f mem 0xfc20-0xfc23,0xfc28-0xfc29 irq 10 at device 1.0 on pci3 em0: Speed:N/A Duplex:N/A em1: port 0x7040-0x707f mem 0xfc24-0xfc27,0xfc2a-0xfc2b irq 10 at device 1.1 on pci3 em1: Speed:N/A Duplex:N/A pci0: (vendor=0x8086, dev=0x2544) at 2.1 pci0: at 29.0 irq 10 pci0: at 29.1 irq 5 pci0: at 29.2 irq 10 pcib4: at device 30.0 on pci0 pci4: on pcib4 pci4: at 3.0 irq 11 fxp0: port 0x8400-0x843f mem 0xfc30-0xfc31,0xfc341000-0xfc341fff irq 10 at device 4.0 on pci4 fxp0: Ethernet address 00:04:23:ae:8c:1d inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto em2: port 0x8440-0x847f mem 0xfc32-0xfc33 irq 11 at device 5.0 on pci4 em2: Speed:N/A Duplex:N/A isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x6c60-0x6c6f,0-0x3,0-0x7,0-0x3,0-0x7 irq 0 at device 31.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 pci0: (vendor=0x8086, dev=0x2483) at 31.3 irq 0 orm0: at iomem 0xc-0xc7fff,0xe3000-0xe3fff on isa0 pmtimer0 on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 vga0: at port 0x3c0-0x3df iomem 0xa-0xb on isa0 sc0: on isa0 sc0: VGA <16 virtual consoles, flags=0x200> sio0 at port 0x3f8-0x3ff irq 4 flags 0x80 on isa0 sio0: type 16550A ppc0: at port 0x378-0x37f irq 7 on isa0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/9 bytes threshold ipfw2 initialized, divert enabled, rule-based forwarding enabled, default to accept, logging limited to 100 packets/entry by default DUMMYNET initialized (011031) ad0: 76319MB [155061/16/63] at ata0-master UDMA100 acd0: DVD-R at ata1-master PIO4 Mounting root from ufs:/dev/ad0s1a WARNING: / was not properly dismounted uhci0: port 0x6c00-0x6c1f irq 10 at device 29.0 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x6c20-0x6c3f irq 5 at device 29.1 on pci0 usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0x6c40-0x6c5f irq 10 at device 29.2 on pci0 usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static int test_modevent(module_t mod, int type, void *unused) { int s; unsigned char *p = NULL; unsigned char v = 0x55; switch (type) { case MOD_LOAD: p = (unsigned char *)ip_output; s = splhigh(); v = p[0]; p[0] = v;
Re: kernel vm question
On Thu, 27 Jan 2005, Jacques Fourie wrote: > Hi, > > I have a kernel module with the following entry point : > > static int test_modevent(module_t mod, int type, void *unused) > { >int s; >unsigned char *p = NULL; >unsigned char v = 0x55; > >switch (type) > { > case MOD_LOAD: >p = (unsigned char *)ip_output; What is ip_output? Do you believe it is a function or variable? It might help if you just state to yourself in your native language what you want to do here. >s = splhigh(); > >v = p[0]; /* Page fault without this line */ >p[0] = v; The above makes no sense. Why would you assign v to p[0] and then set p[0] to the value of v? What is the error message you get? Also, it might help to compile with -Wall since it help to catch some subtle errors. Good luck, -Zera ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: kernel vm question
On Thu, Jan 27, 2005, Jacques Fourie wrote: > Hi, > > I have a kernel module with the following entry point : > > static int test_modevent(module_t mod, int type, void *unused) > { > int s; > unsigned char *p = NULL; > unsigned char v = 0x55; > > switch (type) > { > case MOD_LOAD: > p = (unsigned char *)ip_output; > > s = splhigh(); > > v = p[0]; /* Page fault without this line */ > p[0] = v; [...] > If I remove the line "Page fault without this line" line, I get a page > fault when loading this module. This crash seems to be hardware as well > as version specific - I can not reproduce the crash on 4.8 but on one > particular piece of hardware it crashes consistently on 4.9 and 4.10. When the line is there, the compiler is probably smart enough to realize that 'x=y; y=x' is (usually) a no-op, so it optimizes away both statements. Otherwise, you get a page fault because you're trying to write to a non-writable page (namely, one in the kernel's code segment). If you're trying to do what I think you're trying to do, you need to poke around in the VM system and adjust the protection bits in the page you want to write to. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: kernel vm question
Hi, Yes, I am trying to patch a piece of code in the kernel. The strange thing is that this code works without a problem on FreeBSD 4.8 - has the VM system changed to such an extent between 4.8 and 4.9 that the pages in the kernel code segment are not writeable anymore? Thanks for the bit about the compiler optimization - at least I understand that part now :) regards, jacques On Thu, 27 Jan 2005 11:09:14 -0500, David Schultz <[EMAIL PROTECTED]> wrote: > On Thu, Jan 27, 2005, Jacques Fourie wrote: > > Hi, > > > > I have a kernel module with the following entry point : > > > > static int test_modevent(module_t mod, int type, void *unused) > > { > > int s; > > unsigned char *p = NULL; > > unsigned char v = 0x55; > > > > switch (type) > > { > > case MOD_LOAD: > > p = (unsigned char *)ip_output; > > > > s = splhigh(); > > > > v = p[0]; /* Page fault without this line */ > > p[0] = v; > [...] > > If I remove the line "Page fault without this line" line, I get a page > > fault when loading this module. This crash seems to be hardware as well > > as version specific - I can not reproduce the crash on 4.8 but on one > > particular piece of hardware it crashes consistently on 4.9 and 4.10. > > When the line is there, the compiler is probably smart enough to > realize that 'x=y; y=x' is (usually) a no-op, so it optimizes away > both statements. Otherwise, you get a page fault because you're > trying to write to a non-writable page (namely, one in the > kernel's code segment). If you're trying to do what I think > you're trying to do, you need to poke around in the VM system and > adjust the protection bits in the page you want to write to. > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Cannot start adsl!
On Thu, Jan 27, 2005 at 11:45:33AM +0800, qq qq wrote: > Hello,everybody. > The first ,thank you for you help! > bsd 5.3-release. pci :Realtek RTL8139/810x.adsl /2m > When I follow handbook,/etc/ppp/ppp.conf is ok .it something wrong likes this: > > #ppp -ddial adsl > working in ddial mode > using interface:tun0 > > #ppp -ddial adsl > working in ddial mode > using interface:tun1 > > #ppp -ddial adsl > working in ddial mode > using interface:tun2 > > #ppp -ddial adsl > warnning:no available tunnel devices found (no such file or director) > > #cd /dev > #sh MAKEDEV tun0 > it is nothing. > I am a new user.I have spent on it two days. Is there any particular reason why you need to perform "ppp -ddial adsl" command multiple times? Just put: ppp_enable="YES" ppp_mode="ddial" ppp_profile="adsl" into your /etc/rc.conf file. That should setup adsl connection at the boot time and then in case if it gets dropped, reinitialize it. Andrew pgpoXN8MoEqA8.pgp Description: PGP signature
Re: kernel vm question
On Thu, Jan 27, 2005, Jacques Fourie wrote: > Hi, > > Yes, I am trying to patch a piece of code in the kernel. The strange > thing is that this code works without a problem on FreeBSD 4.8 - has > the VM system changed to such an extent between 4.8 and 4.9 that the > pages in the kernel code segment are not writeable anymore? > > Thanks for the bit about the compiler optimization - at least I > understand that part now :) The idea that the compiler is responsible for the different behavior between 4.8 and 4.9 is just a theory, but it really doesn't matter; it's not so easy to dynamically change the code for a function. In addition to the protection bits, you also have to worry about synchronization with calls to that function, and about the possibility that a processor may have the old code in its instruction cache. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: kernel vm question
On Thu, Jan 27, 2005 at 06:48:56PM +0200, Jacques Fourie wrote: > Hi, > > Yes, I am trying to patch a piece of code in the kernel. The strange > thing is that this code works without a problem on FreeBSD 4.8 - has > the VM system changed to such an extent between 4.8 and 4.9 that the > pages in the kernel code segment are not writeable anymore? > > Thanks for the bit about the compiler optimization - at least I > understand that part now :) They should have never been writable. You should be able to change that protection on the page temporarily though to achieve the effect you want; take a look at e.g. mprotect(), you should be able to do much the same thing with kernel_map instead. -- Brian Fundakowski Feldman \'[ FreeBSD ]''\ <> [EMAIL PROTECTED] \ The Power to Serve! \ Opinions expressed are my own. \,,\ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: kernel vm question
Thanks for the reply - I really appreciate it. I have tried to change the protection on the page in a way similar to mprotect() but no luck. I have had a look at what ddb does when modifying kernel code and after applying the same ideas to my code everything works without a problem. The funny thing is that the original code (a mechanism we use to 'intercept' certain network functions in the kernel in order to do extra processing such as IPsec) was working on FreeBSD 4.8 on all the hardware that I tested with. Only after I ported the software to FreeBSD 4.9 I began seeing this issue and then only on 2 specific hardware configurations. Now that I have a working solution it is not that important to me but I would still like to understand why this does not fail 100% of the time if the kernel code pages are not writeable by default. Thanks again for all the replies I have received so far. regards, jacques On Thu, 27 Jan 2005 14:26:29 -0500, Brian Fundakowski Feldman <[EMAIL PROTECTED]> wrote: > On Thu, Jan 27, 2005 at 06:48:56PM +0200, Jacques Fourie wrote: > > Hi, > > > > Yes, I am trying to patch a piece of code in the kernel. The strange > > thing is that this code works without a problem on FreeBSD 4.8 - has > > the VM system changed to such an extent between 4.8 and 4.9 that the > > pages in the kernel code segment are not writeable anymore? > > > > Thanks for the bit about the compiler optimization - at least I > > understand that part now :) > > They should have never been writable. You should be able to change that > protection on the page temporarily though to achieve the effect you want; > take a look at e.g. mprotect(), you should be able to do much the same > thing with kernel_map instead. > > -- > Brian Fundakowski Feldman \'[ FreeBSD ]''\ > <> [EMAIL PROTECTED] \ The Power to Serve! \ > Opinions expressed are my own. \,,\ > ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"