Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp585580pxb; Wed, 27 Jan 2021 15:55:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrIJGn/phv3txm4EgWL/elHPnaYNsl+tbn7OjRq4f0xte12y3Gmg0+y0igRVNckzdYwAff X-Received: by 2002:a17:906:4442:: with SMTP id i2mr6803642ejp.41.1611791705883; Wed, 27 Jan 2021 15:55:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611791705; cv=none; d=google.com; s=arc-20160816; b=H9i41RSn1K9PxMj47Z7W8/1BDlYoopFGrptFoyx+E9vOHzl+U33SWfXrL4H+tcfVYi bOnK9w9IxQHfdA2pI7A4aYExniW7EEz8acSyS1czRr3AZBN8C4EAF6h5Cb5exUPuZvHD vK0tJRX65vNadfeiq8/BIho4lJwEP/KCMrTUUZaufBGOkqsMri4T9Sz4i2a3wEAjvegS 4PVmjZBNoNhsHdxsy0kkSxeRIhybVKK4C7Bmd1xaRqEO62uyrFGpEBtRHeKEtHMY49Z/ KmOu09myil8oARthzuLvlP5rcSTDwZGGad66UMz10O7Nuj3i/A5auWF0HyX4kgbVCLQB o8rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ai5NdOowrSBakZKJ8eQ5sKDACTNsnhQctY19yYzSJYY=; b=D5gtE/EWwcB2uruoq282FYoaEq6gNtypFnrXtR9WHP9zv3o1+fVuIyPO/haP9wfeeN kENafWsBjrTMVOQvwQ+9NQ67pbVZdmxT+oPW4nXTcPAOfMK8w6D3ezxxnzW5uD8e7IX0 Jb6CePSaGEeW6uTwGnp9qKHDFHGz78wpgZuAJIeQhbzvNwDPKLwxUmU2KJf7wXLS5THO QCPFfhAROXYQ/bWzhqMp8aZbIYesc8VHTQBqpkKrUSiJaiA4cDcGjWeQDKh8Y7wIPH/4 TqQ0hdCORLJ0I5RyCCaxijiQuVkqc6HGvhwLFanjk07nvrLIMQiAaRKMOjcmS6P58wSi 9IvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=JLI+ILDc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si1797897edw.114.2021.01.27.15.54.41; Wed, 27 Jan 2021 15:55:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=JLI+ILDc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237439AbhA0L5T (ORCPT + 99 others); Wed, 27 Jan 2021 06:57:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237114AbhA0Lym (ORCPT ); Wed, 27 Jan 2021 06:54:42 -0500 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80831C061574 for ; Wed, 27 Jan 2021 03:54:02 -0800 (PST) Received: by mail-io1-xd29.google.com with SMTP id x21so1536054iog.10 for ; Wed, 27 Jan 2021 03:54:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ai5NdOowrSBakZKJ8eQ5sKDACTNsnhQctY19yYzSJYY=; b=JLI+ILDcY8CgzNx4U5ERNajaQdOSeMWvZ3Fekwavyt5PBFiZjd4jSLQvX08E9G/T5A G30O/ccGCl0WUZRYNM8hk/7y9FEs8wWuyvJcsLEg5Yn2TSIKy0zTL+vxQ3Yxto8t5pxq 2ZLkLOXd/E3cMLbrIKP2PO0DHPFBZpTumcsDp1Z4vKIN1/+sM7ktwYmTfB4fUGFl3aWc oOpD7tkk8A2NS5jyL2YvRG5BZ8aK72/DbwcJTagcKHTew4Sc+6IOGlMLd99pDql6fWHP mEATkHZIAGkoby8daAlC5eXxeqQEZb9Oywv3f77Lc/ZQsNYws4qZjVgCUza+speEwiYT 2bmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ai5NdOowrSBakZKJ8eQ5sKDACTNsnhQctY19yYzSJYY=; b=hqKGfYliphZKHESSmta1GaRw9hS8LIAmlC92QXw6VVjjhml52kW/EPGkEsZXNsRspT j4KHgBVyKui1sVlpjq5Y45TwkoZaTDMgvXhlxl46buzV5WRzczRUAbFdlzgRptfeiZBP lV9+8UO2QEpfAGBmNIW4myOvpX2f4boXX5rjj3oFtssTZkyQ2nn3Oh9GpapZ2XgsXk+C 2bbpQUG39M9IeZ/SowcfJ8WwNOJjGJ6UEOyqXv17XPTuWZZxndEQI5SdhBvI+RtVGO4j RXTCe8p4cQThFYV4LzIZaT/Ap3Z0/XY1AiaWYHNT7MIOSARbm5I3EpozISD+dS5hnLQW kldA== X-Gm-Message-State: AOAM533pw1an0W/2pEcMLVKBImRJus/Nxt4StL2iD91Xo6kPGXxXy+sW Ou6GBZ0zNpmBAaiJFGZAOEtNx+n+e3Zd/yBnoZgT7A== X-Received: by 2002:a05:6638:13c6:: with SMTP id i6mr8628625jaj.141.1611748441673; Wed, 27 Jan 2021 03:54:01 -0800 (PST) MIME-Version: 1.0 References: <20210127022507.23674-1-dong.menglong@zte.com.cn> In-Reply-To: <20210127022507.23674-1-dong.menglong@zte.com.cn> From: Brendan Jackman Date: Wed, 27 Jan 2021 12:53:50 +0100 Message-ID: Subject: Re: [PATCH bpf-next] bpf: change 'BPF_ADD' to 'BPF_AND' in print_bpf_insn() To: menglong8.dong@gmail.com Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , kafai@fb.com, songliubraving@fb.com, Yonghong Song , John Fastabend , KP Singh , netdev@vger.kernel.org, bpf , LKML , Menglong Dong Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks! On Wed, 27 Jan 2021 at 03:25, wrote: > > From: Menglong Dong > > This 'BPF_ADD' is duplicated, and I belive it should be 'BPF_AND'. > > Fixes: 981f94c3e921 ("bpf: Add bitwise atomic instructions") > Signed-off-by: Menglong Dong Acked-by: Brendan Jackman > --- > kernel/bpf/disasm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/bpf/disasm.c b/kernel/bpf/disasm.c > index 19ff8fed7f4b..3acc7e0b6916 100644 > --- a/kernel/bpf/disasm.c > +++ b/kernel/bpf/disasm.c > @@ -161,7 +161,7 @@ void print_bpf_insn(const struct bpf_insn_cbs *cbs, > insn->dst_reg, > insn->off, insn->src_reg); > else if (BPF_MODE(insn->code) == BPF_ATOMIC && > - (insn->imm == BPF_ADD || insn->imm == BPF_ADD || > + (insn->imm == BPF_ADD || insn->imm == BPF_AND || > insn->imm == BPF_OR || insn->imm == BPF_XOR)) { > verbose(cbs->private_data, "(%02x) lock *(%s *)(r%d %+d) %s r%d\n", > insn->code, > -- > 2.25.1 >