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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85E77EB64DA for ; Thu, 22 Jun 2023 22:00:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230459AbjFVWA5 (ORCPT ); Thu, 22 Jun 2023 18:00:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbjFVWAy (ORCPT ); Thu, 22 Jun 2023 18:00:54 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77B111988; Thu, 22 Jun 2023 15:00:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687471253; x=1719007253; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=fWYQw7YkqZaC3rzHqhX8WgjjZeuhKInvStJbx+K0+hw=; b=Zm41cHNjl7TzJEzDE8UIZI1fFCVQZGbdKnujfOS7XySN5FhX3pxun29O jO2k2IUrR1ALO9T1TzmtRC7lGSnjvzPHMZeWXDMPb2DENUfX8GGjmrDjn j0NWXQbfpoGKfPcv6uWpIhgsp0AVz2vAkgpQwxQyLvYofH0Fuo0o/j7tm UV7HKcJBWUfjh3G2HaXMHrn+01io0CzhtmNRXH539tUztgyh4v/PVrCjC /SH8/GvMCh3wVRvB8s2UNUG/cyRPZ5oSeGcuJ/9nKHFP16pnQleFDuj9D YjjBimDzp55Q2H+tnP81j9aZYj3SlRM5JpVPL8klNO5/9/c2vN0IF4auN A==; X-IronPort-AV: E=McAfee;i="6600,9927,10749"; a="359490220" X-IronPort-AV: E=Sophos;i="6.01,150,1684825200"; d="scan'208";a="359490220" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2023 15:00:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10749"; a="715095781" X-IronPort-AV: E=Sophos;i="6.01,150,1684825200"; d="scan'208";a="715095781" Received: from lkp-server01.sh.intel.com (HELO 783282924a45) ([10.239.97.150]) by orsmga002.jf.intel.com with ESMTP; 22 Jun 2023 15:00:47 -0700 Received: from kbuild by 783282924a45 with local (Exim 4.96) (envelope-from ) id 1qCSMA-0007mp-31; Thu, 22 Jun 2023 22:00:46 +0000 Date: Fri, 23 Jun 2023 06:00:06 +0800 From: kernel test robot To: Sumitra Sharma , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org, linux-kernel@vger.kernel.org Cc: oe-kbuild-all@lists.linux.dev, Ira Weiny , Fabio , Deepak R Varma , Sumitra Sharma Subject: Re: [PATCH v3] lib/test_bpf: Call page_address() on page acquired with GFP_KERNEL flag Message-ID: <202306230559.hU5Aonpl-lkp@intel.com> References: <20230622080729.GA426913@sumitra.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230622080729.GA426913@sumitra.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sumitra, kernel test robot noticed the following build warnings: [auto build test WARNING on bpf-next/master] [also build test WARNING on bpf/master linus/master v6.4-rc7 next-20230622] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Sumitra-Sharma/lib-test_bpf-Call-page_address-on-page-acquired-with-GFP_KERNEL-flag/20230622-160846 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master patch link: https://lore.kernel.org/r/20230622080729.GA426913%40sumitra.com patch subject: [PATCH v3] lib/test_bpf: Call page_address() on page acquired with GFP_KERNEL flag config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230623/202306230559.hU5Aonpl-lkp@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce: (https://download.01.org/0day-ci/archive/20230623/202306230559.hU5Aonpl-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202306230559.hU5Aonpl-lkp@intel.com/ All warnings (new ones prefixed by >>): lib/test_bpf.c: In function 'generate_test_data': >> lib/test_bpf.c:14395:1: warning: label 'err_free_page' defined but not used [-Wunused-label] 14395 | err_free_page: | ^~~~~~~~~~~~~ vim +/err_free_page +14395 lib/test_bpf.c 64a8946b447e41 Alexei Starovoitov 2014-05-08 14358 10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14359 static void *generate_test_data(struct bpf_test *test, int sub) 64a8946b447e41 Alexei Starovoitov 2014-05-08 14360 { bac142acb90e95 Nicolas Schichan 2015-08-04 14361 struct sk_buff *skb; bac142acb90e95 Nicolas Schichan 2015-08-04 14362 struct page *page; bac142acb90e95 Nicolas Schichan 2015-08-04 14363 10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14364 if (test->aux & FLAG_NO_DATA) 10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14365 return NULL; 64a8946b447e41 Alexei Starovoitov 2014-05-08 14366 f516420f683d14 Xu Kuohai 2022-03-21 14367 if (test->aux & FLAG_LARGE_MEM) f516420f683d14 Xu Kuohai 2022-03-21 14368 return kmalloc(test->test[sub].data_size, GFP_KERNEL); f516420f683d14 Xu Kuohai 2022-03-21 14369 10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14370 /* Test case expects an skb, so populate one. Various 10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14371 * subtests generate skbs of different sizes based on 10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14372 * the same data. 10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14373 */ bac142acb90e95 Nicolas Schichan 2015-08-04 14374 skb = populate_skb(test->data, test->test[sub].data_size); bac142acb90e95 Nicolas Schichan 2015-08-04 14375 if (!skb) bac142acb90e95 Nicolas Schichan 2015-08-04 14376 return NULL; bac142acb90e95 Nicolas Schichan 2015-08-04 14377 bac142acb90e95 Nicolas Schichan 2015-08-04 14378 if (test->aux & FLAG_SKB_FRAG) { bac142acb90e95 Nicolas Schichan 2015-08-04 14379 /* bac142acb90e95 Nicolas Schichan 2015-08-04 14380 * when the test requires a fragmented skb, add a bac142acb90e95 Nicolas Schichan 2015-08-04 14381 * single fragment to the skb, filled with bac142acb90e95 Nicolas Schichan 2015-08-04 14382 * test->frag_data. bac142acb90e95 Nicolas Schichan 2015-08-04 14383 */ bac142acb90e95 Nicolas Schichan 2015-08-04 14384 page = alloc_page(GFP_KERNEL); bac142acb90e95 Nicolas Schichan 2015-08-04 14385 bac142acb90e95 Nicolas Schichan 2015-08-04 14386 if (!page) bac142acb90e95 Nicolas Schichan 2015-08-04 14387 goto err_kfree_skb; bac142acb90e95 Nicolas Schichan 2015-08-04 14388 4a8b1daa0ee566 Sumitra Sharma 2023-06-22 14389 memcpy(page_address(page), test->frag_data, MAX_DATA); bac142acb90e95 Nicolas Schichan 2015-08-04 14390 skb_add_rx_frag(skb, 0, page, 0, MAX_DATA, MAX_DATA); bac142acb90e95 Nicolas Schichan 2015-08-04 14391 } bac142acb90e95 Nicolas Schichan 2015-08-04 14392 bac142acb90e95 Nicolas Schichan 2015-08-04 14393 return skb; bac142acb90e95 Nicolas Schichan 2015-08-04 14394 bac142acb90e95 Nicolas Schichan 2015-08-04 @14395 err_free_page: bac142acb90e95 Nicolas Schichan 2015-08-04 14396 __free_page(page); bac142acb90e95 Nicolas Schichan 2015-08-04 14397 err_kfree_skb: bac142acb90e95 Nicolas Schichan 2015-08-04 14398 kfree_skb(skb); bac142acb90e95 Nicolas Schichan 2015-08-04 14399 return NULL; 10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14400 } 10f18e0ba1ea7e Daniel Borkmann 2014-05-23 14401 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki