[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKwvOdnfHeEZcKYJh_VPoMfB5oDa3aAU0CYVt-6TNc3a6Jtc6w@mail.gmail.com>
Date: Mon, 24 Jul 2023 10:07:38 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Sagi Grimberg <sagi@...mberg.me>
Cc: kernel test robot <lkp@...el.com>,
Varun Prakash <varun@...lsio.com>, llvm@...ts.linux.dev,
oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Christoph Hellwig <hch@....de>
Subject: Re: drivers/nvme/host/tcp.c:835:12: warning: stack frame size (2256)
exceeds limit (2048) in 'nvme_tcp_recv_skb'
On Mon, Jul 24, 2023 at 12:46 AM Sagi Grimberg <sagi@...mberg.me> wrote:
>
>
>
> On 7/20/23 06:10, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: bfa3037d828050896ae52f6467b6ca2489ae6fb1
> > commit: c2700d2886a87f83f31e0a301de1d2350b52c79b nvme-tcp: send H2CData PDUs based on MAXH2CDATA
> > date: 1 year, 5 months ago
> > config: riscv-randconfig-r042-20230720 (https://download.01.org/0day-ci/archive/20230720/202307201141.PYWS6ird-lkp@intel.com/config)
^ it's from a randconfig...the sanitizers tend to blow up stack usage.
> > compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
> > reproduce: (https://download.01.org/0day-ci/archive/20230720/202307201141.PYWS6ird-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 <lkp@...el.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202307201141.PYWS6ird-lkp@intel.com/
> >
> > All warnings (new ones prefixed by >>):
> >
> >>> drivers/nvme/host/tcp.c:835:12: warning: stack frame size (2256) exceeds limit (2048) in 'nvme_tcp_recv_skb' [-Wframe-larger-than]
> > 835 | static int nvme_tcp_recv_skb(read_descriptor_t *desc, struct sk_buff *skb,
> > | ^
> > 1 warning generated.
> >
> >
> > vim +/nvme_tcp_recv_skb +835 drivers/nvme/host/tcp.c
> >
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 834
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 @835 static int nvme_tcp_recv_skb(read_descriptor_t *desc, struct sk_buff *skb,
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 836 unsigned int offset, size_t len)
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 837 {
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 838 struct nvme_tcp_queue *queue = desc->arg.data;
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 839 size_t consumed = len;
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 840 int result;
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 841
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 842 while (len) {
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 843 switch (nvme_tcp_recv_state(queue)) {
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 844 case NVME_TCP_RECV_PDU:
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 845 result = nvme_tcp_recv_pdu(queue, skb, &offset, &len);
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 846 break;
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 847 case NVME_TCP_RECV_DATA:
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 848 result = nvme_tcp_recv_data(queue, skb, &offset, &len);
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 849 break;
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 850 case NVME_TCP_RECV_DDGST:
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 851 result = nvme_tcp_recv_ddgst(queue, skb, &offset, &len);
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 852 break;
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 853 default:
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 854 result = -EFAULT;
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 855 }
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 856 if (result) {
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 857 dev_err(queue->ctrl->ctrl.device,
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 858 "receive failed: %d\n", result);
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 859 queue->rd_enabled = false;
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 860 nvme_tcp_error_recovery(&queue->ctrl->ctrl);
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 861 return result;
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 862 }
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 863 }
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 864
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 865 return consumed;
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 866 }
> > 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 867
> >
> > :::::: The code at line 835 was first introduced by commit
> > :::::: 3f2304f8c6d6ed97849057bd16fee99e434ca796 nvme-tcp: add NVMe over TCP host driver
> >
> > :::::: TO: Sagi Grimberg <sagi@...htbitslabs.com>
> > :::::: CC: Christoph Hellwig <hch@....de>
> >
>
> I don't understand how the stack frame size is that big. Looks like a
> wrong complaint?
>
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists