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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 21 Dec 2017 07:05:43 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Selvin Xavier <selvin.xavier@...adcom.com>
Cc:     Anton Vasilyev <vasilyev@...ras.ru>,
        Devesh Sharma <devesh.sharma@...adcom.com>,
        Doug Ledford <dledford@...hat.com>,
        Sean Hefty <sean.hefty@...el.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        Michael Mera <dev@...haelmera.com>, linux-rdma@...r.kernel.org,
        linux-kernel <linux-kernel@...r.kernel.org>,
        ldv-project@...uxtesting.org
Subject: Re: [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS

On Tue, Dec 19, 2017 at 11:14:03PM +0530, Selvin Xavier wrote:
> On Tue, Dec 19, 2017 at 6:00 PM, Leon Romanovsky <leon@...nel.org> wrote:
> >> status = ocrdma_nonemb_mbx_cmd(dev, mqe, dev->stats_mem.va);
> >
> > It still doesn't make a lot of sense to me:
> >
> > ocrdma_mbx_rdma_stats():
> > 1315        if (reset)
> > 1316                 req->reset_stats = reset;
> > 1317
> > 1318         status = ocrdma_nonemb_mbx_cmd(dev, mqe, dev->stats_mem.va);
> >
> >
> > 1117 static int ocrdma_nonemb_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe,
> > 1118                                  void *payload_va)
> > 1119 {
> > 1120         int status;
> > 1121         struct ocrdma_mbx_rsp *rsp = payload_va;
> > 1122
> > 1123         if ((mqe->hdr.spcl_sge_cnt_emb & OCRDMA_MQE_HDR_EMB_MASK)
> > 1124                                 OCRDMA_MQE_HDR_EMB_SHIFT)
> > 1125                 BUG();
> > 1126
> > 1127         status = ocrdma_mbx_cmd(dev, mqe);
> >
> > You are not using rsp and/or payload_va to provide data to ocrdma_mbx_cmd.
> >
> > How are you passing reset_stats information to FW?
> >
> This is a command where the response size is more than  236 bytes. So this is
> sent as a non-embedded command where the req/resp will be available in
> payload_va
> and phys address of payload_va (payload_pa) will be send down to
> firmware as MQE. FW will dma the mailbox
> from the payload_pa and response is transferred back.
>
> req->reset_stats = reset; is actually setting the corresponding bit in
> the request structure @payload_va.
> FW receives reset_stats once the request is DMA-ed from payload_pa.

Thanks

>
> > Thanks
> >
>
> Thanks,
> Selvin

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists