1. 19 Jun, 2019 3 commits
    • Heiko Carstens's avatar
      s390: fix stfle zero padding · 4f18d869
      Heiko Carstens authored
      The stfle inline assembly returns the number of double words written
      (condition code 0) or the double words it would have written
      (condition code 3), if the memory array it got as parameter would have
      been large enough.
      
      The current stfle implementation assumes that the array is always
      large enough and clears those parts of the array that have not been
      written to with a subsequent memset call.
      
      If however the array is not large enough memset will get a negative
      length parameter, which means that memset clears memory until it gets
      an exception and the kernel crashes.
      
      To fix this simply limit the maximum length. Move also the inline
      assembly to an extra function to avoid clobbering of register 0, which
      might happen because of the added min_t invocation together with code
      instrumentation.
      
      The bug was introduced with commit 14375bc4 ("[S390] cleanup
      facility list handling") but was rather harmless, since it would only
      write to a rather large array. It became a potential problem with
      commit 3ab121ab ("[S390] kernel: Add z/VM LGR detection"). Since
      then it writes to an array with only four double words, while some
      machines already deliver three double words. As soon as machines have
      a facility bit within the fifth double a crash on IPL would happen.
      
      Fixes: 14375bc4 ("[S390] cleanup facility list handling")
      Cc: <stable@vger.kernel.org> # v2.6.37+
      Reviewed-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      4f18d869
    • Heiko Carstens's avatar
      s390/sclp: remove call home support · 191fa92b
      Heiko Carstens authored
      This feature has never been used, so remove it.
      Acked-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Acked-by: default avatarHendrik Brueckner <brueckner@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      191fa92b
    • Heiko Carstens's avatar
      s390: replace defconfig with performance_defconfig · d1523a8f
      Heiko Carstens authored
      Replace defconfig with performance_defconfig. defconfig had some more
      or less random debug options enabled, where nobody knows why anymore.
      
      Just remove the old defconfig and replace it with performance_defconfig,
      which reduces the number of configs to maintain. A config with debugging
      options enabled is debug_defconfig which is supposed to be rather close
      to performance_defconfig except that is has debug options enabled.
      Acked-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      d1523a8f
  2. 15 Jun, 2019 17 commits
  3. 11 Jun, 2019 5 commits
    • Heiko Carstens's avatar
      s390/kdump: get rid of compile warning · 2980ba6a
      Heiko Carstens authored
      Move the CONFIG_CRASH_DUMP ifdef to get rid of this:
      
      arch/s390/kernel/machine_kexec.c:146:22: warning: 'do_start_kdump' defined but not used [-Wunused-function]
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      2980ba6a
    • Vasily Gorbik's avatar
      RAID/s390: remove invalid 'r' inline asm operand modifier · eec0a43d
      Vasily Gorbik authored
      gcc silently ignores unsupported inline asm operand modifiers, effectively
      turning '%r0' into '%0', but upcoming clang 9 complains about them:
      lib/raid6/s390vx8.c:63:16: error: invalid operand in inline asm: 'VLM $2,$3,0,${1:r}'
              asm volatile ("VLM %2,%3,0,%r1"
                            ^
      
      Clean up what look like a typo 'r' inline asm operand modifier usage.
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      eec0a43d
    • Mauro Carvalho Chehab's avatar
      s390: include/asm/debug.h add kerneldoc markups · a20aa857
      Mauro Carvalho Chehab authored
      Instead of keeping the documentation inside s390dbf.rst,
      move them to arch/s390/include/asm/debug.h, using standard
      kernel-doc markups.
      
      Keeping the documentation close to the code helps to keep it
      updated. It also makes easier to document other stuff inside
      debug.h, as all it needs is to add kernel-doc markups inside
      it, as the file will be already be included at the produced
      documentation.
      
      -
      
      Those were converted to kerneldoc using this script specially
      designed to parse ths file, and manually editted:
      
      <script>
      use strict;
      
      my $mode = "";
      my $parameter = "";
      my $ret = "";
      my $descr = "";
      
      sub add_var($)
      {
      	my $ln = shift;
      
      	$ln =~ s/^\s+//;
      	$ln =~ s/\s+$//;
      
      	return if ($ln eq "");
      
      	$ln =~ s/^(\S+)\s+/$1\t/;
      
      	print " * \@$ln\n";
      }
      
      sub add_return($)
      {
      	my $ln = shift;
      
      	print " *\n * Return:\n" if ($mode ne "Return Value:");
      
      	$ln =~ s/^\s+//;
      	$ln =~ s/\s+$//;
      
      	return if ($ln eq "");
      
      	print " * -   $ln\n";
      }
      
      sub add_description($)
      {
      	my $ln = shift;
      
      	print " *\n * \n" if ($mode ne "Description:");
      
      	$ln =~ s/^\s+//;
      	$ln =~ s/\s+$//;
      
      	return if ($ln eq "");
      
      	print " * $ln\n";
      }
      
      sub flush_results()
      {
      	print " */\n\n";
      }
      
      while (<>) {
      	if (m/^[\-]+$/) {
      		flush_results();
      		$mode = "";
      		$parameter = "";
      		$ret = "";
      		$descr = "";
      		next;
      	}
      	if (m/(Parameter:)(.*)/) {
      		print " *\n" if ($mode eq "func");
      		add_var($2);
      		$mode = $1;
      		next;
      	}
      	if (m/(Return Value:)(.*)/) {
      		add_return($2);
      		$mode = $1;
      		next;
      	}
      	if (m/(Description:)(.*)/) {
      		add_description($2);
      		$mode = $1;
      		next;
      	}
      	if ($mode eq "Parameter:") {
      		add_var($_);
      		next;
      	}
      	if ($mode eq "Return Value:") {
      		add_return($_);
      		next;
      	}
      	if ($mode eq "Description:") {
      		add_description($_);
      		next;
      	}
      	next if (m/^\s*$/);
      
      	if (m/^\S+.*\s\*?(\S+)\s*\(/) {
      		if ($mode eq "") {
      			print "/**\n * $1()\n";
      		} else {
      			print " * $1()\n";
      		}
      		$mode="func";
      	}
      }
      flush_results();
      </script>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      a20aa857
    • Mauro Carvalho Chehab's avatar
      docs: s390: convert docs to ReST and rename to *.rst · 8b4a503d
      Mauro Carvalho Chehab authored
      Convert all text files with s390 documentation to ReST format.
      
      Tried to preserve as much as possible the original document
      format. Still, some of the files required some work in order
      for it to be visible on both plain text and after converted
      to html.
      
      The conversion is actually:
        - add blank lines and identation in order to identify paragraphs;
        - fix tables markups;
        - add some lists markups;
        - mark literal blocks;
        - adjust title markups.
      
      At its new index.rst, let's add a :orphan: while this is not linked to
      the main index.rst file, in order to avoid build warnings.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      8b4a503d
    • Mauro Carvalho Chehab's avatar
      docs: Debugging390.txt: convert table to ascii artwork · dc3988f4
      Mauro Carvalho Chehab authored
      The first bit/value table inside the document is very
      hard to read and won't fit ReST format. Also, some columns aren't
      properly aligned.
      
      Convert it to a nice ascii artwork table with makes it easier to
      read as plain text and is compatible with ReST format parser
      on Sphinx.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      dc3988f4
  4. 07 Jun, 2019 9 commits
  5. 04 Jun, 2019 6 commits