24 Sep, 2016

1 commit


28 Jun, 2016

1 commit

  • The CEC ioctls didn't have compat32 support, so they returned -ENOTTY
    when used in a 32 bit application on a 64 bit kernel.

    Since all the CEC ioctls are 32-bit compatible adding support for this
    API is trivial.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

15 Feb, 2016

1 commit


09 Feb, 2016

1 commit


27 Jan, 2016

1 commit


13 Jan, 2016

2 commits

  • Pull misc vfs updates from Al Viro:
    "All kinds of stuff. That probably should've been 5 or 6 separate
    branches, but by the time I'd realized how large and mixed that bag
    had become it had been too close to -final to play with rebasing.

    Some fs/namei.c cleanups there, memdup_user_nul() introduction and
    switching open-coded instances, burying long-dead code, whack-a-mole
    of various kinds, several new helpers for ->llseek(), assorted
    cleanups and fixes from various people, etc.

    One piece probably deserves special mention - Neil's
    lookup_one_len_unlocked(). Similar to lookup_one_len(), but gets
    called without ->i_mutex and tries to avoid ever taking it. That, of
    course, means that it's not useful for any directory modifications,
    but things like getting inode attributes in nfds readdirplus are fine
    with that. I really should've asked for moratorium on lookup-related
    changes this cycle, but since I hadn't done that early enough... I
    *am* asking for that for the coming cycle, though - I'm going to try
    and get conversion of i_mutex to rwsem with ->lookup() done under lock
    taken shared.

    There will be a patch closer to the end of the window, along the lines
    of the one Linus had posted last May - mechanical conversion of
    ->i_mutex accesses to inode_lock()/inode_unlock()/inode_trylock()/
    inode_is_locked()/inode_lock_nested(). To quote Linus back then:

    -----
    | This is an automated patch using
    |
    | sed 's/mutex_lock(&\(.*\)->i_mutex)/inode_lock(\1)/'
    | sed 's/mutex_unlock(&\(.*\)->i_mutex)/inode_unlock(\1)/'
    | sed 's/mutex_lock_nested(&\(.*\)->i_mutex,[ ]*I_MUTEX_\([A-Z0-9_]*\))/inode_lock_nested(\1, I_MUTEX_\2)/'
    | sed 's/mutex_is_locked(&\(.*\)->i_mutex)/inode_is_locked(\1)/'
    | sed 's/mutex_trylock(&\(.*\)->i_mutex)/inode_trylock(\1)/'
    |
    | with a very few manual fixups
    -----

    I'm going to send that once the ->i_mutex-affecting stuff in -next
    gets mostly merged (or when Linus says he's about to stop taking
    merges)"

    * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits)
    nfsd: don't hold i_mutex over userspace upcalls
    fs:affs:Replace time_t with time64_t
    fs/9p: use fscache mutex rather than spinlock
    proc: add a reschedule point in proc_readfd_common()
    logfs: constify logfs_block_ops structures
    fcntl: allow to set O_DIRECT flag on pipe
    fs: __generic_file_splice_read retry lookup on AOP_TRUNCATED_PAGE
    fs: xattr: Use kvfree()
    [s390] page_to_phys() always returns a multiple of PAGE_SIZE
    nbd: use ->compat_ioctl()
    fs: use block_device name vsprintf helper
    lib/vsprintf: add %*pg format specifier
    fs: use gendisk->disk_name where possible
    poll: plug an unused argument to do_poll
    amdkfd: don't open-code memdup_user()
    cdrom: don't open-code memdup_user()
    rsxx: don't open-code memdup_user()
    mtip32xx: don't open-code memdup_user()
    [um] mconsole: don't open-code memdup_user_nul()
    [um] hostaudio: don't open-code memdup_user()
    ...

    Linus Torvalds
     
  • Pull vfs copy_file_range updates from Al Viro:
    "Several series around copy_file_range/CLONE"

    * 'work.copy_file_range' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    btrfs: use new dedupe data function pointer
    vfs: hoist the btrfs deduplication ioctl to the vfs
    vfs: wire up compat ioctl for CLONE/CLONE_RANGE
    cifs: avoid unused variable and label
    nfsd: implement the NFSv4.2 CLONE operation
    nfsd: Pass filehandle to nfs4_preprocess_stateid_op()
    vfs: pull btrfs clone API to vfs layer
    locks: new locks_mandatory_area calling convention
    vfs: Add vfs_copy_file_range() support for pagecache copies
    btrfs: add .copy_file_range file operation
    x86: add sys_copy_file_range to syscall tables
    vfs: add copy_file_range syscall and vfs helper

    Linus Torvalds
     

09 Jan, 2016

4 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • This replaces all code in fs/compat_ioctl.c that translated
    ioctl arguments into a in-kernel structure, then performed
    do_ioctl under set_fs(KERNEL_DS), with code that allocates
    data on the user stack and can call the VFS ioctl handler
    under USER_DS.

    This is done as a hardening measure because the caller
    does not know what kind of ioctl handler will be invoked,
    only that no corresponding compat_ioctl handler exists and
    what the ioctl command number is. The accidental
    invocation of an unlocked_ioctl handler that unexpectedly
    calls copy_to_user could be a severe security issue.

    Signed-off-by: Jann Horn
    Signed-off-by: Al Viro

    Jann Horn
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • In code in fs/compat_ioctl.c that translates ioctl arguments
    into a in-kernel structure, then performs sys_ioctl, possibly
    under set_fs(KERNEL_DS), this commit changes the sys_ioctl
    calls to do_ioctl calls. do_ioctl is a new function that does
    the same thing as sys_ioctl, but doesn't look up the fd again.

    This change is made to avoid (potential) security issues
    because of ioctl handlers that accept one of the ioctl
    commands I2C_FUNCS, VIDEO_GET_EVENT, MTIOCPOS, MTIOCGET,
    TIOCGSERIAL, TIOCSSERIAL, RTC_IRQP_READ, RTC_EPOCH_READ.
    This can happen for multiple reasons:

    - The ioctl command number could be reused.
    - The ioctl handler might not check the full ioctl
    command. This is e.g. true for drm_ioctl.
    - The ioctl handler is very special, e.g. cuse_file_ioctl

    The real issue is that set_fs(KERNEL_DS) is used here,
    but that's fixed in a separate commit
    "compat_ioctl: don't call do_ioctl under set_fs(KERNEL_DS)".

    This change mitigates potential security issues by
    preventing a race that permits invocation of
    unlocked_ioctl handlers under KERNEL_DS through compat
    code even if a corresponding compat_ioctl handler exists.

    So far, no way has been identified to use this to damage
    kernel memory without having CAP_SYS_ADMIN in the init ns
    (with the capability, doing reads/writes at arbitrary
    kernel addresses should be easy through CUSE's ioctl
    handler with FUSE_IOCTL_UNRESTRICTED set).

    [AV: two missed sys_ioctl() taken care of]

    Signed-off-by: Jann Horn
    Signed-off-by: Al Viro

    Jann Horn
     

01 Jan, 2016

2 commits


24 Oct, 2015

1 commit


10 Jul, 2015

1 commit

  • The FITRIM ioctl has the same arguments on 32-bit and 64-bit
    architectures, so we can add it to the list of compatible ioctls and
    drop it from compat_ioctl method of various filesystems.

    Signed-off-by: Mikulas Patocka
    Cc: Al Viro
    Cc: Ted Ts'o
    Signed-off-by: Linus Torvalds

    Mikulas Patocka
     

04 Apr, 2015

1 commit

  • This is needed if user space wants to know supported bnep features
    by kernel, e.g. if kernel supports sending response to bnep setup
    control message. By now there is no possibility to know supported
    features by kernel in case of bnep. Ioctls allows only to add connection,
    delete connection, get connection list, get connection info. Adding
    connection if it's possible (establishing network device connection) is
    equivalent to starting bnep session. Bnep session handles data queue of
    transmit, receive messages over bnep channel. It means that if we add
    connection the received/transmitted data will be parsed immediately. In
    case of get bnep features we want to know before session start, if we
    should leave setup data on socket queue and let kernel to handle with it,
    or in case of no setup handling support, if we should pull this message
    and handle setup response within user space.

    Signed-off-by: Grzegorz Kolodziejczyk
    Signed-off-by: Marcel Holtmann

    Grzegorz Kolodziejczyk
     

11 Jul, 2014

1 commit

  • All the HCI sockets and ioctl based definitions have been in a global
    header file that also includes all the HCI protocol structures. To
    make this a bit cleaner, move them into its own file.

    This also adjusts fs/compat_ioctl.c to only include this new file
    and not all the protocol structures that are not needed.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     

06 Mar, 2014

1 commit

  • Some fs compat system calls have unsigned long parameters instead of
    compat_ulong_t.
    In order to allow the COMPAT_SYSCALL_DEFINE macro generate code that
    performs proper zero and sign extension convert all 64 bit parameters
    their corresponding 32 bit counterparts.

    compat_sys_io_getevents() is a bit different: the non-compat version
    has signed parameters for the "min_nr" and "nr" parameters while the
    compat version has unsigned parameters.
    So change this as well. For all practical purposes this shouldn't make
    any difference (doesn't fix a real bug).
    Also introduce a generic compat_aio_context_t type which can be used
    everywhere.
    The access_ok() check within compat_sys_io_getevents() got also removed
    since the non-compat sys_io_getevents() should be able to handle
    everything anyway.

    Signed-off-by: Heiko Carstens

    Heiko Carstens
     

22 Jan, 2014

1 commit


25 Oct, 2013

1 commit


29 Jun, 2013

1 commit


05 May, 2013

1 commit


23 Feb, 2013

1 commit


30 Oct, 2012

1 commit


26 Oct, 2012

2 commits

  • The compat ioctl for VIDEO_SET_SPU_PALETTE was missing an error check
    while converting ioctl arguments. This could lead to leaking kernel
    stack contents into userspace.

    Patch extracted from existing fix in grsecurity.

    Signed-off-by: Kees Cook
    Cc: David Miller
    Cc: Brad Spengler
    Cc: PaX Team
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • This patch defines new ioctl codes TIOCGPKT, TIOCGPTLCK,
    TIOCGEXCL for fetching pty's packet mode and locking state,
    and exclusive mode of tty.

    [ No real handlers for the codes though, this will be
    addressed in another patch for easier review and
    bisectability ]

    Signed-off-by: Cyrill Gorcunov
    CC: Alan Cox
    CC: "H. Peter Anvin"
    CC: Pavel Emelyanov
    CC: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Cyrill Gorcunov
     

03 Oct, 2012

2 commits

  • Pull vfs update from Al Viro:

    - big one - consolidation of descriptor-related logics; almost all of
    that is moved to fs/file.c

    (BTW, I'm seriously tempted to rename the result to fd.c. As it is,
    we have a situation when file_table.c is about handling of struct
    file and file.c is about handling of descriptor tables; the reasons
    are historical - file_table.c used to be about a static array of
    struct file we used to have way back).

    A lot of stray ends got cleaned up and converted to saner primitives,
    disgusting mess in android/binder.c is still disgusting, but at least
    doesn't poke so much in descriptor table guts anymore. A bunch of
    relatively minor races got fixed in process, plus an ext4 struct file
    leak.

    - related thing - fget_light() partially unuglified; see fdget() in
    there (and yes, it generates the code as good as we used to have).

    - also related - bits of Cyrill's procfs stuff that got entangled into
    that work; _not_ all of it, just the initial move to fs/proc/fd.c and
    switch of fdinfo to seq_file.

    - Alex's fs/coredump.c spiltoff - the same story, had been easier to
    take that commit than mess with conflicts. The rest is a separate
    pile, this was just a mechanical code movement.

    - a few misc patches all over the place. Not all for this cycle,
    there'll be more (and quite a few currently sit in akpm's tree)."

    Fix up trivial conflicts in the android binder driver, and some fairly
    simple conflicts due to two different changes to the sock_alloc_file()
    interface ("take descriptor handling from sock_alloc_file() to callers"
    vs "net: Providing protocol type via system.sockprotoname xattr of
    /proc/PID/fd entries" adding a dentry name to the socket)

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (72 commits)
    MAX_LFS_FILESIZE should be a loff_t
    compat: fs: Generic compat_sys_sendfile implementation
    fs: push rcu_barrier() from deactivate_locked_super() to filesystems
    btrfs: reada_extent doesn't need kref for refcount
    coredump: move core dump functionality into its own file
    coredump: prevent double-free on an error path in core dumper
    usb/gadget: fix misannotations
    fcntl: fix misannotations
    ceph: don't abuse d_delete() on failure exits
    hypfs: ->d_parent is never NULL or negative
    vfs: delete surplus inode NULL check
    switch simple cases of fget_light to fdget
    new helpers: fdget()/fdput()
    switch o2hb_region_dev_write() to fget_light()
    proc_map_files_readdir(): don't bother with grabbing files
    make get_file() return its argument
    vhost_set_vring(): turn pollstart/pollstop into bool
    switch prctl_set_mm_exe_file() to fget_light()
    switch xfs_find_handle() to fget_light()
    switch xfs_swapext() to fget_light()
    ...

    Linus Torvalds
     
  • Pull input updates from Dmitry Torokhov:
    "A few drivers were updated with device tree bindings and others got a
    few small cleanups and fixes."

    Fix trivial conflict in drivers/input/keyboard/omap-keypad.c due to
    changes clashing with a whitespace cleanup.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (28 commits)
    Input: wacom - mark Intuos5 pad as in-prox when touching buttons
    Input: synaptics - adjust threshold for treating position values as negative
    Input: hgpk - use %*ph to dump small buffer
    Input: gpio_keys_polled - fix dt pdata->nbuttons
    Input: Add KD[GS]KBDIACRUC ioctls to the compatible list
    Input: omap-keypad - fixed formatting
    Input: tegra - move platform data header
    Input: wacom - add support for EMR on Cintiq 24HD touch
    Input: s3c2410_ts - make s3c_ts_pmops const
    Input: samsung-keypad - use of_get_child_count() helper
    Input: samsung-keypad - use of_match_ptr()
    Input: uinput - fix formatting
    Input: uinput - specify exact bit sizes on userspace APIs
    Input: uinput - mark failed submission requests as free
    Input: uinput - fix race that can block nonblocking read
    Input: uinput - return -EINVAL when read buffer size is too small
    Input: uinput - take event lock when fetching events from buffer
    Input: get rid of MATCH_BIT() macro
    Input: rotary-encoder - add DT bindings
    Input: rotary-encoder - constify platform data pointers
    ...

    Linus Torvalds
     

27 Sep, 2012

1 commit


26 Sep, 2012

1 commit

  • Wrap the use of TIOCSRS485 and TIOCGRS485 in #ifdef so that we avoid
    adding undefined IOCTLs to the ioctl pointer list as compatible
    ioctls.

    This change was motivated by a build error on a MIPS build.

    tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
    tty-next
    head: ac57e7f38ea6fe7358cd0b7a2f2d21aef5ab70cd
    commit: 84c3b84860440a9e3a3666c14112f41311b8f623 [10/16] compat_ioctl:
    Add RS-485 IOCTLs to the list
    config: mips-fuloong2e_defconfig

    All related error/warning messages:

    fs/compat_ioctl.c:869:1: error: 'TIOCSRS485' undeclared here (not in a
    function)
    fs/compat_ioctl.c:870:1: error: 'TIOCGRS485' undeclared here (not in a
    function)

    vim +869 fs/compat_ioctl.c
    863 COMPATIBLE_IOCTL(TIOCSPGRP)
    864 COMPATIBLE_IOCTL(TIOCGPGRP)
    865 COMPATIBLE_IOCTL(TIOCGPTN)
    866 COMPATIBLE_IOCTL(TIOCSPTLCK)
    867 COMPATIBLE_IOCTL(TIOCSERGETLSR)
    868 COMPATIBLE_IOCTL(TIOCSIG)
    > 869 COMPATIBLE_IOCTL(TIOCSRS485)
    870 COMPATIBLE_IOCTL(TIOCGRS485)
    871 #ifdef TCGETS2
    872 COMPATIBLE_IOCTL(TCGETS2)

    Reported-by: Fengguang Wu
    Reported-by: Stephen Rothwell
    Signed-off-by: Jaeden Amero
    Signed-off-by: Greg Kroah-Hartman

    Jaeden Amero
     

22 Sep, 2012

1 commit

  • The RS-485 TIOCSRS485 and TIOCGRS485 ioctls are 32-bit compatible, so
    in order to call them on 64-bit systems from 32-bit user mode, we add
    them to the ioctl pointer list as compatible ioctls.

    Signed-off-by: Jaeden Amero
    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Jaeden Amero
     

05 Sep, 2012

1 commit

  • Allow handling of Unicode compose sequences by 32-bit apps on a 64-bit
    system. The issue has been reported in
    and .

    A formal check of the two affected ioctls in drivers/char/vt_ioctl.c
    (introduced in 04c71976) and a test using x86 kbd 1.15.1 on a so patched
    x86_64 kernel both confirm that KD[GS]KBDIACRUC are ioctl32()
    compatible.

    Signed-off-by: Michael Schutte
    Signed-off-by: Dmitry Torokhov

    Michael Schutte
     

25 Mar, 2012

1 commit

  • Pull cleanup of fs/ and lib/ users of module.h from Paul Gortmaker:
    "Fix up files in fs/ and lib/ dirs to only use module.h if they really
    need it.

    These are trivial in scope vs the work done previously. We now have
    things where any few remaining cleanups can be farmed out to arch or
    subsystem maintainers, and I have done so when possible. What is
    remaining here represents the bits that don't clearly lie within a
    single arch/subsystem boundary, like the fs dir and the lib dir.

    Some duplicate includes arising from overlapping fixes from
    independent subsystem maintainer submissions are also quashed."

    Fix up trivial conflicts due to clashes with other include file cleanups
    (including some due to the previous bug.h cleanup pull).

    * tag 'module-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
    lib: reduce the use of module.h wherever possible
    fs: reduce the use of module.h wherever possible
    includecheck: delete any duplicate instances of module.h

    Linus Torvalds
     

05 Mar, 2012

1 commit

  • Since all that include/linux/if_ppp.h does is #include ,
    this replaces the occurrences of #include with
    #include .

    It also corrects an error in Documentation/networking/l2tp.txt, where
    it referenced include/linux/if_ppp.h as the source of some definitions
    that are actually now defined in include/linux/if_pppol2tp.h.

    Signed-off-by: Paul Mackerras
    Signed-off-by: David S. Miller

    Paul Mackerras
     

29 Feb, 2012

1 commit


16 Jan, 2012

1 commit

  • * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (655 commits)
    [media] revert patch: HDIC HD29L2 DMB-TH USB2.0 reference design driver
    mb86a20s: Add a few more register settings at the init seq
    mb86a20s: Group registers into the same line
    [media] [PATCH] don't reset the delivery system on DTV_CLEAR
    [media] [BUG] it913x-fe fix typo error making SNR levels unstable
    [media] cx23885: Query the CX25840 during enum_input for status
    [media] cx25840: Add support for g_input_status
    [media] rc-videomate-m1f.c Rename to match remote controler name
    [media] drivers: media: au0828: Fix dependency for VIDEO_AU0828
    [media] convert drivers/media/* to use module_platform_driver()
    [media] drivers: video: cx231xx: Fix dependency for VIDEO_CX231XX_DVB
    [media] Exynos4 JPEG codec v4l2 driver
    [media] doc: v4l: selection: choose pixels as units for selection rectangles
    [media] v4l: s5p-tv: mixer: fix setup of VP scaling
    [media] v4l: s5p-tv: mixer: add support for selection API
    [media] v4l: emulate old crop API using extended crop/compose API
    [media] doc: v4l: add documentation for selection API
    [media] doc: v4l: add binary images for selection API
    [media] v4l: add support for selection api
    [media] hd29l2: fix review findings
    ...

    Linus Torvalds
     

06 Jan, 2012

1 commit

  • We're doing some odd things there, which already messes up various users
    (see the net/socket.c code that this removes), and it was going to add
    yet more crud to the block layer because of the incorrect error code
    translation.

    ENOIOCTLCMD is not an error return that should be returned to user mode
    from the "ioctl()" system call, but it should *not* be translated as
    EINVAL ("Invalid argument"). It should be translated as ENOTTY
    ("Inappropriate ioctl for device").

    That EINVAL confusion has apparently so permeated some code that the
    block layer actually checks for it, which is sad. We continue to do so
    for now, but add a big comment about how wrong that is, and we should
    remove it entirely eventually. In the meantime, this tries to keep the
    changes localized to just the EINVAL -> ENOTTY fix, and removing code
    that makes it harder to do the right thing.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

01 Jan, 2012

1 commit

  • Only the ioctl core should see the DVBv3 compat stuff, as its
    contents are not available anymore to the drivers.

    As fs/compat_ioctl also handles DVBv3 ioctl's, it needs those
    definitions:

    fs/compat_ioctl.c:1345: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1345: error: array type has incomplete element type
    fs/compat_ioctl.c:1345: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1345: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1345: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1345: error: array type has incomplete element type
    fs/compat_ioctl.c:1345: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1345: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1345: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1345: error: array type has incomplete element type
    fs/compat_ioctl.c:1345: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1345: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1345: error: initializer element is not constant
    fs/compat_ioctl.c:1345: error: (near initialization for ‘ioctl_pointer[462]’)
    fs/compat_ioctl.c:1346: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1346: error: array type has incomplete element type
    fs/compat_ioctl.c:1346: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1346: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1346: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1346: error: array type has incomplete element type
    fs/compat_ioctl.c:1346: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1346: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1346: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1346: error: array type has incomplete element type
    fs/compat_ioctl.c:1346: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1346: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’
    fs/compat_ioctl.c:1346: error: initializer element is not constant
    fs/compat_ioctl.c:1346: error: (near initialization for ‘ioctl_pointer[463]’)
    fs/compat_ioctl.c:1347: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_event’
    fs/compat_ioctl.c:1347: error: array type has incomplete element type
    fs/compat_ioctl.c:1347: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_event’
    fs/compat_ioctl.c:1347: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_event’
    fs/compat_ioctl.c:1347: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_event’
    fs/compat_ioctl.c:1347: error: array type has incomplete element type
    fs/compat_ioctl.c:1347: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_event’
    fs/compat_ioctl.c:1347: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_event’
    fs/compat_ioctl.c:1347: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_event’
    fs/compat_ioctl.c:1347: error: array type has incomplete element type
    fs/compat_ioctl.c:1347: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_event’
    fs/compat_ioctl.c:1347: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_event’
    fs/compat_ioctl.c:1347: error: initializer element is not constant
    fs/compat_ioctl.c:1347: error: (near initialization for ‘ioctl_pointer[464]’)

    Reported-by: Michael Krufky
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

08 Aug, 2011

1 commit

  • fixes following error seen on x86_64 kernel:
    ioctl32(openl2tpd:7480): Unknown cmd fd(14) cmd(80487436){t:'t';sz:72} arg(ffa7e6c0) on socket:[105094]

    The argument (struct pppol2tp_ioc_stats) uses "aligned_u64" and thus doesn't need
    fixups.

    Cc: James Chapman
    Cc: Alexander Viro
    Cc: linux-fsdevel@vger.kernel.org
    Signed-off-by: Florian Westphal
    Signed-off-by: David S. Miller

    Florian Westphal
     

02 Jul, 2011

1 commit

  • On Linux x86_64 host with 32bit userspace, running
    qemu or even just "qemu-img create -f qcow2 some.img 1G"
    causes a kernel warning:

    ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(00005326){t:'S';sz:0} arg(7fffffff) on some.img
    ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(801c0204){t:02;sz:28} arg(fff77350) on some.img

    ioctl 00005326 is CDROM_DRIVE_STATUS,
    ioctl 801c0204 is FDGETPRM.

    The warning appears because the Linux compat-ioctl handler for these
    ioctls only applies to block devices, while qemu also uses the ioctls on
    plain files.

    Signed-off-by: Johannes Stezenbach
    Acked-by: Arnd Bergmann
    Signed-off-by: Jens Axboe

    Johannes Stezenbach