Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp269275pxb; Thu, 2 Sep 2021 03:53:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPkCsG2NmcFySdexHo+d8FYyUQn7af/ncggz4KDhbUKbgQyUFI2i/14kh8nEjhHA7zCRaO X-Received: by 2002:a92:d647:: with SMTP id x7mr1791071ilp.123.1630580018156; Thu, 02 Sep 2021 03:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630580018; cv=none; d=google.com; s=arc-20160816; b=F04WmTHhCfMtnfrmZosVvAbaQ8iil7uASkQ+dmyvI3o0o4UI4IwfMWJhlOpaR+BxXf 0E8YPYBG6IcH4v7K0kbeUlXOYaT5Vr33Ava0MgN0zPToQDMtr+6vEs1hWG5wt9RfeF4K yS1/gvBfdtkNa+jgcUqgzcnrSzgEYeGgdf8rWY3/X3FUWigx21oIMr3C1HkqD2/2Dipl vyMiixxPDXi51F172rHYPtKJ1cnxSLyZEQxMUqSnldsiICAVuDp7kQkFrkklj0V6Y/oW S2ZLKMC6sdWxEh35dFzLDLbwGl1fN9RkoanlIbZfER+U/Ue9iq2+cbviKoZvfP1GYyS+ Xh9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BPSY5xM/hvA/ZvCV4qV68+I6GXupc3hyHNe5KJkXhYk=; b=QS0ydS0IQw3GHLV7NJctWdW4s+6gT88PWAPMPewCb1SAi7IVgtqgFCdt74W/WxUIee aayJ1dcJNnb8x9uWlMnQs7yoOQfHDP/z+gUXFO/fvdAegnb115ixWO3eA0sUWoAHblk5 uM34UX6nacOsV11WpQ3scBlmTfutO17QHpglaCnIOf2O2y1h5fd43/DL76J2NGkaK4Oi mAXMN6I4p84sEwMyUnXpyOFtF9DuS6iIJjv09G8+wr4tivket4WnDzkvCCIU2EvyvWgc VeXLEK9aHCqGm86gSZBZ0eIsM6/VlzuSE+WPJm1dPAke86hB9kW0g4bc6296I97balHc Jv6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=jPPSwb8j; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o38si1795635jac.39.2021.09.02.03.53.26; Thu, 02 Sep 2021 03:53:38 -0700 (PDT) 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=@alien8.de header.s=dkim header.b=jPPSwb8j; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242421AbhIBKSF (ORCPT + 99 others); Thu, 2 Sep 2021 06:18:05 -0400 Received: from mail.skyhub.de ([5.9.137.197]:59464 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241969AbhIBKSE (ORCPT ); Thu, 2 Sep 2021 06:18:04 -0400 Received: from zn.tnic (p200300ec2f0ed100d115725f57e7001c.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:d100:d115:725f:57e7:1c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id A90691EC0493; Thu, 2 Sep 2021 12:17:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1630577820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=BPSY5xM/hvA/ZvCV4qV68+I6GXupc3hyHNe5KJkXhYk=; b=jPPSwb8jWeYGS7RkIlRwkdzj19NXq4ufBOzmnI4xMEpXSyPrb5FOlqfMzUovlIATbfiFjz j8TIKoU3PFCi3VVWdYjPshEXnPoQEITxtaP+iZRcjHB5d9ycHMXdgopiZLXHZ5n5cFA5yc FybTxkF4hHf6/SF9iNfEp89u2eMxmL8= Date: Thu, 2 Sep 2021 12:17:36 +0200 From: Borislav Petkov To: Jiang Jiasheng Cc: tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] bpf: Add env_type_is_resolved() in front of env_stack_push() in btf_resolve() Message-ID: References: <1630577097-644528-1-git-send-email-jiasheng@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1630577097-644528-1-git-send-email-jiasheng@iscas.ac.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 02, 2021 at 10:04:57AM +0000, Jiang Jiasheng wrote: > From: jiasheng > > We have found that in the complied files env_stack_push() > appear more than 10 times, and under at least 90% circumstances > that env_type_is_resolved() and env_stack_push() appear in pairs. > For example, they appear together in the btf_modifier_resolve() > of the file complie from 'kernel/bpf/btf.c'. > But we have found that in the btf_resolve(), there is only > env_stack_push() instead of the pair. > Therefore, we consider that the env_type_is_resolved() > might be forgotten. > > Signed-off-by: jiasheng > --- > kernel/bpf/btf.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c > index f982a9f0..454c249 100644 > --- a/kernel/bpf/btf.c > +++ b/kernel/bpf/btf.c > @@ -4002,7 +4002,8 @@ static int btf_resolve(struct btf_verifier_env *env, > int err = 0; > > env->resolve_mode = RESOLVE_TBD; > - env_stack_push(env, t, type_id); > + if (env_type_is_resolved(env, type_id)) > + env_stack_push(env, t, type_id); > while (!err && (v = env_stack_peak(env))) { > env->log_type_id = v->type_id; > err = btf_type_ops(v->t)->resolve(env, v); > -- You still didn't read what I suggested, did you? Because there it also explains who to CC on patches. Like, for example, for this wrong patch you've CCed the wrong people. Oh well, until you do, I'm deleting your mail. Good luck. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette