CC: [email protected] CC: [email protected] TO: Linus Walleij <[email protected]> CC: Russell King <[email protected]> CC: Ard Biesheuvel <[email protected]> CC: Abbott Liu <[email protected]> CC: Florian Fainelli <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: e9338abf0e186336022293d2e454c106761f262b commit: 421015713b306e47af95d4d61cdfbd96d462e4cb ARM: 9017/2: Enable KASan for ARM date: 9 months ago :::::: branch date: 4 hours ago :::::: commit date: 9 months ago config: arm-randconfig-p001-20210715 (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 10.3.0 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 # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=421015713b306e47af95d4d61cdfbd96d462e4cb git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 421015713b306e47af95d4d61cdfbd96d462e4cb # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> All warnings (new ones prefixed by >>): drivers/gpu/drm/drm_modes.c: In function 'drm_mode_convert_to_umode': >> drivers/gpu/drm/drm_modes.c:1939:2: warning: 'strncpy' output may be >> truncated copying 31 bytes from a string of length 31 [-Wstringop-truncation] 1939 | strncpy(out->name, in->name, DRM_DISPLAY_MODE_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_modes.c: In function 'drm_mode_convert_umode': drivers/gpu/drm/drm_modes.c:1981:2: warning: 'strncpy' output may be truncated copying 31 bytes from a string of length 31 [-Wstringop-truncation] 1981 | strncpy(out->name, in->name, DRM_DISPLAY_MODE_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- drivers/gpu/drm/drm_property.c: In function 'drm_mode_getproperty_ioctl': >> drivers/gpu/drm/drm_property.c:478:2: warning: 'strncpy' output may be >> truncated copying 31 bytes from a string of length 31 [-Wstringop-truncation] 478 | strncpy(out_resp->name, property->name, DRM_PROP_NAME_LEN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/strncpy +1939 drivers/gpu/drm/drm_modes.c 934a8a899a7275e Daniel Stone 2015-05-22 1890 934a8a899a7275e Daniel Stone 2015-05-22 1891 /** 934a8a899a7275e Daniel Stone 2015-05-22 1892 * drm_crtc_convert_to_umode - convert a drm_display_mode into a modeinfo 934a8a899a7275e Daniel Stone 2015-05-22 1893 * @out: drm_mode_modeinfo struct to return to the user 934a8a899a7275e Daniel Stone 2015-05-22 1894 * @in: drm_display_mode to use 934a8a899a7275e Daniel Stone 2015-05-22 1895 * 934a8a899a7275e Daniel Stone 2015-05-22 1896 * Convert a drm_display_mode into a drm_mode_modeinfo structure to return to 934a8a899a7275e Daniel Stone 2015-05-22 1897 * the user. 934a8a899a7275e Daniel Stone 2015-05-22 1898 */ 934a8a899a7275e Daniel Stone 2015-05-22 1899 void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out, 934a8a899a7275e Daniel Stone 2015-05-22 1900 const struct drm_display_mode *in) 934a8a899a7275e Daniel Stone 2015-05-22 1901 { 934a8a899a7275e Daniel Stone 2015-05-22 1902 out->clock = in->clock; 934a8a899a7275e Daniel Stone 2015-05-22 1903 out->hdisplay = in->hdisplay; 934a8a899a7275e Daniel Stone 2015-05-22 1904 out->hsync_start = in->hsync_start; 934a8a899a7275e Daniel Stone 2015-05-22 1905 out->hsync_end = in->hsync_end; 934a8a899a7275e Daniel Stone 2015-05-22 1906 out->htotal = in->htotal; 934a8a899a7275e Daniel Stone 2015-05-22 1907 out->hskew = in->hskew; 934a8a899a7275e Daniel Stone 2015-05-22 1908 out->vdisplay = in->vdisplay; 934a8a899a7275e Daniel Stone 2015-05-22 1909 out->vsync_start = in->vsync_start; 934a8a899a7275e Daniel Stone 2015-05-22 1910 out->vsync_end = in->vsync_end; 934a8a899a7275e Daniel Stone 2015-05-22 1911 out->vtotal = in->vtotal; 934a8a899a7275e Daniel Stone 2015-05-22 1912 out->vscan = in->vscan; 0425662fdf05665 Ville Syrjälä 2020-04-28 1913 out->vrefresh = drm_mode_vrefresh(in); 934a8a899a7275e Daniel Stone 2015-05-22 1914 out->flags = in->flags; 934a8a899a7275e Daniel Stone 2015-05-22 1915 out->type = in->type; 222ec1618c3acec Shashank Sharma 2018-05-08 1916 222ec1618c3acec Shashank Sharma 2018-05-08 1917 switch (in->picture_aspect_ratio) { 222ec1618c3acec Shashank Sharma 2018-05-08 1918 case HDMI_PICTURE_ASPECT_4_3: 222ec1618c3acec Shashank Sharma 2018-05-08 1919 out->flags |= DRM_MODE_FLAG_PIC_AR_4_3; 222ec1618c3acec Shashank Sharma 2018-05-08 1920 break; 222ec1618c3acec Shashank Sharma 2018-05-08 1921 case HDMI_PICTURE_ASPECT_16_9: 222ec1618c3acec Shashank Sharma 2018-05-08 1922 out->flags |= DRM_MODE_FLAG_PIC_AR_16_9; 222ec1618c3acec Shashank Sharma 2018-05-08 1923 break; 900aa8ad21587e9 Shashank Sharma 2018-05-08 1924 case HDMI_PICTURE_ASPECT_64_27: 900aa8ad21587e9 Shashank Sharma 2018-05-08 1925 out->flags |= DRM_MODE_FLAG_PIC_AR_64_27; 900aa8ad21587e9 Shashank Sharma 2018-05-08 1926 break; 900aa8ad21587e9 Shashank Sharma 2018-05-08 1927 case HDMI_PICTURE_ASPECT_256_135: 900aa8ad21587e9 Shashank Sharma 2018-05-08 1928 out->flags |= DRM_MODE_FLAG_PIC_AR_256_135; 900aa8ad21587e9 Shashank Sharma 2018-05-08 1929 break; 222ec1618c3acec Shashank Sharma 2018-05-08 1930 default: 9f396ab4de15240 Ville Syrjälä 2019-06-20 1931 WARN(1, "Invalid aspect ratio (0%x) on mode\n", 9f396ab4de15240 Ville Syrjälä 2019-06-20 1932 in->picture_aspect_ratio); df561f6688fef77 Gustavo A. R. Silva 2020-08-23 1933 fallthrough; 9f396ab4de15240 Ville Syrjälä 2019-06-20 1934 case HDMI_PICTURE_ASPECT_NONE: 222ec1618c3acec Shashank Sharma 2018-05-08 1935 out->flags |= DRM_MODE_FLAG_PIC_AR_NONE; 222ec1618c3acec Shashank Sharma 2018-05-08 1936 break; 222ec1618c3acec Shashank Sharma 2018-05-08 1937 } 222ec1618c3acec Shashank Sharma 2018-05-08 1938 934a8a899a7275e Daniel Stone 2015-05-22 @1939 strncpy(out->name, in->name, DRM_DISPLAY_MODE_LEN); 934a8a899a7275e Daniel Stone 2015-05-22 1940 out->name[DRM_DISPLAY_MODE_LEN-1] = 0; 934a8a899a7275e Daniel Stone 2015-05-22 1941 } 934a8a899a7275e Daniel Stone 2015-05-22 1942 :::::: The code at line 1939 was first introduced by commit :::::: 934a8a899a7275ed187810fe9a15a93397e88c6b drm/mode: Unstatic kernel-userspace mode conversion :::::: TO: Daniel Stone <[email protected]> :::::: CC: Daniel Vetter <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
