lkml.org 
[lkml]   [2006]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] IPMI: per-channel command registration
    On Mon, 25 Sep 2006 09:09:41 -0500
    Corey Minyard <minyard@acm.org> wrote:

    >
    > This patch adds the ability to register for a command per-channel in
    > the IPMI driver.
    >
    > If your BMC supports multiple channels, incoming messages can be
    > differentiated by the channel on which they arrived. In this case it's
    > useful to have the ability to register to receive commands on a
    > specific channel instead the current behaviour of all channels.
    >
    > + case IPMICTL_REGISTER_FOR_CMD_CHANS:
    > + {
    > + struct ipmi_cmdspec_chans val;
    > +
    > + if (copy_from_user(&val, arg, sizeof(val))) {

    It becomes part of the ABI.

    > +/*
    > + * Register to get commands from other entities on specific channels.
    > + * This way, you can only listen on specific channels, or have messages
    > + * from some channels go to one place and other channels to someplace
    > + * else. The chans field is a bitmask, (1 << channel) for each channel.
    > + * It may be IPMI_CHAN_ALL for all channels.
    > + */
    > +struct ipmi_cmdspec_chans
    > +{
    > + unsigned char netfn;
    > + unsigned char cmd;
    > + unsigned int chans;
    > +};

    Has it been tested with 32-bit userspace and a 64-bit kernel?

    Even if it has, I'd be a bit worried that it depends upon the user's
    compiler laying this structure out in the same manner as did his
    kernel-provider's compiler.

    Turning this into three u32's sounds safer?
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-09-27 02:39    [W:2.474 / U:0.296 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site