Re: [PATCH bpf v3 1/3] bpf: add some comments to stack representation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2023-12-02 at 18:05 -0500, Andrei Matei wrote:
> Signed-off-by: Andrei Matei <andreimatei1@xxxxxxxxx>
> ---

[...]

>  	int allocated_stack;
> +	/* The state of the stack. Each element of the array describes BPF_REG_SIZE
> +	 * (i.e. 8) bytes worth of stack memory.
> +	 * stack[0] represents bytes [*(r10-8)..*(r10-1)]
> +	 * stack[1] represents bytes [*(r10-16)..*(r10-9)]
> +	 * ...
> +	 * stack[allocated_stack/8 - 1] represents [*(r10-allocated_size)..*(r10-allocated_size+7)]
> +	 */

Nit: this uses variable 'allocated_size' that does not seem defined.
Otherwise a nice comment, thanks.






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux