Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp613878pxh; Tue, 9 Nov 2021 16:11:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFbGyiNU45MVKnaJJK121h49O3eJthEJp8YOJ4kuMZBlwUYhTUJqKbPTm8iBZhcWcJQVKT X-Received: by 2002:a92:d152:: with SMTP id t18mr8650143ilg.199.1636503109354; Tue, 09 Nov 2021 16:11:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636503109; cv=none; d=google.com; s=arc-20160816; b=QvS5f5VhEUtuaV+hUP5xKwO/KUacJuWdlcsh8gWfibJvpiAx+ILB3uNkSz9LMd9f38 FF7wYfWg5yXXcnyCy96cDACjbTihRmcdnZnzmGIlbZKJKYEL6ePp1zZeYj+CxNYh1yuS CHB8ddEbf5AYGJIAdClJ+itHEJR0F1flRnt2rde5px+bxOl4TbKFcc6auBrT3MQ5xuTv bZLV7P0vakfhpYA8Cke1nv/utoczwcznY3rE8lOTDQg9J1fsLM/364t6Pp25h2A0U1xL p3fHQV1/o1bKI/P66XIjvZtNLFaXVbXbHm56ciCnIOMSvDGw0bm3s2G7QyFpdqmIhwLL CTQw== 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=YOqlZrA3M1NbCnfldZU6DBKVKCYvlENSsVuwD1wea5I=; b=ZqYyB41DAihE/s/3G2Q4VbDHsZs7d8QtjYz/ALY5kyEsZXCaGfxi+/Pls9YqBae2Xe 06AZ6rxlmg36gLtUatYWX5DWeXMSAvfL28XmS6saji8XFlFCXN97CBwk24iM5QLBP/Xa 764JcjDyELcQELcRwEbirq8wUUQrkjvyczTTe+ETYRlnzugpmUzb/m/fLYExlNDGI2Jj N4LJhWGcndDKqSUL0GYuCHXFDk1Bq9NH1ZDixNg8EjQBT3gNb3YO1GUL/6ApRBWzh4oM oSd9TlvgBXpao0nnyQ1qJkpaE6iLdPw4cf5uCqC6aOT4bSRPIDz1xPgkohXyBu+8htb6 PVGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=PrwFZaca; 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 o8si10896226iov.2.2021.11.09.16.11.35; Tue, 09 Nov 2021 16:11:49 -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=20210112 header.b=PrwFZaca; 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 S242168AbhKIST7 (ORCPT + 97 others); Tue, 9 Nov 2021 13:19:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242172AbhKIST6 (ORCPT ); Tue, 9 Nov 2021 13:19:58 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4A4FC061766 for ; Tue, 9 Nov 2021 10:17:12 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id 188so6873205pgb.7 for ; Tue, 09 Nov 2021 10:17:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=YOqlZrA3M1NbCnfldZU6DBKVKCYvlENSsVuwD1wea5I=; b=PrwFZacaTHainZ0qaAJV/zGD84dkGdMP8wEbnN7L/byt2i65mFA4DL8wDIaDA2pijb EYto4KmnQvazARA+jFcSeg4gqw+SoCMbY+BNStbubXZIVdonzY8uuiHYm0OCOnU6fCa7 WqWrWZcODnRH9XLy9J6OKpT4D2b2E0tOCqlwgLozReAYbmZULzJBD8uoMd+qTgx7Q7RV rpiAupfnbd9bvCephkTGO3XgK5alwjY9cC9BptnwVVwJVErwNoAfdSoJlJ+SoNzw0QSh pXAVkpVngZtCTnpp6Gj9xy6YOs0lEK5oZcXYWNr4Ztu0xSb9Kaxyso8k+LcXjBVLXuvg LIGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=YOqlZrA3M1NbCnfldZU6DBKVKCYvlENSsVuwD1wea5I=; b=h6GyxBpdksg3yeoE6BWqo6Du5ooioJgZtScs1mWuqHSRvf3IlFi5gKZwG2QHz336UE zLov1jdJ60eLOuqLuziA0asK3JS5JFpdfU9/v+DC2/7GEf/B/hTlocw8vCv0HbWEBjNR PSII4r2aHwAWcX9heMdBE3zELY65DE7GRftppNp6KYOnWB+Wisb/jZ1IF8N85vhC0cC8 6Pn1X1mAZEDSeitFCx1DZdxObuqBIhT8CXYsSsdM54/sPTyLfFjtwGyz4swC9rLPdi4h rFmLqgXRoN4bCFdOCNYwIjEI+Gr+UKc/X70en2TqIz5jgHPEMks42gXxWS4doii5Uqlo qonQ== X-Gm-Message-State: AOAM530yTCKmHHIngLYb7lGbHoFXBbPwqwB/jGA3zrqZSXs7oBG4X9tP VlB6cFS6RBobIVOBZPsGO+HluQ== X-Received: by 2002:a05:6a00:1946:b0:492:64f1:61b5 with SMTP id s6-20020a056a00194600b0049264f161b5mr10239921pfk.52.1636481832009; Tue, 09 Nov 2021 10:17:12 -0800 (PST) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id gv23sm3281540pjb.17.2021.11.09.10.17.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Nov 2021 10:17:11 -0800 (PST) Date: Tue, 9 Nov 2021 18:17:08 +0000 From: Joe Burton To: Hou Tao Cc: Joe Burton , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Petar Penkov , Stanislav Fomichev Subject: Re: [RFC PATCH v3 2/3] bpf: Add selftests Message-ID: References: <20211102021432.2807760-1-jevburton.kernel@gmail.com> <20211102021432.2807760-3-jevburton.kernel@gmail.com> <98178f0f-ff43-b996-f78b-778f74b44a6b@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <98178f0f-ff43-b996-f78b-778f74b44a6b@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thu, Nov 04, 2021 at 02:32:37PM +0800, Hou Tao wrote: > In fentry__x64_sys_write(), you just do trigger updates to maps, so for the > portability of the test > (e.g. run-able for arm64) Agreed that the test should be runnable on arm64. I haven't tested there yet but I'll do that before sending out v4. > and minimal dependency (e.g. don't depends on /tmp), > why do you > using nanosleep() and replacing fentry_x64_sys_write by > tp/syscalls/sys_enter_nanosleep instead. As written, the example actually modifies the return of write(), so I don't think I can switch to tp/syscalls/* without significantly reworking the example. To minimize the amount of reworking while improving compatibility, how does this sound: 1. Add #ifdefs to support arm64 2. Instead of opening /tmp/map_trace_test_file, open /dev/null Of course this isn't as portable as your proposal but I think it might be an acceptable compromise. Best, Joe