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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A6ACC433FE for ; Tue, 9 Nov 2021 18:17:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CD4761105 for ; Tue, 9 Nov 2021 18:17:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242196AbhKISUA (ORCPT ); Tue, 9 Nov 2021 13:20:00 -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-Google-Smtp-Source: ABdhPJzXPKln9Vs5wQ4NRjyaxaIz3t4F1JVcwtodx5Uka/2wN4nWHcbBXb871xxDR6EuplXpiPb8Rg== 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