[PATCH 6/9] kernel/x86: enable x32 support for amd64
Philip Prindeville
philipp_subx at redfish-solutions.com
Fri Apr 28 10:10:50 PDT 2023
> On Apr 26, 2023, at 6:00 PM, Elliott Mitchell <ehem+openwrt at m5p.com> wrote:
>
> On Thu, Apr 27, 2023 at 12:46:49AM +0200, Stefan Lippers-Hollmann wrote:
>>
>> On 2023-03-30, Elliott Mitchell wrote:
>>> Full amd64 support isn't really appropriate for most situations
>>> OpenWRT is deployed. Whereas x86-x32 seems extremely appropriate for
>>> these situations. As such enable x86-x32 support.
>>>
>>> CONFIG_ARCH_MMAP_RND_COMPAT_BITS is required to follow along,
>>> otherwise the kernel build breaks.
>>>
>>> Signed-off-by: Elliott Mitchell <ehem+openwrt at m5p.com>
>>> ---
>>> I suggest OpenWRT should be placing quite a bit of effort towards
>>> x86-x32. x86-x32 seems a rather superior generic target for OpenWRT.
>>> Only issue is it could be valuable to have at least minimal amd64
>>> userland support alongside the x86-x32 version.
>>
>> x86_32 is pretty much dead in the water, with almost zero deployment
>> by general purpose distributions - apart from VM data centre
>> environments doing their own thing (least amount of RAM usage
>> possible, everything else being secondary at best). At least Debian
>> did raise security concerns about the x86_32 ISA in the past.
>
> Error: undefined symbol "x86_32"
>
> Without the extra context I would resolve that to "i386"/"ia32". I think
> "x32" or "x86_x32" are better strings for this case.
>
> According to what I had read that was in the past when x32 was sharing
> less of the i386 ABI. Notably x32 had been trying to pass time values
> in a distinct fashion. I will conceed I'm unsure whether x32 is ever
> truly going to get a seat at the table.
>
> On a different news front, Linux 5.10 has an option
> CONFIG_X86_X32_DISABLED which leaves x32 disabled by default (Debian's
> kernels were configured this way). Whereas 5.15 has removed the
> CONFIG_X86_X32_DISABLED option which seems to suggest the concerns may
> have been assuaged.
>
>> While I might understand (understand, not support) a desire for this
>> as a dedicated subtarget (to appease the virtualization crowd),
>> although I still don't see a reason or sufficient uptake in more
>> conventional Linux environments. I would not be happy (at all) to
>> lose 'normal' x86_64 support (on real hardware) for this exotic
>> fringe hybrid. I can imagine that actually building for this
>> environment (with a 32 bit userland) might lead to 'funny' results
>> as well (as in major toolchain changes necessary to get it working
>> as expected).
>
> I'm not proposing removing amd64 support, I'm proposing x32 is likely a
> more valuable target. Yet what you're describing reads like your desire
> is for OpenWRT/x86 to simply be yet another desktop Linux distribution.
>
> Unless you feel a networking device really needs 256GB of memory, virtual
> machines are precisely what OpenWRT/x86 *should* target. I think it is
> reasonable to also have a jumbo/desktop build, but using an entire x86
> machine doesn't seem to match OpenWRT's main theme.
I personally know of companies running virtualized instances of AMD64 on m4.large or m5.large Amazon EC2 instances.
I have three AMD64 firewalls... Two PC Engines APU6's (AMD GX-412TC "Jaguar" SoC based) running as a hot tandem pair for fail-over at the home office, and a dogfooding instance running on a KVM server that sandboxes my teenage kids and keeps them off the main household networks.
More information about the openwrt-devel
mailing list