Commit 00ce6c36 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-07-13' into staging



* Some fuzzer related fixes
* Fixes / improvements for the "configure" script
* Doc updates
* Gitlab pipeline-status script

# gpg: Signature made Mon 13 Jul 2020 11:48:32 BST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2020-07-13:
  docs/system/s390x: Improve the 3270 documentation
  GitLab Gating CI: introduce pipeline-status contrib script
  disas/sh4: Add missing fallthrough annotations
  Remove the CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE switch
  docs/devel/fuzzing: Fix bugs in documentation
  tests/qtest/fuzz: Add missing spaces in description
  fuzz: add missing header for rcu_enable_atfork
  configure: do not clobber CFLAGS with --enable-fuzzing
  configure: fix malloc check

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 6c87d9f3 2a84f48c
Loading
Loading
Loading
Loading
+2 −30
Original line number Diff line number Diff line
@@ -5728,31 +5728,6 @@ if compile_prog "" "" ; then
    linux_magic_h=yes
fi

########################################
# check whether we can disable warning option with a pragma (this is needed
# to silence warnings in the headers of some versions of external libraries).
# This test has to be compiled with -Werror as otherwise an unknown pragma is
# only a warning.
#
# If we can't selectively disable warning in the code, disable -Werror so that
# the build doesn't fail anyway.

pragma_disable_unused_but_set=no
cat > $TMPC << EOF
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#pragma GCC diagnostic pop

int main(void) {
    return 0;
}
EOF
if compile_prog "-Werror" "" ; then
    pragma_diagnostic_available=yes
else
    werror=no
fi

########################################
# check if we have valgrind/valgrind.h

@@ -6343,6 +6318,7 @@ int main(void) {
    if (tmp != NULL) {
        return *(int *)(tmp + 2);
    }
    return 1;
}
EOF
  if compile_prog "$CPU_CFLAGS -Werror -fsanitize=undefined" ""; then
@@ -7688,10 +7664,6 @@ if test "$linux_magic_h" = "yes" ; then
  echo "CONFIG_LINUX_MAGIC_H=y" >> $config_host_mak
fi

if test "$pragma_diagnostic_available" = "yes" ; then
  echo "CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE=y" >> $config_host_mak
fi

if test "$valgrind_h" = "yes" ; then
  echo "CONFIG_VALGRIND_H=y" >> $config_host_mak
fi
@@ -7925,7 +7897,7 @@ if test "$fuzzing" = "yes" ; then
  if test "$have_fuzzer" = "yes"; then
    FUZZ_LDFLAGS=" -fsanitize=address,fuzzer"
    FUZZ_CFLAGS=" -fsanitize=address,fuzzer"
    CFLAGS=" -fsanitize=address,fuzzer-no-link"
    CFLAGS="$CFLAGS -fsanitize=address,fuzzer-no-link"
  else
    error_exit "Your compiler doesn't support -fsanitize=address,fuzzer"
    exit 1
+2 −0
Original line number Diff line number Diff line
@@ -1963,6 +1963,7 @@ print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
		  fprintf_fn (stream, "xd%d", rn & ~1);
		  break;
		}
	      /* fallthrough */
	    case D_REG_N:
	      fprintf_fn (stream, "dr%d", rn);
	      break;
@@ -1972,6 +1973,7 @@ print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
		  fprintf_fn (stream, "xd%d", rm & ~1);
		  break;
		}
	      /* fallthrough */
	    case D_REG_M:
	      fprintf_fn (stream, "dr%d", rm);
	      break;
+3 −3
Original line number Diff line number Diff line
@@ -33,11 +33,11 @@ Fuzz targets are built similarly to system/softmmu:

This builds ./i386-softmmu/qemu-fuzz-i386

The first option to this command is: --fuzz_taget=FUZZ_NAME
The first option to this command is: --fuzz-target=FUZZ_NAME
To list all of the available fuzzers run qemu-fuzz-i386 with no arguments.

eg:
    ./i386-softmmu/qemu-fuzz-i386 --fuzz-target=virtio-net-fork-fuzz
For example:
    ./i386-softmmu/qemu-fuzz-i386 --fuzz-target=virtio-scsi-fuzz

Internally, libfuzzer parses all arguments that do not begin with "--".
Information about these is available by passing -help=1
+37 −6
Original line number Diff line number Diff line
3270 devices
============

QEMU supports connecting an external 3270 terminal emulator (such as
``x3270``) to make a single 3270 device available to a guest. Note that this
supports basic features only.
The 3270 is the classic 'green-screen' console of the mainframes (see the
`IBM 3270 Wikipedia article <https://en.wikipedia.org/wiki/IBM_3270>`__).

The 3270 data stream is not implemented within QEMU; the device only provides
TN3270 (a telnet extension; see `RFC 854 <https://tools.ietf.org/html/rfc854>`__
and `RFC 1576 <https://tools.ietf.org/html/rfc1576>`__) and leaves the heavy
lifting to an external 3270 terminal emulator (such as ``x3270``) to make a
single 3270 device available to a guest. Note that this supports basic
features only.

To provide a 3270 device to a guest, create a ``x-terminal3270`` linked to
a ``tn3270`` chardev. The guest will see a 3270 channel device. In order
@@ -12,10 +18,14 @@ to actually be able to use it, attach the ``x3270`` emulator to the chardev.
Example configuration
---------------------

* Make sure that 3270 support is enabled in the guest's Linux kernel. You need
  ``CONFIG_TN3270`` and at least one of ``CONFIG_TN3270_TTY`` (for additional
  ttys) or ``CONFIG_TN3270_CONSOLE`` (for a 3270 console).

* Add a ``tn3270`` chardev and a ``x-terminal3270`` to the QEMU command line::

    -chardev socket,id=char_0,host=0.0.0.0,port=2300,nowait,server,tn3270
    -device x-terminal3270,chardev=char_0,devno=fe.0.000a,id=terminal_0
   -chardev socket,id=ch0,host=0.0.0.0,port=2300,nowait,server,tn3270
   -device x-terminal3270,chardev=ch0,devno=fe.0.000a,id=terminal0

* Start the guest. In the guest, use ``chccwdev -e 0.0.000a`` to enable
  the device.
@@ -29,4 +39,25 @@ Example configuration

    systemctl start serial-getty@3270-tty1.service

This should get you an addtional tty for logging into the guest.
  This should get you an additional tty for logging into the guest.

* If you want to use the 3270 device as the Linux kernel console instead of
  an additional tty, you can also append ``conmode=3270 condev=000a`` to
  the guest's kernel command line. The kernel then should use the 3270 as
  console after the next boot.

Restrictions
------------

3270 support is very basic. In particular:

* Only one 3270 device is supported.

* It has only been tested with Linux guests and the x3270 emulator.

* TLS/SSL is not supported.

* Resizing on reattach is not supported.

* Multiple commands in one inbound buffer (for example, when the reset key
  is pressed while the network is slow) are not supported.
+0 −4
Original line number Diff line number Diff line
#ifndef UI_GTK_H
#define UI_GTK_H

#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
/* Work around an -Wstrict-prototypes warning in GTK headers */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#endif
#include <gtk/gtk.h>
#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
#pragma GCC diagnostic pop
#endif

#include <gdk/gdkkeysyms.h>

Loading