lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202104250240.VCqn9Cnn-lkp@intel.com>
Date:   Sun, 25 Apr 2021 02:24:47 +0800
From:   kernel test robot <lkp@...el.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org,
        Nathan Chancellor <nathan@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>
Subject: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1948:12: warning: stack
 frame size of 2896 bytes in function 'amdgpu_device_ip_early_init'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8db5efb83fa99e81c3f8dee92a6589b251f117f3
commit: 97e4910232fa1f81e806aa60c25a0450276d99a2 linux/compiler-clang.h: define HAVE_BUILTIN_BSWAP*
date:   6 weeks ago
config: powerpc-randconfig-r031-20210424 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8e9d17fd4243faa954ae35a4da94e5e922e458e5)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=97e4910232fa1f81e806aa60c25a0450276d99a2
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 97e4910232fa1f81e806aa60c25a0450276d99a2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:39:
   include/linux/efi.h:1093:34: warning: passing 1-byte aligned argument to 4-byte aligned parameter 2 of 'get_var' may result in an unaligned pointer access [-Walign-mismatch]
           status = get_var(L"SecureBoot", &EFI_GLOBAL_VARIABLE_GUID, NULL, &size,
                                           ^
   include/linux/efi.h:1101:24: warning: passing 1-byte aligned argument to 4-byte aligned parameter 2 of 'get_var' may result in an unaligned pointer access [-Walign-mismatch]
           get_var(L"SetupMode", &EFI_GLOBAL_VARIABLE_GUID, NULL, &size, &setupmode);
                                 ^
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1948:12: warning: stack frame size of 2896 bytes in function 'amdgpu_device_ip_early_init' [-Wframe-larger-than=]
   static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
              ^
   3 warnings generated.
--
>> drivers/gpu/drm/r128/r128_state.c:1203:12: warning: stack frame size of 2128 bytes in function 'r128_cce_clear' [-Wframe-larger-than=]
   static int r128_cce_clear(struct drm_device *dev, void *data, struct drm_file *file_priv)
              ^
   1 warning generated.
--
>> drivers/mtd/ftl.c:862:12: warning: stack frame size of 2624 bytes in function 'ftl_write' [-Wframe-larger-than=]
   static int ftl_write(partition_t *part, caddr_t buffer,
              ^
   1 warning generated.


vim +/amdgpu_device_ip_early_init +1948 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

e2a75f88c3ad4b Alex Deucher   2017-04-27  1937  
e3ecdffac9ccdb Alex Deucher   2018-03-15  1938  /**
e3ecdffac9ccdb Alex Deucher   2018-03-15  1939   * amdgpu_device_ip_early_init - run early init for hardware IPs
e3ecdffac9ccdb Alex Deucher   2018-03-15  1940   *
e3ecdffac9ccdb Alex Deucher   2018-03-15  1941   * @adev: amdgpu_device pointer
e3ecdffac9ccdb Alex Deucher   2018-03-15  1942   *
e3ecdffac9ccdb Alex Deucher   2018-03-15  1943   * Early initialization pass for hardware IPs.  The hardware IPs that make
e3ecdffac9ccdb Alex Deucher   2018-03-15  1944   * up each asic are discovered each IP's early_init callback is run.  This
e3ecdffac9ccdb Alex Deucher   2018-03-15  1945   * is the first stage in initializing the asic.
e3ecdffac9ccdb Alex Deucher   2018-03-15  1946   * Returns 0 on success, negative error code on failure.
e3ecdffac9ccdb Alex Deucher   2018-03-15  1947   */
06ec907054c5a4 Alex Deucher   2017-12-14 @1948  static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
d38ceaf99ed015 Alex Deucher   2015-04-20  1949  {
aaa36a976bbb9b Alex Deucher   2015-04-20  1950  	int i, r;
d38ceaf99ed015 Alex Deucher   2015-04-20  1951  
483ef98588aa9f Alex Deucher   2016-09-30  1952  	amdgpu_device_enable_virtual_display(adev);
a6be7570518f85 Emily Deng     2016-08-08  1953  
00a979f3d69e0c Wenhui Sheng   2020-06-23  1954  	if (amdgpu_sriov_vf(adev)) {
00a979f3d69e0c Wenhui Sheng   2020-06-23  1955  		r = amdgpu_virt_request_full_gpu(adev, true);
aaa36a976bbb9b Alex Deucher   2015-04-20  1956  		if (r)
aaa36a976bbb9b Alex Deucher   2015-04-20  1957  			return r;
00a979f3d69e0c Wenhui Sheng   2020-06-23  1958  	}
00a979f3d69e0c Wenhui Sheng   2020-06-23  1959  
d38ceaf99ed015 Alex Deucher   2015-04-20  1960  	switch (adev->asic_type) {
33f34802686c8b Ken Wang       2016-01-21  1961  #ifdef CONFIG_DRM_AMDGPU_SI
33f34802686c8b Ken Wang       2016-01-21  1962  	case CHIP_VERDE:
33f34802686c8b Ken Wang       2016-01-21  1963  	case CHIP_TAHITI:
33f34802686c8b Ken Wang       2016-01-21  1964  	case CHIP_PITCAIRN:
33f34802686c8b Ken Wang       2016-01-21  1965  	case CHIP_OLAND:
33f34802686c8b Ken Wang       2016-01-21  1966  	case CHIP_HAINAN:
295d0dafd31c9a Ken Wang       2016-05-24  1967  		adev->family = AMDGPU_FAMILY_SI;
33f34802686c8b Ken Wang       2016-01-21  1968  		r = si_set_ip_blocks(adev);
33f34802686c8b Ken Wang       2016-01-21  1969  		if (r)
33f34802686c8b Ken Wang       2016-01-21  1970  			return r;
33f34802686c8b Ken Wang       2016-01-21  1971  		break;
33f34802686c8b Ken Wang       2016-01-21  1972  #endif
a2e73f56fa6282 Alex Deucher   2015-04-20  1973  #ifdef CONFIG_DRM_AMDGPU_CIK
a2e73f56fa6282 Alex Deucher   2015-04-20  1974  	case CHIP_BONAIRE:
a2e73f56fa6282 Alex Deucher   2015-04-20  1975  	case CHIP_HAWAII:
a2e73f56fa6282 Alex Deucher   2015-04-20  1976  	case CHIP_KAVERI:
a2e73f56fa6282 Alex Deucher   2015-04-20  1977  	case CHIP_KABINI:
a2e73f56fa6282 Alex Deucher   2015-04-20  1978  	case CHIP_MULLINS:
e1ad2d53bc438d Alex Deucher   2020-05-18  1979  		if (adev->flags & AMD_IS_APU)
a2e73f56fa6282 Alex Deucher   2015-04-20  1980  			adev->family = AMDGPU_FAMILY_KV;
e1ad2d53bc438d Alex Deucher   2020-05-18  1981  		else
e1ad2d53bc438d Alex Deucher   2020-05-18  1982  			adev->family = AMDGPU_FAMILY_CI;
a2e73f56fa6282 Alex Deucher   2015-04-20  1983  
a2e73f56fa6282 Alex Deucher   2015-04-20  1984  		r = cik_set_ip_blocks(adev);
a2e73f56fa6282 Alex Deucher   2015-04-20  1985  		if (r)
a2e73f56fa6282 Alex Deucher   2015-04-20  1986  			return r;
a2e73f56fa6282 Alex Deucher   2015-04-20  1987  		break;
a2e73f56fa6282 Alex Deucher   2015-04-20  1988  #endif
da87c30b174e7a Alex Deucher   2020-05-18  1989  	case CHIP_TOPAZ:
da87c30b174e7a Alex Deucher   2020-05-18  1990  	case CHIP_TONGA:
da87c30b174e7a Alex Deucher   2020-05-18  1991  	case CHIP_FIJI:
da87c30b174e7a Alex Deucher   2020-05-18  1992  	case CHIP_POLARIS10:
da87c30b174e7a Alex Deucher   2020-05-18  1993  	case CHIP_POLARIS11:
da87c30b174e7a Alex Deucher   2020-05-18  1994  	case CHIP_POLARIS12:
da87c30b174e7a Alex Deucher   2020-05-18  1995  	case CHIP_VEGAM:
da87c30b174e7a Alex Deucher   2020-05-18  1996  	case CHIP_CARRIZO:
da87c30b174e7a Alex Deucher   2020-05-18  1997  	case CHIP_STONEY:
da87c30b174e7a Alex Deucher   2020-05-18  1998  		if (adev->flags & AMD_IS_APU)
da87c30b174e7a Alex Deucher   2020-05-18  1999  			adev->family = AMDGPU_FAMILY_CZ;
da87c30b174e7a Alex Deucher   2020-05-18  2000  		else
da87c30b174e7a Alex Deucher   2020-05-18  2001  			adev->family = AMDGPU_FAMILY_VI;
da87c30b174e7a Alex Deucher   2020-05-18  2002  
da87c30b174e7a Alex Deucher   2020-05-18  2003  		r = vi_set_ip_blocks(adev);
da87c30b174e7a Alex Deucher   2020-05-18  2004  		if (r)
da87c30b174e7a Alex Deucher   2020-05-18  2005  			return r;
da87c30b174e7a Alex Deucher   2020-05-18  2006  		break;
460826e6a061c2 Ken Wang       2017-03-06  2007  	case CHIP_VEGA10:
e48a3cd9cbb707 Alex Deucher   2017-09-01  2008  	case CHIP_VEGA12:
e4bd8170407dc5 Feifei Xu      2018-04-20  2009  	case CHIP_VEGA20:
2ca8a5d2ebd12c Chunming Zhou  2016-12-07  2010  	case CHIP_RAVEN:
61cf44c1dbb66c Le Ma          2018-09-11  2011  	case CHIP_ARCTURUS:
b51a26a02abe92 Huang Rui      2019-07-24  2012  	case CHIP_RENOIR:
70534d1ee89cea Alex Deucher   2020-05-18  2013  		if (adev->flags & AMD_IS_APU)
2ca8a5d2ebd12c Chunming Zhou  2016-12-07  2014  			adev->family = AMDGPU_FAMILY_RV;
2ca8a5d2ebd12c Chunming Zhou  2016-12-07  2015  		else
460826e6a061c2 Ken Wang       2017-03-06  2016  			adev->family = AMDGPU_FAMILY_AI;
460826e6a061c2 Ken Wang       2017-03-06  2017  
460826e6a061c2 Ken Wang       2017-03-06  2018  		r = soc15_set_ip_blocks(adev);
460826e6a061c2 Ken Wang       2017-03-06  2019  		if (r)
460826e6a061c2 Ken Wang       2017-03-06  2020  			return r;
460826e6a061c2 Ken Wang       2017-03-06  2021  		break;
0a5b8c7b9490e9 Huang Rui      2017-07-19  2022  	case  CHIP_NAVI10:
7ecb5cd451b7bc Xiaojie Yuan   2018-12-17  2023  	case  CHIP_NAVI14:
4808cf9c2a8242 Xiaojie Yuan   2019-05-16  2024  	case  CHIP_NAVI12:
11e8aef52ef854 Likun Gao      2019-03-19  2025  	case  CHIP_SIENNA_CICHLID:
41f446bf52f36b Jiansong Chen  2020-02-10  2026  	case  CHIP_NAVY_FLOUNDER:
144722fa3ac32c Tao Zhou       2020-10-02  2027  	case  CHIP_DIMGREY_CAVEFISH:
4e52a9f8d5706b Huang Rui      2020-09-25  2028  	case CHIP_VANGOGH:
4e52a9f8d5706b Huang Rui      2020-09-25  2029  		if (adev->asic_type == CHIP_VANGOGH)
4e52a9f8d5706b Huang Rui      2020-09-25  2030  			adev->family = AMDGPU_FAMILY_VGH;
4e52a9f8d5706b Huang Rui      2020-09-25  2031  		else
0a5b8c7b9490e9 Huang Rui      2017-07-19  2032  			adev->family = AMDGPU_FAMILY_NV;
0a5b8c7b9490e9 Huang Rui      2017-07-19  2033  
0a5b8c7b9490e9 Huang Rui      2017-07-19  2034  		r = nv_set_ip_blocks(adev);
0a5b8c7b9490e9 Huang Rui      2017-07-19  2035  		if (r)
0a5b8c7b9490e9 Huang Rui      2017-07-19  2036  			return r;
0a5b8c7b9490e9 Huang Rui      2017-07-19  2037  		break;
d38ceaf99ed015 Alex Deucher   2015-04-20  2038  	default:
d38ceaf99ed015 Alex Deucher   2015-04-20  2039  		/* FIXME: not supported yet */
d38ceaf99ed015 Alex Deucher   2015-04-20  2040  		return -EINVAL;
d38ceaf99ed015 Alex Deucher   2015-04-20  2041  	}
d38ceaf99ed015 Alex Deucher   2015-04-20  2042  
1884734a03904d pding          2017-11-06  2043  	amdgpu_amdkfd_device_probe(adev);
1884734a03904d pding          2017-11-06  2044  
3b94fb101f4071 Likun Gao      2019-01-31  2045  	adev->pm.pp_feature = amdgpu_pp_feature_mask;
a35ad98bf9d37b Shirish S      2019-09-12  2046  	if (amdgpu_sriov_vf(adev) || sched_policy == KFD_SCHED_POLICY_NO_HWS)
005440066f929b Huang Rui      2019-03-13  2047  		adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
00f54b97d7de97 Huang Rui      2018-02-27  2048  
d38ceaf99ed015 Alex Deucher   2015-04-20  2049  	for (i = 0; i < adev->num_ip_blocks; i++) {
d38ceaf99ed015 Alex Deucher   2015-04-20  2050  		if ((amdgpu_ip_block_mask & (1 << i)) == 0) {
ed8cf00ce4dcdd Huang Rui      2017-05-03  2051  			DRM_ERROR("disabled ip block: %d <%s>\n",
ed8cf00ce4dcdd Huang Rui      2017-05-03  2052  				  i, adev->ip_blocks[i].version->funcs->name);
a1255107212675 Alex Deucher   2016-10-13  2053  			adev->ip_blocks[i].status.valid = false;
d38ceaf99ed015 Alex Deucher   2015-04-20  2054  		} else {
a1255107212675 Alex Deucher   2016-10-13  2055  			if (adev->ip_blocks[i].version->funcs->early_init) {
a1255107212675 Alex Deucher   2016-10-13  2056  				r = adev->ip_blocks[i].version->funcs->early_init((void *)adev);
2c1a2784039442 Alex Deucher   2015-12-07  2057  				if (r == -ENOENT) {
a1255107212675 Alex Deucher   2016-10-13  2058  					adev->ip_blocks[i].status.valid = false;
2c1a2784039442 Alex Deucher   2015-12-07  2059  				} else if (r) {
a1255107212675 Alex Deucher   2016-10-13  2060  					DRM_ERROR("early_init of IP block <%s> failed %d\n",
a1255107212675 Alex Deucher   2016-10-13  2061  						  adev->ip_blocks[i].version->funcs->name, r);
d38ceaf99ed015 Alex Deucher   2015-04-20  2062  					return r;
2c1a2784039442 Alex Deucher   2015-12-07  2063  				} else {
a1255107212675 Alex Deucher   2016-10-13  2064  					adev->ip_blocks[i].status.valid = true;
2c1a2784039442 Alex Deucher   2015-12-07  2065  				}
974e6b641f1428 Alex Deucher   2015-07-10  2066  			} else {
a1255107212675 Alex Deucher   2016-10-13  2067  				adev->ip_blocks[i].status.valid = true;
974e6b641f1428 Alex Deucher   2015-07-10  2068  			}
d38ceaf99ed015 Alex Deucher   2015-04-20  2069  		}
21a249ca02415c Alex Deucher   2019-06-17  2070  		/* get the vbios after the asic_funcs are set up */
21a249ca02415c Alex Deucher   2019-06-17  2071  		if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON) {
6e29c227a49764 Alex Deucher   2020-05-15  2072  			r = amdgpu_device_parse_gpu_info_fw(adev);
6e29c227a49764 Alex Deucher   2020-05-15  2073  			if (r)
6e29c227a49764 Alex Deucher   2020-05-15  2074  				return r;
6e29c227a49764 Alex Deucher   2020-05-15  2075  
21a249ca02415c Alex Deucher   2019-06-17  2076  			/* Read BIOS */
21a249ca02415c Alex Deucher   2019-06-17  2077  			if (!amdgpu_get_bios(adev))
21a249ca02415c Alex Deucher   2019-06-17  2078  				return -EINVAL;
21a249ca02415c Alex Deucher   2019-06-17  2079  
21a249ca02415c Alex Deucher   2019-06-17  2080  			r = amdgpu_atombios_init(adev);
21a249ca02415c Alex Deucher   2019-06-17  2081  			if (r) {
21a249ca02415c Alex Deucher   2019-06-17  2082  				dev_err(adev->dev, "amdgpu_atombios_init failed\n");
21a249ca02415c Alex Deucher   2019-06-17  2083  				amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
21a249ca02415c Alex Deucher   2019-06-17  2084  				return r;
21a249ca02415c Alex Deucher   2019-06-17  2085  			}
21a249ca02415c Alex Deucher   2019-06-17  2086  		}
d38ceaf99ed015 Alex Deucher   2015-04-20  2087  	}
d38ceaf99ed015 Alex Deucher   2015-04-20  2088  
395d1fb948d98e Nicolai Hähnle 2016-06-02  2089  	adev->cg_flags &= amdgpu_cg_mask;
395d1fb948d98e Nicolai Hähnle 2016-06-02  2090  	adev->pg_flags &= amdgpu_pg_mask;
395d1fb948d98e Nicolai Hähnle 2016-06-02  2091  
d38ceaf99ed015 Alex Deucher   2015-04-20  2092  	return 0;
d38ceaf99ed015 Alex Deucher   2015-04-20  2093  }
d38ceaf99ed015 Alex Deucher   2015-04-20  2094  

:::::: The code at line 1948 was first introduced by commit
:::::: 06ec907054c5a48f28ff6856885522e3a7103bb7 drm/amdgpu: use consistent naming for static funcs in amdgpu_device.c

:::::: TO: Alex Deucher <alexander.deucher@....com>
:::::: CC: Alex Deucher <alexander.deucher@....com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (31203 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ