Re: Why no XML in the Kernel?

From: James Bruce (bruce_at_andrew.cmu.edu)
Date: 10/02/05

  • Next message: Zoltan Boszormenyi: "Am1771 wireless driver?"
    Date:	Sun, 02 Oct 2005 07:09:36 -0400
    To: James Courtier-Dutton <James@superbug.co.uk>
    
    

    James Courtier-Dutton wrote:
    > Nick Piggin wrote:
    >> Ahmad Reza Cheraghi wrote:
    >>> Can somebody tell me why the Kernel-Development dont
    >>> wanne have XML is being used in the Kernel??
    >>
    >> Because nobody has come up with a good reason why it
    >> should be. Same as anything that isn't in the kernel.
    >> Nick
    >>
    > I have a requirement to pass information from the kernel to user space.
    > The information is passed fairly rarely, but over time extra parameters
    > are added. At the moment we just use a struct, but that means that the
    > kernel and the userspace app have to both keep in step. If something
    > like XML was used, we could implement new parameters in the kernel, and
    > the user space could just ignore them, until the user space is upgraded.
    > XML would initially seem a good idea for this, but are there any methods
    > currently used in the kernel that could handle these parameter changes
    > over time.

    If you only add parameters, why not use a struct with a length field?
    That can encode version information implicitly; You can assume
    everything beyond the length is not present in that ABI version. If the
    interface is based on read(2), then you don't even need the length field
    in the structure, since everything can be handled by userspace
    specifying the length it wants as the read size parameter, and the
    kernel returning only the bytes for the fields it knows about.
      - Jim Bruce

    > For example, should the sysfs be used for this?
    > Any comments?
    > James
    -
    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/


  • Next message: Zoltan Boszormenyi: "Am1771 wireless driver?"

    Relevant Pages

    • Gcov-kernel patch update for 2.6.0-test3
      ... Here's another resync of the kernel patch (originally by Hubertus Franke ... and Rajan Ravindran) to allow the gcov coverage analysis tool to be used ... * The .ctors-section contains a list of pointers to constructor ... static struct memchunk *freechunks; ...
      (Linux-Kernel)
    • [PATCH 2 of 18] ipath - core driver header files
      ... ipath_debug.h contains mask values used for controlling driver debugging. ... * to communicate between kernel and user code. ... * This struct must have explict pad fields where type sizes ... * We could have a single register get/put routine, that takes a group type, ...
      (Linux-Kernel)
    • Re: [HP ProLiant WatchDog driver] hpwdt HP WatchDog Patch
      ... specific HW Timer located in the HP ProLiant iLO 2 ASIC. ... development kernel. ... `struct SMBIOS_entry_point' would be more typical. ... +hpwdt_ioctl(struct file *file, unsigned int cmd, ...
      (Linux-Kernel)
    • [PATCH] Add seq_file howto to Documentation/
      ... +traversing a list of kernel items and iterating on that list. ... +function only needs to call seq_openwith a pointer to a struct ... +(0 for the first entry). ... +write static headings or variable data into the seq_file output buffer. ...
      (Linux-Kernel)
    • [PATCH 2.4] Wireless Extension v17
      ... * - Wireless Event capability in struct iw_range ... * - Fix kernel data leak to user space in private handler handling ... * This file define a set of standard wireless extensions ... * Each driver is free to use them for whatever purpose it chooses, ...
      (Linux-Kernel)