Source-Changes-D archive

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

Re: CVS commit: src/sys/compat/linux/common





On Sep 29, 2024, at 10:27 PM, matthew green <mrg%eterna23.net@localhost> wrote:

thanks for fixing the build.

"Robert Elz" writes:
Module Name: src
Committed By: kre
Date: Mon Sep 30 01:26:48 UTC 2024

Modified Files:
src/sys/compat/linux/common: linux_sched.c

Log Message:
Supply a missing cast, which fixes the i386 (other 32 bit too probably)
builds.

Note I used uintptr_t rather than intptr_t which other similar
lines nearby use - the int being converted to a ptr is uint64_t
so using unsigned seemed safer to me.   Feel free to change it.

this looks like it should use NETBSD32IPTR64(), but that uses
intptr_t for reasons i don't recall but that may matter.  maybe
we need better checking in general - does linux reject this one
32-bit platforms if 'stack' has high half set, or perhaps the code
just assigns 64-bit input to a 32-it pointer and ignores them.

christos?  do you know?


See the comment in /usr/src/sys/compat/netbsd32/netbsd32.h:

 *      NETBSD32_POINTER_TYPE
 *              - 32-bit pointer type, normally uint32_t but can be int32_t
 *                for platforms which rely on sign-extension of pointers
 *                such as SH-5.
 *                eg:   #define NETBSD32_POINTER_TYPE uint32_t

And then:


mips and riscv use int32_t and the rest use uint32_t.

christos

Attachment: signature.asc
Description: Message signed with OpenPGP



Home | Main Index | Thread Index | Old Index