1. 19 Nov, 2018 1 commit
    • Arnaldo Carvalho de Melo's avatar
      tools uapi asm-generic: Synchronize ioctls.h · 83d9bdea
      Arnaldo Carvalho de Melo authored
      To pick up the changes in:
      
        ad8c0eaa ("tty/serial_core: add ISO7816 infrastructure")
      
      That is a change that imply a change to be made in tools/perf/trace/beauty/ioctl.c to
      make 'perf trace' ioctl syscall argument beautifier to support these new
      commands:  TIOCGISO7816 and TIOCSISO7816.
      
      This is not yet done automatically by a script like is done for some
      other headers, for instance:
      
        $ tools/perf/trace/beauty/drm_ioctl.sh | head
        #ifndef DRM_COMMAND_BASE
        #define DRM_COMMAND_BASE                0x40
        #endif
        static const char *drm_ioctl_cmds[] = {
      	[0x00] = "VERSION",
      	[0x01] = "GET_UNIQUE",
      	[0x02] = "GET_MAGIC",
      	[0x03] = "IRQ_BUSID",
      	[0x04] = "GET_MAP",
      	[0x05] = "GET_CLIENT",
        $
      
      So we will need to change tools/perf/trace/beauty/ioctl.c in a follow up
      patch until we switch to a generator script.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-zin76fe6iykqsilvo6u47f9o@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      83d9bdea
  2. 04 Nov, 2017 1 commit
    • Ingo Molnar's avatar
      tools/headers: Synchronize kernel ABI headers · fb7df12d
      Ingo Molnar authored
      After the SPDX license tags were added a number of tooling headers got out of
      sync with their kernel variants, generating lots of build warnings.
      
      Sync them:
      
       - tools/arch/x86/include/asm/disabled-features.h,
         tools/arch/x86/include/asm/required-features.h,
         tools/include/linux/hash.h:
      
           Remove the SPDX tag where the kernel version does not have it.
      
       - tools/include/asm-generic/bitops/__fls.h,
         tools/include/asm-generic/bitops/arch_hweight.h,
         tools/include/asm-generic/bitops/const_hweight.h,
         tools/include/asm-generic/bitops/fls.h,
         tools/include/asm-generic/bitops/fls64.h,
         tools/include/uapi/asm-generic/ioctls.h,
         tools/include/uapi/asm-generic/mman-common.h,
         tools/include/uapi/sound/asound.h,
         tools/include/uapi/linux/kvm.h,
         tools/include/uapi/linux/perf_event.h,
         tools/include/uapi/linux/sched.h,
         tools/include/uapi/linux/vhost.h,
         tools/include/uapi/sound/asound.h:
      
           Add the SPDX tag of the respective kernel header.
      
       - tools/include/uapi/linux/bpf_common.h,
         tools/include/uapi/linux/fcntl.h,
         tools/include/uapi/linux/hw_breakpoint.h,
         tools/include/uapi/linux/mman.h,
         tools/include/uapi/linux/stat.h,
      
           Change the tag to the kernel header version:
      
             -/* SPDX-License-Identifier: GPL-2.0 */
             +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
      
      Also sync other header details:
      
       - include/uapi/sound/asound.h:
      
           Fix pointless end of line whitespace noise the header grew in this cycle.
      
       - tools/arch/x86/lib/memcpy_64.S:
      
           Sync the code and add tools/include/asm/export.h with dummy wrappers
           to support building the kernel side code in a tooling header environment.
      
       - tools/include/uapi/asm-generic/mman.h,
         tools/include/uapi/linux/bpf.h:
      
           Sync other details that don't impact tooling's use of the ABIs.
      Acked-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: Ingo Molnar's avatarIngo Molnar <mingo@kernel.org>
      fb7df12d
  3. 01 Aug, 2017 1 commit
    • Arnaldo Carvalho de Melo's avatar
      tools include uapi: Grab a copy of asm-generic/ioctls.h · 6375f0ab
      Arnaldo Carvalho de Melo authored
      So that we can build on older systems where otherwise we would end up
      with:
      
          CC       /tmp/build/perf/trace/beauty/ioctl.o
        trace/beauty/ioctl.c: In function 'ioctl__scnprintf_tty_cmd':
        trace/beauty/ioctl.c:25:17: error: 'TIOCGEXCL' undeclared (first use in this function)
        trace/beauty/ioctl.c:25:17: note: each undeclared identifier is reported only once for each function it appears in
        trace/beauty/ioctl.c:25:2: error: array index in initializer not of integer type
        trace/beauty/ioctl.c:25:2: error: (near initialization for 'ioctl_tty_cmd')
      
      This way we can build a tool on an older system and it will still be
      capable of processing perf.data files generated on newer systems.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-8qvkv6txwuzua6d0yvt65wl3@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6375f0ab
  4. 17 Jul, 2017 1 commit
  5. 09 Jun, 2017 1 commit
    • Aleksa Sarai's avatar
      tty: add TIOCGPTPEER ioctl · 54ebbfb1
      Aleksa Sarai authored
      When opening the slave end of a PTY, it is not possible for userspace to
      safely ensure that /dev/pts/$num is actually a slave (in cases where the
      mount namespace in which devpts was mounted is controlled by an
      untrusted process). In addition, there are several unresolvable
      race conditions if userspace were to attempt to detect attacks through
      stat(2) and other similar methods [in addition it is not clear how
      userspace could detect attacks involving FUSE].
      
      Resolve this by providing an interface for userpace to safely open the
      "peer" end of a PTY file descriptor by using the dentry cached by
      devpts. Since it is not possible to have an open master PTY without
      having its slave exposed in /dev/pts this interface is safe. This
      interface currently does not provide a way to get the master pty (since
      it is not clear whether such an interface is safe or even useful).
      
      Cc: Christian Brauner <christian.brauner@ubuntu.com>
      Cc: Valentin Rothberg <vrothberg@suse.com>
      Signed-off-by: default avatarAleksa Sarai <asarai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      54ebbfb1
  6. 25 Oct, 2012 1 commit
  7. 04 Oct, 2012 1 commit
  8. 17 Feb, 2011 1 commit
  9. 17 Dec, 2010 1 commit
  10. 22 Oct, 2010 1 commit
    • Jeff Mahoney's avatar
      ioctl: Use asm-generic/ioctls.h on cris (enables termiox) · 8bc3372d
      Jeff Mahoney authored
      This patch converts cris to use asm-generic/ioctls.h instead of its
      own version.
      
      The differences between the arch-specific version and the generic
      version are as follows:
      
      - CRIS defines two ioctls: TIOCSERSETRS485 and TIOCSERWRRS485,
        kept in arch-specific portion
      - CRIS defines a different value for TIOCSRS485, kept via ifndef in generic
      - The generic version adds support for termiox
      
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8bc3372d
  11. 10 Aug, 2010 2 commits
    • hyc@symas.com's avatar
      tty: Add EXTPROC support for LINEMODE · 26df6d13
      hyc@symas.com authored
      This patch is against the 2.6.34 source.
      
      Paraphrased from the 1989 BSD patch by David Borman @ cray.com:
      
           These are the changes needed for the kernel to support
           LINEMODE in the server.
      
           There is a new bit in the termios local flag word, EXTPROC.
           When this bit is set, several aspects of the terminal driver
           are disabled.  Input line editing, character echo, and mapping
           of signals are all disabled.  This allows the telnetd to turn
           off these functions when in linemode, but still keep track of
           what state the user wants the terminal to be in.
      
           New ioctl:
               TIOCSIG         Generate a signal to processes in the
                               current process group of the pty.
      
           There is a new mode for packet driver, the TIOCPKT_IOCTL bit.
           When packet mode is turned on in the pty, and the EXTPROC bit
           is set, then whenever the state of the pty is changed, the
           next read on the master side of the pty will have the TIOCPKT_IOCTL
           bit set.  This allows the process on the server side of the pty
           to know when the state of the terminal has changed; it can then
           issue the appropriate ioctl to retrieve the new state.
      
      Since the original BSD patches accompanied the source code for telnet
      I've left that reference here, but obviously the feature is useful for
      any remote terminal protocol, including ssh.
      
      The corresponding feature has existed in the BSD tty driver since 1989.
      For historical reference, a good copy of the relevant files can be found
      here:
      
      http://anonsvn.mit.edu/viewvc/krb5/trunk/src/appl/telnet/?pathrev=17741Signed-off-by: default avatarHoward Chu <hyc@symas.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      26df6d13
    • Jeff Dike's avatar
      tty: Remove Hayes ESP ioctls · 39e5322c
      Jeff Dike authored
      Remove Hayes ESP ioctls
      
      The Hayes ESP driver has been removed from the tree:
      commit f53a2ade
      ("tty: esp: remove broken driver")
      so its ioctls aren't needed any more.
      Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
      Acked-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      39e5322c
  12. 11 Jun, 2009 1 commit
    • Arnd Bergmann's avatar
      asm-generic: add generic ABI headers · 6103ec56
      Arnd Bergmann authored
      These header files are typically copied from an existing architecture
      into any new one, slightly modified and then remain untouched until
      the end of time in the name of ABI stability.
      
      To make it easier for future architectures, provide a sane generic
      version here. In cases where multiple architectures already use
      identical code, I used the most common version. In cases like
      stat.h that are more or less broken everywhere, I provide a
      version that is meant to be ideal for new architectures.
      Signed-off-by: default avatarRemis Lima Baima <remis.developer@googlemail.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      6103ec56
  13. 23 Oct, 2008 2 commits
  14. 13 Oct, 2008 2 commits
    • Alan Cox's avatar
      tty: Add termiox · 1d65b4a0
      Alan Cox authored
      We need a way to describe the various additional modes and flow control
      features that random weird hardware shows up and software such as wine
      wants to emulate as Windows supports them.
      
      TCGETX/TCSETX and the termiox ioctl are a SYS5 extension that we might as
      well adopt. This patches adds the structures and the basic ioctl interfaces
      when the TCGETX etc defines are added for an architecture. Drivers wishing
      to use this stuff need to add new methods.
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1d65b4a0
    • Alan Cox's avatar
      tty: Cris has a nice RS485 ioctl so we should steal it · c26c56c0
      Alan Cox authored
      JP Tosoni observed:
      
      "About a RS485 ioctl: could you consider the attached files which are
       already in the Linux kernel (in include/asm-cris).  They define a
       TIOCSERSETRS485 (ioctl.h), and the data structure (rs485.h)
       with allows to specify timings. Sounds just like what we want ?"
      
      and he's right: sort of. Rework the structure to use flag bits and make the
      time delay a fixed sized field so we don't get 32/64bit problems. Add the ioctls
      to x86 so that people know what to add to their platform of choice.
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c26c56c0
  15. 22 Jul, 2008 1 commit
    • Vegard Nossum's avatar
      x86: consolidate header guards · 77ef50a5
      Vegard Nossum authored
      This patch is the result of an automatic script that consolidates the
      format of all the headers in include/asm-x86/.
      
      The format:
      
      1. No leading underscore. Names with leading underscores are reserved.
      2. Pathname components are separated by two underscores. So we can
         distinguish between mm_types.h and mm/types.h.
      3. Everything except letters and numbers are turned into single
         underscores.
      Signed-off-by: default avatarVegard Nossum <vegard.nossum@gmail.com>
      77ef50a5
  16. 17 Apr, 2008 1 commit
  17. 17 Oct, 2007 1 commit
  18. 11 Oct, 2007 1 commit