Sometimes 32 bit and 64 bit ioctls are represented by the same number.
It causes unnecessary switch to 32 bit commpatible mode.
This patch prevents switching when we are dealing with 64 bit executable.
It fixes issue mentioned here
Differential D14023
BPF: Switch to 32 bit compatible mode only when thread is 32 bit pdk_semihalf.com on Jan 23 2018, 1:49 PM. Authored by Tags None Referenced Files
Details Sometimes 32 bit and 64 bit ioctls are represented by the same number. This patch prevents switching when we are dealing with 64 bit executable.
Diff Detail
Event TimelineComment Actions Almost all 32 bit ioctl work. In BPF there is BIOCSRTIMEOUT (takes timeval as argument) and BIOCSRTIMEOUT32 (takes timeval32 as argument) which are equal on non intel arch. Comment Actions My first approach was simply avoid fallback when 64 bit and 32 bit ioctl are equal. But it was terrible idea. Maybe you have some ideas how solve this issue? EDIT: link to issue fixed by this patch https://lists.freebsd.org/pipermail/freebsd-arm/2018-January/017360.html Comment Actions But we know if it's a 32 bit ioctl by checking SV_PROC_FLAG(td->td_proc, SV_ILP32), we don't need to break the ABI.
|