From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA4F55380C for ; Mon, 8 Jan 2024 19:40:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="vve015L6" Message-ID: <9ef37508-39d6-4b8a-81c9-5e5b788cdc7f@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1704742856; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h3nVCpc5OapJePtEPDuuDf6kvgUHMzrvjWYW4gLcJrk=; b=vve015L6czvkPmuVy8BuG1fKbdGOe3IcRxf5OHuMCvqoZRcAmIBm0gMYDRWufdfIOIXv/y f58yZBx0A/3TsEgXf8gcVNFW1SLGDeBaX0+UUSV8FY6laqCJZQDUYIDgUzNKMJOjH0jQ0c RfTRma3lX8J2YaUCYcQ9/0xGXtOGShU= Date: Mon, 8 Jan 2024 11:40:49 -0800 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v2 1/2] bpf: Track aligned st store as imprecise spilled registers Content-Language: en-GB To: Eduard Zingerman , Andrii Nakryiko Cc: bpf@vger.kernel.org, Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , kernel-team@fb.com, Martin KaFai Lau , Kuniyuki Iwashima , Martin KaFai Lau References: <20240103232617.3770727-1-yonghong.song@linux.dev> <69410e766d68f4e69400ba9b1c3b4c56feaa2ca2.camel@gmail.com> <67a4b5b8bdb24a80c1289711c7c156b6c8247403.camel@gmail.com> <5e31a6835b648fae9880f6bfbc40801539b2d143.camel@gmail.com> <07d7d6e0-d090-47e6-9f17-0b083aeaa7af@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yonghong Song In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 1/8/24 11:06 AM, Eduard Zingerman wrote: > On Mon, 2024-01-08 at 10:59 -0800, Yonghong Song wrote: > [...] > >> I guess one way could be doing backtracking with "... = arr[i]" >> is to have four ranges, [-32, -24), [-24, -16), [-16, -8), [-8, 0). >> Later, when we see arr[i] = r0 and i has range [-32, 0). Since it covers [-32, -24), etc., >> precision marking can proceed with 'r0'. But I guess this can potentially >> increase verifier backtracking states a lot and is not scalable. Conservatively >> doing precision marking with 'r0' (in arr[i] = r0) is a better idea. > In theory it should be possible to collapse this range to min/max pair. > But it is a complication, and I'd say it shouldn't be implemented > unless we have evidence that it significantly improves verification > performance. Ack. We do not need to introduce this yet as the variable index range should be much much less common. > >> Andrii has similar comments in >> https://lore.kernel.org/bpf/CAEf4Bzb0LdSPnFZ-kPRftofA6LsaOkxXLN4_fr9BLR3iG-te-g@mail.gmail.com/ >>