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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTimSqwBK_pEGsydCAEvO=S6WVVzDPQ@mail.gmail.com>
Date:	Sat, 18 Jun 2011 19:47:29 +0200
From:	Bart Van Assche <bvanassche@....org>
To:	Bernard Metzler <bmt@...ich.ibm.com>
Cc:	netdev@...r.kernel.org, linux-rdma@...r.kernel.org
Subject: Re: [PATCH 10/14] SIWv2: Transmit path: siw_qp_tx.c

On Thu, Jun 16, 2011 at 2:42 PM, Bernard Metzler <bmt@...ich.ibm.com> wrote:
> ---
>  drivers/infiniband/hw/siw/siw_qp_tx.c | 1332 +++++++++++++++++++++++++++++++++
>  1 files changed, 1332 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/infiniband/hw/siw/siw_qp_tx.c
>
> diff --git a/drivers/infiniband/hw/siw/siw_qp_tx.c b/drivers/infiniband/hw/siw/siw_qp_tx.c
[ ... ]
> +/*
> + * Write out iov referencing hdr, data and trailer of current FPDU.
> + * Update transmit state dependent on write return status
> + */
> +static int siw_tx_hdt(struct siw_iwarp_tx *c_tx, struct socket *s)
> +{
> +       struct siw_wqe          *wqe = c_tx->wqe;
> +       struct siw_sge          *sge = &wqe->wr.sgl.sge[c_tx->sge_idx],
> +                               *first_sge = sge;
> +       struct siw_mr           *mr = NULL;
> +       struct ib_umem_chunk    *chunk = c_tx->umem_chunk;
> +
> +       struct kvec             iov[MAX_ARRAY];
> +       struct page             *page_array[MAX_ARRAY];
> +       struct msghdr           msg = {.msg_flags = MSG_DONTWAIT};
> +
> +       int                     seg = 0, do_crc = c_tx->do_crc, is_kva = 0, rv;
> +       unsigned int            data_len = c_tx->bytes_unsent,
> +                               hdr_len = 0,
> +                               trl_len = 0,
> +                               sge_off = c_tx->sge_off,
> +                               sge_idx = c_tx->sge_idx,
> +                               pg_idx = c_tx->pg_idx;

Have you run the siw source code through sparse ? Sparse reports the
following for the above:

drivers/infiniband/hw/siw/siw_qp_tx.c:694:1: warning: the frame size
of 1120 bytes is larger than 1024 bytes

I assume that you know that one should be careful with stack
allocations in the kernel ?

> +               if (tx_type == RDMAP_RDMA_READ_REQ) {

This is what the compiler says about the above statement:

drivers/infiniband/hw/siw/siw_qp_tx.c:1145:15: warning: comparison
between enum siw_wr_opcode and enum rdma_opcode

So how can that statement be correct ?

Bart.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ