From patchwork Fri Jan 24 09:27:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 232993 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2443C2D0DB for ; Fri, 24 Jan 2020 11:16:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AADCF20704 for ; Fri, 24 Jan 2020 11:16:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579864600; bh=uho0PhkFgWD3meAJb5Lb5p+FMs+MeRiijl34yQ14bYs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SnD+IbtI3T5jE+TtbPRIOBGlLE7U2dBPjjEzeA+ClT956eMSKCQxSew/C7MZsA55Q 0LldIKd2ci08ljtzRMi8DgRXA5F4JaGFcTnjOAujxlQV1awWKEqu0n+tdg14M3KUGx HKO3V6jLfKy6uuZ8BzdBOPGbslJxMVkoS0w2URv4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390373AbgAXLQa (ORCPT ); Fri, 24 Jan 2020 06:16:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:53304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390369AbgAXLQa (ORCPT ); Fri, 24 Jan 2020 06:16:30 -0500 Received: from localhost (ip-213-127-102-57.ip.prioritytelecom.net [213.127.102.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 385812075D; Fri, 24 Jan 2020 11:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579864589; bh=uho0PhkFgWD3meAJb5Lb5p+FMs+MeRiijl34yQ14bYs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=StboQCEM8F3kTKetMbEtCiezwdUHyLbwDqqhBUwtqtNkIQMjWdGIWVPiRleyA55Bc JYycvhyf2Xjrg21mVB6iyO13pSW6KbIoE8sQz6DKInk+TOSN/J0UX32Q/mTH/l4eSL 3jrfqi4msT9Ybk4pTMBvEiAJz/vlsiC6EIsmOWls= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrey Ignatov , Daniel Borkmann , Sasha Levin Subject: [PATCH 4.19 295/639] bpf: Add missed newline in verifier verbose log Date: Fri, 24 Jan 2020 10:27:45 +0100 Message-Id: <20200124093123.850706284@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124093047.008739095@linuxfoundation.org> References: <20200124093047.008739095@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Andrey Ignatov [ Upstream commit 1fbd20f8b77b366ea4aeb92ade72daa7f36a7e3b ] check_stack_access() that prints verbose log is used in adjust_ptr_min_max_vals() that prints its own verbose log and now they stick together, e.g.: variable stack access var_off=(0xfffffffffffffff0; 0x4) off=-16 size=1R2 stack pointer arithmetic goes out of range, prohibited for !root Add missing newline so that log is more readable: variable stack access var_off=(0xfffffffffffffff0; 0x4) off=-16 size=1 R2 stack pointer arithmetic goes out of range, prohibited for !root Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann Signed-off-by: Sasha Levin --- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 9bbfb1ff4ac94..e85636fb81b9c 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -1253,7 +1253,7 @@ static int check_stack_access(struct bpf_verifier_env *env, char tn_buf[48]; tnum_strn(tn_buf, sizeof(tn_buf), reg->var_off); - verbose(env, "variable stack access var_off=%s off=%d size=%d", + verbose(env, "variable stack access var_off=%s off=%d size=%d\n", tn_buf, off, size); return -EACCES; }