Re: [PATCH v3] arm: rust: Enable Rust support for ARMv7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01.02.25 12:42 AM, Christian Schrefl wrote:
> On 31.01.25 8:37 PM, Arnd Bergmann wrote:
>> On Fri, Jan 31, 2025, at 19:58, Christian Schrefl wrote:
>>> On 31.01.25 5:05 PM, Andrew Lunn wrote:
>>>>> To fix this Rust would have to provide a way to build the core
>>>>> library without float support. I don't know if there is a plan
>>>>> already to allow this.
>>>>
>>>> Floating point is banned within the kernel, except for in very narrow
>>>> conditions, because the floating point registers are lazy saved on
>>>> context switch. If the kernel uses the floating point registers, you
>>>> can break user space in bad ways.
>>>>
>>>> I expect this has been discussed, since it is well known kernel
>>>> restriction. Maybe go see what happened to that discussion within RfL?
>>>
>>> After checking again, it seems the float intrinsics are actually not
>>> needed anymore at least for my config.
>>
>> Ah, nice! If this is true for all architectures using the current
>> rust compiler, it would be great to remove the FP stubs entirely
>> and have link errors instead of panicking, to make it consistent
>> with C.
> 
> After a quick test it seems that (most?) intrinsics are not needed
> anymore on x86, but not sure if that's valid for all supported rust
> versions and config options.

On Rust 1.84.1 only __udivti3 is requied, with 1.78 most of the
intrinsics seem to still be required.

Cheers
Christian




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux