diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/bpf/inode.c | 1 | ||||
| -rw-r--r-- | kernel/bpf/verifier.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index e833ed914358..be1dde967208 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c | |||
| @@ -363,6 +363,7 @@ out: | |||
| 363 | putname(pname); | 363 | putname(pname); |
| 364 | return ret; | 364 | return ret; |
| 365 | } | 365 | } |
| 366 | EXPORT_SYMBOL_GPL(bpf_obj_get_user); | ||
| 366 | 367 | ||
| 367 | static void bpf_evict_inode(struct inode *inode) | 368 | static void bpf_evict_inode(struct inode *inode) |
| 368 | { | 369 | { |
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index b914fbe1383e..8b8d6ba39e23 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c | |||
| @@ -653,6 +653,10 @@ static void mark_reg_read(const struct bpf_verifier_state *state, u32 regno) | |||
| 653 | { | 653 | { |
| 654 | struct bpf_verifier_state *parent = state->parent; | 654 | struct bpf_verifier_state *parent = state->parent; |
| 655 | 655 | ||
| 656 | if (regno == BPF_REG_FP) | ||
| 657 | /* We don't need to worry about FP liveness because it's read-only */ | ||
| 658 | return; | ||
| 659 | |||
| 656 | while (parent) { | 660 | while (parent) { |
| 657 | /* if read wasn't screened by an earlier write ... */ | 661 | /* if read wasn't screened by an earlier write ... */ |
| 658 | if (state->regs[regno].live & REG_LIVE_WRITTEN) | 662 | if (state->regs[regno].live & REG_LIVE_WRITTEN) |
| @@ -2345,6 +2349,7 @@ static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) | |||
| 2345 | * copy register state to dest reg | 2349 | * copy register state to dest reg |
| 2346 | */ | 2350 | */ |
| 2347 | regs[insn->dst_reg] = regs[insn->src_reg]; | 2351 | regs[insn->dst_reg] = regs[insn->src_reg]; |
| 2352 | regs[insn->dst_reg].live |= REG_LIVE_WRITTEN; | ||
| 2348 | } else { | 2353 | } else { |
| 2349 | /* R1 = (u32) R2 */ | 2354 | /* R1 = (u32) R2 */ |
| 2350 | if (is_pointer_value(env, insn->src_reg)) { | 2355 | if (is_pointer_value(env, insn->src_reg)) { |
