Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp481514pxx; Wed, 28 Oct 2020 09:18:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiCU3P/l2JH4PZ0KoRsMYAneA5nQeiyl3zw314sQY9Z9sKaNundd9WzZumOXstHgg9lhRJ X-Received: by 2002:a17:906:19d1:: with SMTP id h17mr8736856ejd.184.1603901892864; Wed, 28 Oct 2020 09:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603901892; cv=none; d=google.com; s=arc-20160816; b=ii3Lr3mbJYKXb7gXiQ7GML9c3GQdqW/HuUGWMD5+iNMgp+7QaSbdQ15DjGlyIb2QCR Ntthhc8XOA2BPZCX4RJlvy7t/YFQ3AbPJq11c+06miaiyL+4aZuNVV0DVJQkzH/hmg7Q OGZpCd50PNr6NcnPkIaHPa10/AHkWBUfrm45pU49uDF/IM03BBnrkTGfpQivFDHsZphA Gsko4SP+ywZrVWCXBNOW4SpJtXjccb5fyN9xiTd2Y1dHtzyX0QvKZRjLp8XJL7tCq82O 1y2xtYXO9/eGr4+WdXH/4JmJUjUpx6W2iHdsm+0X+872Zl2QA7ZCdOLcs02KA6Q5Og6M 4U+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HzzUDsidrUC7RWDOol9n2PVflwyj7TpsFpUs6H5wqJA=; b=jze8CZ2qZoIMOyHBwcRSgM6cYKgDIEjmXJdrVCJGUd5xPIex2tSt9FyD6olap7PJhd ZkgQXBMzOgIisujQw0mWNenZkBk06JGGMizjZJCiHwmLgxPglevgyHUrGS2VCv8/hLlq 6CRWxHLTQiV1juC3qF8Yf2yFGgM5UL+4TMSGTQT8GAlwx+fEGLYBbPPef9V/bQCBUq5v ta5K1h4j6yS0zOTe7oAfyzLZ8cXsi0ihbFL2IfM8HujBsGFTQdT1hoy2PbEQTc8Scfbp wyzbwtzMKQZ6/CSytBcjj2YV9y6xjzkj+1jxUcpPrdb42QoWSvaCgG3qvR/rJodMMPPP 5qJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=arItqxgk; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si2514699edi.432.2020.10.28.09.17.51; Wed, 28 Oct 2020 09:18:12 -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=@chromium.org header.s=google header.b=arItqxgk; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1815613AbgJ0RDa (ORCPT + 99 others); Tue, 27 Oct 2020 13:03:30 -0400 Received: from mail-ej1-f65.google.com ([209.85.218.65]:44172 "EHLO mail-ej1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1815598AbgJ0RD2 (ORCPT ); Tue, 27 Oct 2020 13:03:28 -0400 Received: by mail-ej1-f65.google.com with SMTP id d6so3236027ejb.11 for ; Tue, 27 Oct 2020 10:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HzzUDsidrUC7RWDOol9n2PVflwyj7TpsFpUs6H5wqJA=; b=arItqxgk/9qAZij7+w4t2K4qnzeonxHSGtMsdEcN1VWM0eGu//+/5vezf7J97mobGz QDpjF+dXBZ/heCAzn4xOmjhbPgZATE0zoDG4W2nd7ZH33TSBgC7vp6JqQ9webblx60Nu 17pLacCP6vh253pUL46jRoCXH+k6hhbR9C53E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HzzUDsidrUC7RWDOol9n2PVflwyj7TpsFpUs6H5wqJA=; b=BGnstnrW9b6sNOqDrt3Da/z+SItGE+5FBu42wfH61YtLAXNeE7mOW3n9M5vxAl9KRn 4sBviHJgyepx1B4wvdn2cJW69HeBMAZHrBeOb9Pn0yMgDymFkm4VsQFiCtcQfJ4uBOem TOcTP5N3cJyvTZlvJ5rUrMSZl4DyM+mGFkRgo7KadszmNcRGslnmIeDyiL0OCbotnSUZ /Egp5W3a6r2hVmWPPulxOO31TakQSIjU7wBx5gkQ5H23Tdr1cYqgRA/QeyOKMb1/gjv1 c58WysaOkl+RYYvsaGla8CVyKtyfoKICBOgAcvf0nOMsoGK+xKqM0vkeLh4RvAwoeZMk YC6w== X-Gm-Message-State: AOAM533KYp/47jJrKwgmBBoTyPJvotHIPNkKolQ8uZZB8gqsnqxIAKHO 0mHhg+tyOGzCdbsq92qiiwZkbcZhyquyrIjq X-Received: by 2002:a17:906:c08f:: with SMTP id f15mr3203290ejz.97.1603818205481; Tue, 27 Oct 2020 10:03:25 -0700 (PDT) Received: from kpsingh.zrh.corp.google.com ([81.6.44.51]) by smtp.gmail.com with ESMTPSA id ba6sm1315006edb.61.2020.10.27.10.03.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 10:03:24 -0700 (PDT) From: KP Singh To: linux-kernel@vger.kernel.org, bpf@vger.kernel.org Cc: Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Paul Turner , Jann Horn , Hao Luo Subject: [PATCH bpf-next 4/5] bpf: Update selftests for local_storage to use vmlinux.h Date: Tue, 27 Oct 2020 18:03:16 +0100 Message-Id: <20201027170317.2011119-5-kpsingh@chromium.org> X-Mailer: git-send-email 2.29.0.rc2.309.g374f81d7ae-goog In-Reply-To: <20201027170317.2011119-1-kpsingh@chromium.org> References: <20201027170317.2011119-1-kpsingh@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: KP Singh With the fixing of BTF pruning of embedded types being fixed, the test can be simplified to use vmlinux.h Signed-off-by: KP Singh --- .../selftests/bpf/progs/local_storage.c | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/tools/testing/selftests/bpf/progs/local_storage.c b/tools/testing/selftests/bpf/progs/local_storage.c index a3d034eb768e..5acf9203a69a 100644 --- a/tools/testing/selftests/bpf/progs/local_storage.c +++ b/tools/testing/selftests/bpf/progs/local_storage.c @@ -4,9 +4,8 @@ * Copyright 2020 Google LLC. */ +#include "vmlinux.h" #include -#include -#include #include #include @@ -36,23 +35,6 @@ struct { __type(value, struct dummy_storage); } sk_storage_map SEC(".maps"); -/* TODO Use vmlinux.h once BTF pruning for embedded types is fixed. - */ -struct sock {} __attribute__((preserve_access_index)); -struct sockaddr {} __attribute__((preserve_access_index)); -struct socket { - struct sock *sk; -} __attribute__((preserve_access_index)); - -struct inode {} __attribute__((preserve_access_index)); -struct dentry { - struct inode *d_inode; -} __attribute__((preserve_access_index)); -struct file { - struct inode *f_inode; -} __attribute__((preserve_access_index)); - - SEC("lsm/inode_unlink") int BPF_PROG(unlink_hook, struct inode *dir, struct dentry *victim) { -- 2.29.0.rc2.309.g374f81d7ae-goog