Difference between revisions of "Platform Notes (FreeBSD)"

From FreeM Wiki
Jump to navigation Jump to search
Line 32: Line 32:
 
FreeM is incompatible with address space layout randomization (ASLR), which is enabled by default on FreeBSD 13.2 and newer on 64-bit platforms.
 
FreeM is incompatible with address space layout randomization (ASLR), which is enabled by default on FreeBSD 13.2 and newer on 64-bit platforms.
  
To use FreeM on FreeBSD 13 and newer, add the following lines to <code>/etc/sysctl.conf</code> and reboot:
+
To use FreeM on FreeBSD 13.2 and newer, add the following lines to <code>/etc/sysctl.conf</code> and reboot:
  
 
<pre>
 
<pre>

Revision as of 17:58, 15 April 2025

Port Status

FreeBSD is a Tier 1 Port

Verified Releases

  • FreeM 0.62.3 (27 Mar 2025)
  • FreeM 0.62.2 (23 Mar 2025)
  • FreeM cvs-current
  • FreeM 0.62.1

Testing Details

  • Bare-metal amd64 system
  • FreeBSD 14.1-RELEASE-p2 amd64
  • gcc 13.2.0
  • autoconf 2.72
  • automake 1.17

Required Kernel Tuning

Shared Memory

FreeM in its default configuration requires just under 17MiB of shared memory. You can check the relevant kernel parameter with the following command:

$ sudo sysctl kern.ipc.shmmax

If kern.ipc.shmmax is less than 17000000, add the following lines to /etc/sysctl.conf and reboot:

kern.ipc.shmmax=17000000

Address Space Layout Randomization

FreeM is incompatible with address space layout randomization (ASLR), which is enabled by default on FreeBSD 13.2 and newer on 64-bit platforms.

To use FreeM on FreeBSD 13.2 and newer, add the following lines to /etc/sysctl.conf and reboot:

kern.elf64.aslr.pie_enable=0
kern.elf64.aslr.enable=0

If you do not wish to globally disable ASLR on your system, you can use FreeM by disabling it per-process with each invocation by using the following syntax:

$ proccontrol -m aslr -s disable freem

Starting Daemon Automatically

  • Copy scripts/freebsd-rc/freem to /usr/local/etc/rc.d
  • Type the following commands with root privileges:
# pw group add freem
# pw user add freem -m -g freem
# sysrc freem_enable="YES"
# chmod +x /usr/local/etc/rc.d/freem
  • For each user who needs to run FreeM, type the following command:
# pw group mod freem -m username
  • Reboot

Port Challenges

None.