Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp851335pxb; Thu, 5 Nov 2020 15:00:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPRTvoDkswLlzLm4gxY6nmDjS/QSegbOVWMPisC6stqKgzCn3BZZuXq39x3fRIGkfXHUl4 X-Received: by 2002:a50:f68b:: with SMTP id d11mr4565774edn.64.1604617240054; Thu, 05 Nov 2020 15:00:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604617240; cv=none; d=google.com; s=arc-20160816; b=Znb9pHAUldWkhpShcOKLH3jLHyUgCZYVq7yOL4+/4A40H8Fb4HLNPnWxcbBka2Soic 2T4ymoIrU1KMarf2Imwt3GjfcQyvC71WNbs8NGVXaWBYf+f0CWDJVcS91i03A92+EoE+ lwyOW0q1e9MyjmAmIoqq5kPTQRrvrlVkt5OQUMBjYVPvu/ekRnlqD6v+WLjLVNYDXMpZ nLLfykEgDmrm5PbaiXiHaWi4Sdephcyi3nO/+VT32UOaGHHhSR/P9OFi0Afz73cG+bya 81dLub0vZ2ZCg7govWVMQNb+9asWw7CjI4zwQmQrROrS0vAu3jzC+azj3nwy50X+LRTf VH1g== 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=kutD/q+xVupSFcvYOVJRfZWueeRA7xbNvILSb9eee7Q=; b=nD4/k6ckiYfbbGTKZJjLfqlLveuGPGnGmeMhP1aFqD6jy6EhZeK6o5F9fI0xpa5mvB diyiMo91FKF1SLMCrLp3HjPLX0Jo2+XQpBkskVXyL6HPA0k+Y/QxzaEtQuKqpksp3Jtj HeMGszpEISzoyel/rSFOgYEQL4BV7y0Cmls1KZ0of36ma6ZU/notr/Ucl8xs7MGLfm7V 4jcyejWFs4rn4OYa7UKa+ApiMVNZDgisX39Bdvdih4HJR4jbQrv9uVjoymK5IxRZ9xOD JfCd9pufITNg5GAvLVMEIJfRcQ46amYxS08T9IuvXyYwZfkAnucR0ULQbTiN6yJm3r2N kY2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=O0UaKdb8; 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 bc18si2167420edb.513.2020.11.05.15.00.17; Thu, 05 Nov 2020 15:00:40 -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=@chromium.org header.s=google header.b=O0UaKdb8; 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 S1732585AbgKEW6q (ORCPT + 99 others); Thu, 5 Nov 2020 17:58:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732497AbgKEW6j (ORCPT ); Thu, 5 Nov 2020 17:58:39 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D4ECC040201 for ; Thu, 5 Nov 2020 14:58:38 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id h62so3147859wme.3 for ; Thu, 05 Nov 2020 14:58:38 -0800 (PST) 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=kutD/q+xVupSFcvYOVJRfZWueeRA7xbNvILSb9eee7Q=; b=O0UaKdb831VJd35rDCAIsQGLZIeemuz8R8J+bq3zj8tBa3eJZm83/8SAfpGy3na6r+ 3P7feCGyz5dkFyQ/jqUqZsfAAmv7MVINeujsI3BjzeqjOimKyIuoJ8UFcz3/8PGbq4rZ HGJLSAmIduXqL7YNxniqdhSTb5NeOvhHNkBXU= 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=kutD/q+xVupSFcvYOVJRfZWueeRA7xbNvILSb9eee7Q=; b=UClvY+rdV0HHhUTrxZKLP6ReWhOxJczQEBxCZy9fRmTCMy63o+aBpJIIT/4CDwUYaK NWza9yxFP0m3U5sq6m2FIzcQKfylVTtcGvveiP2rCFg2vqj/dAgypiK0CNu4PKPiYGyg UiLSm6xFN34Njnw+Kve6xqSACrhjd0pS+DFWORRD68CC6Kq0vDrsKaRs7qaAZZG4kKOd S25xRmXc/XtUkBeT9nbGYj/ZQJTUPHwIh9Ekg9fmspXp515qQQRVCjYKjdopDtfKNPvV pN5+MXaCKByPSFEKLcg8auC3k/+zJoLK++n5vR4hhbHG4VH/xuwRZrAq1fzq/rQDVgRW fXvg== X-Gm-Message-State: AOAM53153P/Q2WWFwHVa0Ar0eMmXkNuhHyFXou4M1ro15Qv8/WD92TlV dtXNltZBHBrOhGFg5faFr85uMjecgZIKa/qe X-Received: by 2002:a7b:cb13:: with SMTP id u19mr5118625wmj.89.1604617116690; Thu, 05 Nov 2020 14:58:36 -0800 (PST) Received: from kpsingh.c.googlers.com.com (203.75.199.104.bc.googleusercontent.com. [104.199.75.203]) by smtp.gmail.com with ESMTPSA id f19sm3977366wml.21.2020.11.05.14.58.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 14:58:35 -0800 (PST) From: KP Singh To: linux-kernel@vger.kernel.org, bpf@vger.kernel.org Cc: Song Liu , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Paul Turner , Jann Horn , Hao Luo Subject: [PATCH bpf-next v5 7/9] bpf: Update selftests for local_storage to use vmlinux.h Date: Thu, 5 Nov 2020 22:58:25 +0000 Message-Id: <20201105225827.2619773-8-kpsingh@chromium.org> X-Mailer: git-send-email 2.29.1.341.ge80a0c044ae-goog In-Reply-To: <20201105225827.2619773-1-kpsingh@chromium.org> References: <20201105225827.2619773-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 Acked-by: Song Liu 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 09529e33be98..ef3822bc7542 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.1.341.ge80a0c044ae-goog