From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A15F9C433F5 for ; Thu, 16 Dec 2021 21:34:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236373AbhLPVeT (ORCPT ); Thu, 16 Dec 2021 16:34:19 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:50692 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236372AbhLPVeT (ORCPT ); Thu, 16 Dec 2021 16:34:19 -0500 Received: from pps.filterd (m0089730.ppops.net [127.0.0.1]) by m0089730.ppops.net (8.16.1.2/8.16.1.2) with ESMTP id 1BGL85Ss032401 for ; Thu, 16 Dec 2021 13:34:18 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=facebook; bh=W4+FipjYOPkKmXxst86A7FhuhbfcXmllD4GMgg1q2U0=; b=D7aIXSkVymg/ENvaHwW1D93Qu2uy/zDdE29qIVbHLIcKpRKqpunB8iCYHrJJxEswGPwG PFhFxCo49uCTzyVzJZ9CR+76Cqn5fDNTQHnghU1LRKqKxkN2QUnJrdEFuSmuLhYM+a77 P8O9KVlJpBEIVTrd3PGTa6f2noxcu6b2AmI= Received: from mail.thefacebook.com ([163.114.132.120]) by m0089730.ppops.net (PPS) with ESMTPS id 3d0d3hr5y4-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 16 Dec 2021 13:34:18 -0800 Received: from twshared3399.25.prn2.facebook.com (2620:10d:c085:108::4) by mail.thefacebook.com (2620:10d:c085:11d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 16 Dec 2021 13:34:17 -0800 Received: by devbig921.prn2.facebook.com (Postfix, from userid 132113) id 2E7887888A9; Thu, 16 Dec 2021 13:34:07 -0800 (PST) From: Christy Lee To: , , CC: , , , Subject: [PATCH v3 bpf-next 3/3] Only output backtracking information in log level 2 Date: Thu, 16 Dec 2021 13:33:58 -0800 Message-ID: <20211216213358.3374427-4-christylee@fb.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211216213358.3374427-1-christylee@fb.com> References: <20211216213358.3374427-1-christylee@fb.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-GUID: lksXI1xAs0Mina4W4plqqTgJnwiT2sSG X-Proofpoint-ORIG-GUID: lksXI1xAs0Mina4W4plqqTgJnwiT2sSG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-16_08,2021-12-16_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=fb_outbound_notspam policy=fb_outbound score=0 lowpriorityscore=0 phishscore=0 malwarescore=0 mlxlogscore=990 suspectscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 spamscore=0 mlxscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112160115 X-FB-Internal: deliver Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Backtracking information is very verbose, don't print it in log level 1 to improve readability. Signed-off-by: Christy Lee Acked-by: Andrii Nakryiko --- kernel/bpf/verifier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 89d0026e3b17..a586d622d6f5 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -2397,7 +2397,7 @@ static int backtrack_insn(struct bpf_verifier_env *= env, int idx, =20 if (insn->code =3D=3D 0) return 0; - if (env->log.level & BPF_LOG_LEVEL) { + if (env->log.level & BPF_LOG_LEVEL2) { verbose(env, "regs=3D%x stack=3D%llx before ", *reg_mask, *stack_mask)= ; verbose(env, "%d: ", idx); print_bpf_insn(&cbs, insn, env->allow_ptr_leaks); @@ -2655,7 +2655,7 @@ static int __mark_chain_precision(struct bpf_verifi= er_env *env, int regno, DECLARE_BITMAP(mask, 64); u32 history =3D st->jmp_history_cnt; =20 - if (env->log.level & BPF_LOG_LEVEL) + if (env->log.level & BPF_LOG_LEVEL2) verbose(env, "last_idx %d first_idx %d\n", last_idx, first_idx); for (i =3D last_idx;;) { if (skip_first) { @@ -2742,7 +2742,7 @@ static int __mark_chain_precision(struct bpf_verifi= er_env *env, int regno, new_marks =3D true; reg->precise =3D true; } - if (env->log.level & BPF_LOG_LEVEL) { + if (env->log.level & BPF_LOG_LEVEL2) { verbose(env, "parent %s regs=3D%x stack=3D%llx marks:", new_marks ? "didn't have" : "already had", reg_mask, stack_mask); --=20 2.30.2