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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2AD8C7AD-DBE2-4F95-9818-16720A5B7AFA@fb.com>
Date:   Tue, 12 Nov 2019 23:19:20 +0000
From:   Vijay Khemka <vijaykhemka@...com>
To:     Asmaa Mnebhi <Asmaa@...lanox.com>,
        "minyard@....org" <minyard@....org>
CC:     Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "openipmi-developer@...ts.sourceforge.net" 
        <openipmi-developer@...ts.sourceforge.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "cminyard@...sta.com" <cminyard@...sta.com>,
        "joel@....id.au" <joel@....id.au>,
        "linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>,
        Sai Dasari <sdasari@...com>
Subject: Re: [PATCH 2/2] drivers: ipmi: Modify max length of IPMB packet



On 11/12/19, 2:06 PM, "Asmaa Mnebhi" <Asmaa@...lanox.com> wrote:

    Also, let me clarify one thing. It doesn't matter how big the response is. In my testing, I also had some responses that are over 128 bytes, and this driver still works. It is the user space program which determines the last bytes received. The 128 bytes is the max number of bytes handled by your i2c/smbus driver at each i2c transaction. My i2c driver can only transmit 128 bytes at a time. So just like Corey pointed out, it would be better to pass this through ACPI/device tree.

In case of smbus transfer it will work but if you are doing direct i2c_block where you don't 
fragment and transfer complete block. I am doing well with my testing. I have sent v2 for 
first patch using ioctl. And verified the same. It works perfectly fine.
    
    -----Original Message-----
    From: Corey Minyard <tcminyard@...il.com> On Behalf Of Corey Minyard
    Sent: Tuesday, November 12, 2019 3:30 PM
    To: Vijay Khemka <vijaykhemka@...com>
    Cc: Arnd Bergmann <arnd@...db.de>; Greg Kroah-Hartman <gregkh@...uxfoundation.org>; openipmi-developer@...ts.sourceforge.net; linux-kernel@...r.kernel.org; cminyard@...sta.com; Asmaa Mnebhi <Asmaa@...lanox.com>; joel@....id.au; linux-aspeed@...ts.ozlabs.org; Sai Dasari <sdasari@...com>
    Subject: Re: [PATCH 2/2] drivers: ipmi: Modify max length of IPMB packet
    
    On Tue, Nov 12, 2019 at 07:56:34PM +0000, Vijay Khemka wrote:
    > 
    > 
    > On 11/12/19, 4:48 AM, "Corey Minyard" <tcminyard@...il.com on behalf of minyard@....org> wrote:
    > 
    >     On Mon, Nov 11, 2019 at 06:36:10PM -0800, Vijay Khemka wrote:
    >     > As per IPMB specification, maximum packet size supported is 255,
    >     > modified Max length to 240 from 128 to accommodate more data.
    >     
    >     I couldn't find this in the IPMB specification.
    >     
    >     IIRC, the maximum on I2C is 32 byts, and table 6-9 in the IPMI spec,
    >     under "IPMB Output" states: The IPMB standard message length is
    >     specified as 32 bytes, maximum, including slave address.
    > 
    > We are using IPMI OEM messages and our response size is around 150 
    > bytes For some of responses. That's why I had set it to 240 bytes.
    
    Hmm.  Well, that is a pretty significant violation of the spec, but there's nothing hard in the protocol that prohibits it, I guess.
    
    If Asmaa is ok with this, I'm ok with it, too.
    
    -corey
    
    >     
    >     I'm not sure where 128 came from, but maybe it should be reduced to 31.
    >     
    >     -corey
    >     
    >     > 
    >     > Signed-off-by: Vijay Khemka <vijaykhemka@...com>
    >     > ---
    >     >  drivers/char/ipmi/ipmb_dev_int.c | 2 +-
    >     >  1 file changed, 1 insertion(+), 1 deletion(-)
    >     > 
    >     > diff --git a/drivers/char/ipmi/ipmb_dev_int.c b/drivers/char/ipmi/ipmb_dev_int.c
    >     > index 2419b9a928b2..7f9198bbce96 100644
    >     > --- a/drivers/char/ipmi/ipmb_dev_int.c
    >     > +++ b/drivers/char/ipmi/ipmb_dev_int.c
    >     > @@ -19,7 +19,7 @@
    >     >  #include <linux/spinlock.h>
    >     >  #include <linux/wait.h>
    >     >  
    >     > -#define MAX_MSG_LEN		128
    >     > +#define MAX_MSG_LEN		240
    >     >  #define IPMB_REQUEST_LEN_MIN	7
    >     >  #define NETFN_RSP_BIT_MASK	0x4
    >     >  #define REQUEST_QUEUE_MAX_LEN	256
    >     > -- 
    >     > 2.17.1
    >     >
    >     
    > 
    

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ