Hello, development team of uclibc-ng,

    We are a company from China called Ingenic, and we have recently observed 
that msgctl(), shmctl() and semctl() do not fully support time64 in the latest 
version of uclibc-ng.

    When time64 is enabled on mips, timestamps of semaphore obtained by msgclt, 
shmctl and semctl are incorrectly, and semctl will report segmentation fault if 
RMID operation is used.  The timestamp of the semaphore on arm platform is also 
wrong.

    These errors seem to be caused by incomplete support for time64. Although 
struct semid_ds is modified for time64, the positions of its members are 
inconsistent with those of struct semid64_ds in the kernel, resulting in 
incorrect semaphore timestamps obtained by semctl. In addition, struct shmid_ds 
and struct msqid_ds do not seem to support time64.  Besides, when semctl 
removes the semaphore using RMID, the union semun arg is NULL and does not 
point to the semaphore instance. Accessing members of struct semid_ds will 
result in a segmentation fault.

    The attachment is my modification for three functions and structs they 
required on the mips platform, which can be used as a reference.  If you think 
these three functions do not need to be modified, hope you can write to tell me 
the reason.

    Looking forward to your reply !


Best regards,
Liu Yu

Attachment: 0001-time64-fixed-msgctl-semctl-shmctl-result-errors-for-.patch
Description: Binary data

_______________________________________________
devel mailing list -- devel@uclibc-ng.org
To unsubscribe send an email to devel-le...@uclibc-ng.org

Reply via email to