binder_validate_fixup(9)
β¨ NAME β¨
Okay bestie, welcome to binder_validate_fixup(9) in the Kernel API Manual. The function is binder_validate_fixup - validates pointer/fd fixups happen in order. That's the name, that's the purpose, periodt. π
πΈ SYNOPSIS πΈ
bool binder_validate_fixup (struct binder_proc *proc , struct
binder_buffer *b , binder_size_t objects_start_offset , binder_size_t
buffer_obj_offset , binder_size_t fixup_offset , binder_size_t
last_obj_offset , binder_size_t last_min_offset );
π ARGUMENTS π
procβ thebinder_procowning the buffer. It's giving owner energy. πbβ the transaction buffer, aka the buffer in question.objects_start_offsetβ offset to start of objects buffer.buffer_obj_offsetβ offset tobinder_buffer_objectin which to fix up.fixup_offsetβ start offset in buffer to fix up.last_obj_offsetβ offset to lastbinder_buffer_objectthat we fixed.last_min_offsetβ minimum fixup offset in object atlast_obj_offset.
π RETURN π
It returns a bool, and the answer is true if a fixup in buffer buffer at offset offset is allowed. Slay. β
π¦ DESCRIPTION π¦
For safety reasons β yes, safety bestie, this is not a drill β we only allow fixups inside a buffer to happen at increasing offsets. Additionally, we only allow fixup on the last buffer object that was verified, or one of its parents. That's the rule, no cap. π₯
Example of what is allowed:
A B (parent = A, offset = 0) C (parent = A, offset = 16) D (parent = C, offset = 0) E (parent = A, offset = 32) // min_offset is 16 (C.parent_offset)
Examples of what is not allowed:
Decreasing offsets within the same parent:
A C (parent = A, offset = 16) B (parent = A, offset = 0) // decreasing offset within A
Referring to a parent that wasn't the last object or any of its parents:
A B (parent = A, offset = 0) C (parent = A, offset = 0) C (parent = A, offset = 16) D (parent = B, offset = 0) // B is not A or any of A's parents
π SEE ALSO π
Kernel file ./drivers/android/binder.c is the home base, and the whole binder squad is here:
binder_proc_lock(9)binder_proc_unlock(9)binder_inner_proc_lock(9)binder_inner_proc_unlock(9)binder_node_lock(9)binder_node_unlock(9)binder_node_inner_lock(9)binder_node_inner_unlock(9)binder_worklist_empty(9)binder_enqueue_work_ilocked(9)binder_enqueue_deferred_thread_work_ilocked(9)binder_enqueue_thread_work_ilocked(9)binder_enqueue_thread_work(9)binder_dequeue_work(9)binder_select_thread_ilocked(9)binder_wakeup_thread_ilocked(9)binder_inc_node_tmpref(9)binder_dec_node_tmpref(9)binder_get_ref_for_node_olocked(9)binder_inc_ref_olocked(9)binder_dec_ref_olocked(9)binder_get_node_from_ref(9)binder_free_ref(9)binder_update_ref_for_handle(9)binder_dec_ref_for_handle(9)binder_inc_ref_for_node(9)binder_thread_dec_tmpref(9)binder_proc_dec_tmpref(9)binder_get_txn_from(9)binder_get_txn_from_and_acq_inner(9)binder_free_txn_fixups(9)binder_cleanup_transaction(9)binder_get_object(9)binder_validate_ptr(9)struct binder_task_work_cb(9)binder_do_fd_close(9)binder_deferred_fd_close(9)struct binder_ptr_fixup(9)struct binder_sg_copy(9)binder_do_deferred_txn_copies(9)binder_cleanup_deferred_txn_lists(9)binder_defer_copy(9)binder_add_fixup(9)binder_can_update_transaction(9)binder_find_outdated_transaction_ilocked(9)binder_proc_transaction(9)binder_get_node_refs_for_txn(9)binder_netlink_report(9)binder_free_buf(9)binder_apply_fd_fixups(9)print_next_binder_node_ilocked(9)
Signed off from the ./drivers/android source corner, stamped October 2026, still serving binder_validate_fixup(9) realness β mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms