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] [day] [month] [year] [list]
Message-ID: <20220209213207.6a8c1c2f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Wed, 9 Feb 2022 21:32:07 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Matt Johnston <matt@...econstruct.com.au>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Jeremy Kerr <jk@...econstruct.com.au>,
        linux-i2c@...r.kernel.org, netdev@...r.kernel.org,
        Zev Weiss <zev@...ilderbeest.net>
Subject: Re: [PATCH net-next v4 2/2] mctp i2c: MCTP I2C binding driver

On Wed,  9 Feb 2022 18:31:21 +0800 Matt Johnston wrote:
> Provides MCTP network transport over an I2C bus, as specified in
> DMTF DSP0237. All messages between nodes are sent as SMBus Block Writes.
> 
> Each I2C bus to be used for MCTP is flagged in devicetree by a
> 'mctp-controller' property on the bus node. Each flagged bus gets a
> mctpi2cX net device created based on the bus number. A
> 'mctp-i2c-controller' I2C client needs to be added under the adapter. In
> an I2C mux situation the mctp-i2c-controller node must be attached only
> to the root I2C bus. The I2C client will handle incoming I2C slave block
> write data for subordinate busses as well as its own bus.
> 
> In configurations without devicetree a driver instance can be attached
> to a bus using the I2C slave new_device mechanism.
> 
> The MCTP core will hold/release the MCTP I2C device while responses
> are pending (a 6 second timeout or once a socket is closed, response
> received etc). While held the MCTP I2C driver will lock the I2C bus so
> that the correct I2C mux remains selected while responses are received.
> 
> (Ideally we would just lock the mux to keep the current bus selected for
> the response rather than a full I2C bus lock, but that isn't exposed in
> the I2C mux API)
> 
> Signed-off-by: Matt Johnston <matt@...econstruct.com.au>
> Signed-off-by: Jeremy Kerr <jk@...econstruct.com.au>

drivers/net/mctp/mctp-i2c.c: In function ‘mctp_i2c_xmit’:
drivers/net/mctp/mctp-i2c.c:442:38: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 3 has type ‘int’ [-Wformat=]
  442 |                                      "Bad tx length %zu vs skb %u\n",
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro ‘dev_printk_index_wrap’
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:146:61: note: in expansion of macro ‘dev_fmt’
  146 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                             ^~~~~~~
include/linux/dev_printk.h:208:17: note: in expansion of macro ‘dev_warn’
  208 |                 dev_level(dev, fmt, ##__VA_ARGS__);                     \
      |                 ^~~~~~~~~
include/linux/dev_printk.h:220:9: note: in expansion of macro ‘dev_level_ratelimited’
  220 |         dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~~~~~~
drivers/net/mctp/mctp-i2c.c:441:17: note: in expansion of macro ‘dev_warn_ratelimited’
  441 |                 dev_warn_ratelimited(&midev->adapter->dev,
      |                 ^~~~~~~~~~~~~~~~~~~~
drivers/net/mctp/mctp-i2c.c:442:55: note: format string is defined here
  442 |                                      "Bad tx length %zu vs skb %u\n",
      |                                                     ~~^
      |                                                       |
      |                                                       long unsigned int
      |                                                     %u

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ