1. 29 2月, 2012 2 次提交
    • O
      rpmsg: validate incoming message length before propagating · 9648224e
      Ohad Ben-Cohen 提交于
      When an inbound message arrives, validate its reported length before
      propagating it, otherwise buggy (or malicious) remote processors might
      trick us into accessing memory which we really shouldn't.
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Mark Grosen <mgrosen@ti.com>
      Cc: Suman Anna <s-anna@ti.com>
      Cc: Fernando Guzman Lugo <fernando.lugo@ti.com>
      Cc: Rob Clark <rob@ti.com>
      Cc: Ludovic BARRE <ludovic.barre@stericsson.com>
      Cc: Loic PALLARDY <loic.pallardy@stericsson.com>
      Cc: Omar Ramirez Luna <omar.luna@linaro.org>
      9648224e
    • O
      rpmsg: fix name service endpoint leak · fa2d7795
      Ohad Ben-Cohen 提交于
      The name service endpoint wasn't destroyed, so fix it.
      
      This is achieved by introducing an internal __rpmsg_destroy_ept
      function which doesn't assume the given ept is bound to an rpmsg
      channel (much like the existing __rpmsg_create_ept).
      
      This is needed because the name service ept belongs to the rpmsg bus,
      and is never bound with a specific rpdev.
      Reported-by: NOmar Ramirez Luna <omar.ramirez@ti.com>
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Mark Grosen <mgrosen@ti.com>
      Cc: Suman Anna <s-anna@ti.com>
      Cc: Fernando Guzman Lugo <fernando.lugo@ti.com>
      Cc: Rob Clark <rob@ti.com>
      Cc: Ludovic BARRE <ludovic.barre@stericsson.com>
      Cc: Loic PALLARDY <loic.pallardy@stericsson.com>
      Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
      fa2d7795
  2. 23 2月, 2012 1 次提交
    • A
      rpmsg: rename virtqueue_add_buf_gfp to virtqueue_add_buf · b719587e
      Axel Lin 提交于
      Since commit 7bb7aef2 "virtio: rename virtqueue_add_buf_gfp to virtqueue_add_buf",
      virtqueue_add_buf_gfp is already rename to virtqueue_add_buf now.
      
      This patch fixes below build error:
       CC [M]  drivers/rpmsg/virtio_rpmsg_bus.o
      drivers/rpmsg/virtio_rpmsg_bus.c: In function 'rpmsg_send_offchannel_raw':
      drivers/rpmsg/virtio_rpmsg_bus.c:723: error: implicit declaration of function 'virtqueue_add_buf_gfp'
      make[2]: *** [drivers/rpmsg/virtio_rpmsg_bus.o] Error 1
      make[1]: *** [drivers/rpmsg] Error 2
      make: *** [drivers] Error 2
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      b719587e
  3. 09 2月, 2012 1 次提交
    • O
      rpmsg: add virtio-based remote processor messaging bus · bcabbcca
      Ohad Ben-Cohen 提交于
      Add a virtio-based inter-processor communication bus, which enables
      kernel drivers to communicate with entities, running on remote
      processors, over shared memory using a simple messaging protocol.
      
      Every pair of AMP processors share two vrings, which are used to send
      and receive the messages over shared memory.
      
      The header of every message sent on the rpmsg bus contains src and dst
      addresses, which make it possible to multiplex several rpmsg channels on
      the same vring.
      
      Every rpmsg channel is a device on this bus. When a channel is added,
      and an appropriate rpmsg driver is found and probed, it is also assigned
      a local rpmsg address, which is then bound to the driver's callback.
      
      When inbound messages carry the local address of a bound driver,
      its callback is invoked by the bus.
      
      This patch provides a kernel interface only; user space interfaces
      will be later exposed by kernel users of this rpmsg bus.
      
      Designed with Brian Swetland <swetland@google.com>.
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Acked-by: Rusty Russell <rusty@rustcorp.com.au> (virtio_ids.h)
      Cc: Brian Swetland <swetland@google.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Greg KH <greg@kroah.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      bcabbcca