bpf: fix write helpers with regards to non-linear parts