[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipfilter
Subject:    Building pfil on Solaris10/AMD64
From:       Gabriele Bulfon <gbulfon () sonicle ! com>
Date:       2005-12-29 18:35:18
Message-ID: 30869925.1135881318481.JavaMail.root () www
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I would like to share with you my recent experience on a Sun v20z with Solaris 10 / \
AMD64. I decided to remove the original ipfilter packages from Sun (SUNWipfr and \
SUNWipfu) because I prefer to stay up to date with the new source releases. I do it \
regularly and with no panic on the other Solaris 10 architectures (x86 and Sparc). \
Then I came up with a Sun v20z machine, with Solaris 10 / AMD64. I reuibuilt both \
IPFilter and PFil from sources, grabbed the packages and tried to install them. PFil \
didn't want to install, bacause (with my surprise) the package was in x86 mode (no 64 \
bit), and the Solaris Kernel was refusing to install.
The strange thing was that:
- IPFilter correctly recognized the amd64 architecture, and built both the "ipf" and \
                "ipfx" package (32 and 64 bit binaries).
- PFil did not recognize the amd64 architecture, and built the x86 package.
I looked at the Makefiles, and saw that IPFilter Makefile has code for amd64, but \
PFil has code just for the sparcv9 and x86 architecture... So I modified the PFil \
Makefile, subsituting every occurrence of "sparcv9" into "amd64". At first rebuild, I \
saw it was building in 64 bit mode (-m64 was there), but gcc complained about the \
"-mcmodel=medlow" not supported on amd64. After google-ing, I tried the \
"-mcmodel=medium" and it compiled perfectly in 64 bit mode. Then I installed the PFil \
packages, then ipfx and finally ipf, configured a little the machine to fit the \
Solaris 10 svc methods, and rebooted. It was running! I was so happy!
But......the Kernel rebooted 3 times during the day with Panic on "pfil" drivers....
So I tried to change "-mcmodel=kernel".....same problem.
Finally, I found a site suggesting some flags to gcc for amd64 platforms.
I rebuilt, and it worked....and it still seem to work for 1 day...
This is what I changed:
S64FLAGS=-m64 -mcmodel=kernel -mno-red-zone -ffreestanding -DDO=pfil${SBITS}
Is this the correct flags to build PFil on amd64? Can I be sure that I won't have \
Kernel Panics again? Thanks for any help
Gabriele.
Gabriele Bulfon - Sonicle S.r.l.
Tel +39 028246016 Int. 30 - Fax +39 028243880
Via Felice Cavallotti 16 - 20089, Rozzano - Milano - ITALY
http://www.sonicle.com


[Attachment #5 (text/html)]

<HTML>
<BODY>
<FONT face=Arial><div><font face="Arial">I would like to share with you my recent \
experience on a Sun v20z with Solaris 10 / AMD64.<br>I decided to remove the original \
ipfilter packages from Sun (SUNWipfr and SUNWipfu) because I prefer to stay up to \
date with the new source releases.<br>I do it regularly and with no panic on the \
other Solaris 10 architectures (x86 and Sparc).<br><br>Then I came up with a Sun v20z \
machine, with Solaris 10 / AMD64.<br>I reuibuilt both IPFilter and PFil from sources, \
grabbed the packages and tried to install them.<br>PFil didn't want to install, \
bacause (with my surprise) the package was in x86 mode (no 64 bit),<br>and the \
Solaris Kernel was refusing to install.<br>The strange thing was that:<br>- IPFilter \
correctly recognized the amd64 architecture, and built both the "ipf" and "ipfx" \
package (32 and 64 bit binaries).<br>- PFil did not recognize the amd64 architecture, \
and built the x86 package.<br><br>I looked at the Makefiles, and saw that IPFilter \
Makefile has code for amd64, but PFil has code just for the sparcv9 and x86 \
architecture...<br>So I modified the PFil Makefile, subsituting every occurrence of \
"sparcv9" into "amd64".<br>At first rebuild, I saw it was building in 64 bit mode \
(-m64 was there), but gcc complained about the "-mcmodel=medlow" not supported on \
amd64.<br>After google-ing, I tried the "-mcmodel=medium" and it compiled perfectly \
in 64 bit mode.<br><br>Then I installed the PFil packages, then ipfx and finally ipf, \
configured a little the machine to fit the Solaris 10 svc methods, and \
rebooted.<br>It was running! I was so happy!<br><br>But......the Kernel rebooted 3 \
times during the day with Panic on "pfil" drivers....<br><br>So I tried to change \
"-mcmodel=kernel".....same problem.<br><br>Finally, I found a site suggesting some \
flags to gcc for amd64 platforms.<br>I rebuilt, and it worked....and it still seem to \
work for 1 day...<br>This is what I changed:<br><br>S64FLAGS=-m64 -mcmodel=kernel \
-mno-red-zone -ffreestanding -DDO=pfil${SBITS}<br><br>Is this the correct flags to \
build PFil on amd64? Can I be sure that I won't have Kernel Panics \
again?<br><br>Thanks for any help<br>Gabriele.<br><br></font><div><font \
face="Arial"><br> <table border="1" cellspacing="0">
<tbody><tr>
 <td align="right"><a target="_blank" href="http://www.sonicle.com">
<img src="http://www.sonicle.com/images/mailcard.jpg" wid="" th="350" border="0" \
height="45"></a></td> </tr>
<tr>
 <td align="right">
<font face="Arial" size="1">
Gabriele Bulfon - Sonicle S.r.l.<br>
Tel +39 028246016 Int. 30 - Fax +39 028243880<br>
Via Felice Cavallotti 16 - 20089, Rozzano - Milano - ITALY<br>
<a href="http://www.sonicle.com">http://www.sonicle.com</a>
</font>
 </td>
</tr>
</tbody></table></font></div></div><font face="Arial">            </font></FONT>
</BODY>
</HTML>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic