[PATCH] elf: fix pldd on targets that map objects above 2^63 [BZ #34641]

Florian Weimer fweimer@redhat.com
Thu Sep 17 08:33:50 GMT 2026


* Stian Halseth:

>> The process_vm_readv was not added at same time on all ABIs. Although
>> for mostly kABI it was done on 3.2, for arm32 compat (aarch64 kernel)
>> it was done on 3.7, on hppa at 3.9.
>> 
>> Maybe we can just lseek/read:
>> 
>>   static ssize_t
>>   pread_mem (int fd, void *buf, size_t nbytes, uint64_t addr)
>>   {
>>     if (lseek (fd, (off_t) addr, SEEK_SET) == (off_t) -1)
>>       return -1;
>>   
>>     return read (fd, buf, nbytes);
>>   }
>> 
>
> Right, I missed that, and you're right. I have tested your suggestion.
> It works and is much cleaner. Sending patch v2 now.

Isn't it a kernel bug that lseek works, but not pread?

Thanks,
Florian



More information about the Libc-alpha mailing list