tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing head: 7a6aa989f2e844a22cfab5c8ff30e77d17dabb2f commit: 7a6aa989f2e844a22cfab5c8ff30e77d17dabb2f [1/1] Merge 6.2-rc5 into tty-next config: hexagon-randconfig-r041-20230122 (https://download.01.org/0day-ci/archive/20230123/202301230337.8Ta23Xqp-lkp@xxxxxxxxx/config) compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 4196ca3278f78c6e19246e54ab0ecb364e37d66a) 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/gregkh/tty.git/commit/?id=7a6aa989f2e844a22cfab5c8ff30e77d17dabb2f git remote add tty https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git git fetch --no-tags tty tty-testing git checkout 7a6aa989f2e844a22cfab5c8ff30e77d17dabb2f # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/tty/serial/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): In file included from drivers/tty/serial/qcom_geni_serial.c:9: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from drivers/tty/serial/qcom_geni_serial.c:9: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from drivers/tty/serial/qcom_geni_serial.c:9: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ >> drivers/tty/serial/qcom_geni_serial.c:1058:12: error: no member named 'rx_fifo' in 'struct qcom_geni_serial_port' if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { ~~~~ ^ drivers/tty/serial/qcom_geni_serial.c:1059:9: error: no member named 'rx_fifo' in 'struct qcom_geni_serial_port' port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, ~~~~ ^ drivers/tty/serial/qcom_geni_serial.c:1059:51: error: no member named 'rx_fifo' in 'struct qcom_geni_serial_port' port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, ~~~~ ^ drivers/tty/serial/qcom_geni_serial.c:1062:14: error: no member named 'rx_fifo' in 'struct qcom_geni_serial_port' if (!port->rx_fifo) ~~~~ ^ 6 warnings and 4 errors generated. vim +1058 drivers/tty/serial/qcom_geni_serial.c c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1045 b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 1046 static int setup_fifos(struct qcom_geni_serial_port *port) c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1047 { c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1048 struct uart_port *uport; b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 1049 u32 old_rx_fifo_depth = port->rx_fifo_depth; c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1050 c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1051 uport = &port->uport; c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1052 port->tx_fifo_depth = geni_se_get_tx_fifo_depth(&port->se); c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1053 port->tx_fifo_width = geni_se_get_tx_fifo_width(&port->se); c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1054 port->rx_fifo_depth = geni_se_get_rx_fifo_depth(&port->se); c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1055 uport->fifosize = c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1056 (port->tx_fifo_depth * port->tx_fifo_width) / BITS_PER_BYTE; b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 1057 b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 @1058 if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 1059 port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 1060 port->rx_fifo_depth * sizeof(u32), b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 1061 GFP_KERNEL); b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 1062 if (!port->rx_fifo) b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 1063 return -ENOMEM; b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 1064 } b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 1065 b8caf69a6946e1 Krzysztof Kozlowski 2022-12-21 1066 return 0; c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1067 } c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1068 :::::: The code at line 1058 was first introduced by commit :::::: b8caf69a6946e18ffebad49847e258f5b6d52ac2 tty: serial: qcom-geni-serial: fix slab-out-of-bounds on RX FIFO buffer :::::: TO: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> :::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests