Ping, what do we think about trimming this file down to only supported branches?
- Feed Queries
- All Stories
- Search
- Feed Search
- Transactions
- Transaction Logs
Yesterday
Thu, Jan 22
Tue, Jan 20
Mon, Jan 19
Fri, Jan 16
Thu, Jan 15
Yes, the queue field is only 16 bits and queue 0 is always reserved for the admin queue, so I/O queues are 1...65535 meaning num_io_queues will always be <= 65535, so the ioq range for the new function can only be 0..65534.
Wed, Jan 14
Rename variable
(I would probably put the uint16_t before the two existing bool fields, so that the fields are somewhat sorted by size, but that doesn't really matter)
Hmm, today on amd64 nvme_request is 128 bytes, so packing the ioq is probably worth doing. Note that you could just add the new field as a uint16_t in place of the two spare bools.
In D54712#1249912, @kib wrote:No, this is not going to work. This brings stdio + locale into rtld.
In D54710#1249915, @jhb wrote:In D54710#1249909, @kib wrote:I think this is fine, but for completeness we probably should check that ehdr->e_phentsize == sizeof(Elf_Phdr), and return if not.
Yes. I do think we already check AT_PHENT, but might not be checking the size in the ehdr. Granted, that's a bug in the current code, and I might fix it in a separate commit.
In D54710#1249909, @kib wrote:I think this is fine, but for completeness we probably should check that ehdr->e_phentsize == sizeof(Elf_Phdr), and return if not.
In D54710#1249895, @emaste wrote:I wonder if we want to add some validity checking on ph->p_memsz while we're here? I think a wrong p_memsz will be handled the same before/after this change so it's fine from that perspective, it's more general pondering about what if any validation rtld ought to do.
In D54712#1249886, @imp wrote:I'm agnostic on the NDEBUG issue, though have 'never disable assert' leanings. But just leanings, since performance is also important and I don't know the lay of the land here to have an informed opinion.
One consequence of this change is that NDEBUG will now disable assertions in rtld itself (and not just the bits of libc pulled into rtld-libc.a). Downstream in CheriBSD we #undef'd NDEBUG in debug.h, but I think honoring NDEBUG might be the better approach?
Ping
Sun, Jan 4
Fri, Jan 2
Wed, Dec 31
Use memcpy
The arm assembly for the memcpy() variant is identical FWIW.
Tue, Dec 30
Yes, I like the memcpy version better.
Rebase on D54397
Pass tinderbox
Mon, Dec 29
Hmm, looking at the code both before and after this change on armv7, it is just using plain ldrh and strh which will fault on unaligned accesses?
I tried various permutations of alignas and that didn't work either. Also, alignas apparently can't weaken alignment, only strengthen it, and alignas can't be used in a typedef.
D53898 is a duplicate (not sure how I ended up with two of these).
Fri, Dec 26
Dec 22 2025
Dec 19 2025
I think those issues are not made any worse by your patch? And the fix is something that RISC-V and amd64 would need as well (well, RISC-V also needs this patch). I think you should just merge your current patch and let @markj fix both amd64 and aarch64 when he adds the new arena.
BTW, I've thought about adding an acpi_unregister_ioctl_all or the like that just takes the fn argument and unregisters all commands that use the same function. That would be a nicer way to handle unloading of a module that registers multiple handlers.