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

Reply via email to