verifier.c (3d76a4d3d4e591af3e789698affaad88a5a8e8ab) | verifier.c (fd7c211d6875013f81acc09868effe199b5d2c0c) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com 3 * Copyright (c) 2016 Facebook 4 * Copyright (c) 2018 Covalent IO, Inc. http://covalent.io 5 */ 6#include <uapi/linux/btf.h> 7#include <linux/bpf-cgroup.h> 8#include <linux/kernel.h> --- 16799 unchanged lines hidden (view full) --- 16808 tname = btf_name_by_offset(btf, t->name_off); 16809 if (!tname) { 16810 bpf_log(log, "attach_btf_id %u doesn't have a name\n", btf_id); 16811 return -EINVAL; 16812 } 16813 if (tgt_prog) { 16814 struct bpf_prog_aux *aux = tgt_prog->aux; 16815 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com 3 * Copyright (c) 2016 Facebook 4 * Copyright (c) 2018 Covalent IO, Inc. http://covalent.io 5 */ 6#include <uapi/linux/btf.h> 7#include <linux/bpf-cgroup.h> 8#include <linux/kernel.h> --- 16799 unchanged lines hidden (view full) --- 16808 tname = btf_name_by_offset(btf, t->name_off); 16809 if (!tname) { 16810 bpf_log(log, "attach_btf_id %u doesn't have a name\n", btf_id); 16811 return -EINVAL; 16812 } 16813 if (tgt_prog) { 16814 struct bpf_prog_aux *aux = tgt_prog->aux; 16815 |
16816 if (bpf_prog_is_dev_bound(tgt_prog->aux)) { 16817 bpf_log(log, "Replacing device-bound programs not supported\n"); | 16816 if (bpf_prog_is_dev_bound(prog->aux) && 16817 !bpf_prog_dev_bound_match(prog, tgt_prog)) { 16818 bpf_log(log, "Target program bound device mismatch"); |
16818 return -EINVAL; 16819 } 16820 16821 for (i = 0; i < aux->func_info_cnt; i++) 16822 if (aux->func_info[i].type_id == btf_id) { 16823 subprog = i; 16824 break; 16825 } --- 564 unchanged lines hidden --- | 16819 return -EINVAL; 16820 } 16821 16822 for (i = 0; i < aux->func_info_cnt; i++) 16823 if (aux->func_info[i].type_id == btf_id) { 16824 subprog = i; 16825 break; 16826 } --- 564 unchanged lines hidden --- |