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]
Date:   Tue, 8 Aug 2017 11:32:56 -0600
From:   Logan Gunthorpe <logang@...tatee.com>
To:     Serge Semin <fancer.lancer@...il.com>, jdmason@...zu.us,
        dave.jiang@...el.com, Allen.Hubbe@....com,
        Shyam-sundar.S-k@....com, Xiangliang.Yu@....com, gary.hook@....com
Cc:     Sergey.Semin@...latforms.ru, linux-ntb@...glegroups.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NTB: Rename NTB messaging API methods



On 08/08/17 04:10 AM, Serge Semin wrote:
> There is a common methods signature form used over all the NTB API
> like functions naming scheme, arguments names and order, etc.
> Recently added NTB messaging API IO callbacks were named a bit
> different so should be renamed to be in compliance with the rest
> of the API.

This could describe the actual change(s) a bit better and
justifications. What is this common method signature and why do we
actually want to make these changes?

> -static inline int ntb_msg_read(struct ntb_dev *ntb, int midx, int *pidx,
> -			       u32 *msg)
> +static inline u32 ntb_msg_read(struct ntb_dev *ntb, int *pidx, int midx)
>  {
>  	if (!ntb->ops->msg_read)
> -		return -EINVAL;
> +		return ~(u32)0;

I don't like this change at all. It makes error handling impossible to
do correctly because the msg returned could easily be zero or -1. The
way you had it originally is much better. Also, dropping the standard
kernel error codes for 0 and -1 don't seem useful.

Logan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ