Lines Matching refs:ram_len
203 u32 ram_len; /* 12: Total size of program + data, ie. ram_len */
591 const u32* memory, u32 ram_len);
630 u32 ram_len; /* Length of the entire apf program/data region */
673 #define IN_RAM_BOUNDS(p) (ENFORCE_UNSIGNED(p) && (p) < ctx->ram_len)
679 (p) + (size) <= ctx->ram_len && \
689 u32 *counter = (u32*)(ctx->program + ctx->ram_len);
698 /* This cannot wrap due to previous check, that enforced program_len & ram_len < 2GiB. */
699 if (ctx->program_len + 20 > ctx->ram_len) return EXCEPTION;
718 ctx->packet, ctx->packet_len, ctx->mem.slot, ctx->ram_len);
754 if (4 * imm > ctx->ram_len) return EXCEPTION;
843 /* pc < program_len < ram_len < 2GiB, thus pc + bytes cannot wrap */
1047 if (imm * 4 > ctx->ram_len) return EXCEPTION;
1059 if (offs & 0x80000000) offs += ctx->ram_len; /* unsigned overflow intended */
1097 const u32 ram_len, const u8* const packet,
1100 /* APFv6 interpreter requires program & ram_len to be 4 byte aligned. */
1102 if (3 & ram_len) return EXCEPTION;
1104 /* We rely on ram_len + 65536 not overflowing, so require ram_len < 2GiB */
1107 if ((program_len | ram_len) >> 31) return EXCEPTION;
1117 apf_ctx.ram_len = ram_len;
1122 apf_ctx.mem.named.ram_len = ram_len;
1133 if (buf_size >= sizeof(apf_ctx) && apf_ctx.program_len + buf_size <= apf_ctx.ram_len) {
1148 const u32 ram_len, const u8* const packet,
1154 return apf_runner(ctx, program, program_len, ram_len, packet, packet_len, filter_age_16384ths);