<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools, branch v6.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-09-30T23:03:19Z</updated>
<entry>
<title>Merge tag 'perf-tools-fixes-for-v6.0-2022-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux</title>
<updated>2022-09-30T23:03:19Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-09-30T23:03:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c816f2e9813d218b36343c67b443c77c539ea294'/>
<id>urn:sha1:c816f2e9813d218b36343c67b443c77c539ea294</id>
<content type='text'>
Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fail the 'perf test record' entry on error, fixing a regression where
   just setup stuff like allocating memory and not the actual things
   being tested failed.

 - Fixup disabling of -Wdeprecated-declarations for the python scripting
   engine, the previous attempt had a brown paper bag thinko.

 - Fix branch stack sampling test to include sanity check for branch
   filter on PowerPC.

 - Update is_ignored_symbol function to match the kernel ignored list,
   fixing running the 'perf test' entry that compares resolving symbols
   from kallsyms to resolving from vmlinux.

 - Augment the data source type with ARM's neoverse_spe list, the
   previous code was limited in its search resolving the data source.

 - Fix some clang 5 variable set but unused cases.

 - Get a perf cgroup more portably in BPF as the
   __builtin_preserve_enum_value builtin is not available in older
   versions of clang. In those cases we can forgo BPF's CO-RE (Compile
   Once, Run Everywhere).

 - More Fixes for Intel's hybrid CPU model.

* tag 'perf-tools-fixes-for-v6.0-2022-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
  perf build: Fixup disabling of -Wdeprecated-declarations for the python scripting engine
  perf tests mmap-basic: Remove unused variable to address clang 15 warning
  perf parse-events: Ignore clang 15 warning about variable set but unused in bison produced code
  perf tests record: Fail the test if the 'errs' counter is not zero
  perf test: Fix test case 87 ("perf record tests") for hybrid systems
  perf arm-spe: augment the data source type with neoverse_spe list
  perf tests vmlinux-kallsyms: Update is_ignored_symbol function to match the kernel ignored list
  perf tests powerpc: Fix branch stack sampling test to include sanity check for branch filter
  perf parse-events: Remove "not supported" hybrid cache events
  perf print-events: Fix "perf list" can not display the PMU prefix for some hybrid cache events
  perf tools: Get a perf cgroup more portably in BPF
</content>
</entry>
<entry>
<title>Merge tag 'for-linus-6.0' of git://git.kernel.org/pub/scm/virt/kvm/kvm</title>
<updated>2022-09-30T22:49:13Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-09-30T22:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=920541bb0b9bf08d1455890694fbb2bbffb7a12b'/>
<id>urn:sha1:920541bb0b9bf08d1455890694fbb2bbffb7a12b</id>
<content type='text'>
Pull kvm fixes from Paolo Bonzini:
 "A small fix to the reported set of supported CPUID bits, and selftests
  fixes:

   - Skip tests that require EPT when it is not available

   - Do not hang when a test fails with an empty stack trace

   - avoid spurious failure when running access_tracking_perf_test in a
     KVM guest

   - work around GCC's tendency to optimize loops into mem*() functions,
     which breaks because the guest code in selftests cannot call into
     PLTs

   - fix -Warray-bounds error in fix_hypercall_test"

* tag 'for-linus-6.0' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: selftests: Compare insn opcodes directly in fix_hypercall_test
  KVM: selftests: Implement memcmp(), memcpy(), and memset() for guest use
  KVM: x86: Hide IA32_PLATFORM_DCA_CAP[31:0] from the guest
  KVM: selftests: Gracefully handle empty stack traces
  KVM: selftests: replace assertion with warning in access_tracking_perf_test
  KVM: selftests: Skip tests that require EPT when it is not available
</content>
</entry>
<entry>
<title>Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost</title>
<updated>2022-09-30T16:41:34Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-09-30T16:41:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70575e77839f4c5337ce2653b39b86bb365a870e'/>
<id>urn:sha1:70575e77839f4c5337ce2653b39b86bb365a870e</id>
<content type='text'>
Pull virtio fixes from Michael Tsirkin:
 "Some last minute fixes.

  The virtio-blk one is the most important one since it was actually
  seen in the field, but the rest of them are small and clearly safe,
  everything here has been in next for a while"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  vdpa/mlx5: Fix MQ to support non power of two num queues
  vduse: prevent uninitialized memory accesses
  virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()
  virtio_test: fixup for vq reset
  virtio-crypto: fix memory-leak
  vdpa/ifcvf: fix the calculation of queuepair
</content>
</entry>
<entry>
<title>KVM: selftests: Compare insn opcodes directly in fix_hypercall_test</title>
<updated>2022-09-30T10:38:02Z</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2022-09-28T23:36:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=394265079b6c271fdc191ac31b1ebfbee3dd6d63'/>
<id>urn:sha1:394265079b6c271fdc191ac31b1ebfbee3dd6d63</id>
<content type='text'>
Directly compare the expected versus observed hypercall instructions when
verifying that KVM patched in the native hypercall (FIX_HYPERCALL_INSN
quirk enabled).  gcc rightly complains that doing a 4-byte memcpy() with
an "unsigned char" as the source generates an out-of-bounds accesses.

Alternatively, "exp" and "obs" could be declared as 3-byte arrays, but
there's no known reason to copy locally instead of comparing directly.

In function ‘assert_hypercall_insn’,
    inlined from ‘guest_main’ at x86_64/fix_hypercall_test.c:91:2:
x86_64/fix_hypercall_test.c:63:9: error: array subscript ‘unsigned int[0]’
 is partly outside array bounds of ‘unsigned char[1]’ [-Werror=array-bounds]
   63 |         memcpy(&amp;exp, exp_insn, sizeof(exp));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x86_64/fix_hypercall_test.c: In function ‘guest_main’:
x86_64/fix_hypercall_test.c:42:22: note: object ‘vmx_hypercall_insn’ of size 1
   42 | extern unsigned char vmx_hypercall_insn;
      |                      ^~~~~~~~~~~~~~~~~~
x86_64/fix_hypercall_test.c:25:22: note: object ‘svm_hypercall_insn’ of size 1
   25 | extern unsigned char svm_hypercall_insn;
      |                      ^~~~~~~~~~~~~~~~~~
In function ‘assert_hypercall_insn’,
    inlined from ‘guest_main’ at x86_64/fix_hypercall_test.c:91:2:
x86_64/fix_hypercall_test.c:64:9: error: array subscript ‘unsigned int[0]’
 is partly outside array bounds of ‘unsigned char[1]’ [-Werror=array-bounds]
   64 |         memcpy(&amp;obs, obs_insn, sizeof(obs));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x86_64/fix_hypercall_test.c: In function ‘guest_main’:
x86_64/fix_hypercall_test.c:25:22: note: object ‘svm_hypercall_insn’ of size 1
   25 | extern unsigned char svm_hypercall_insn;
      |                      ^~~~~~~~~~~~~~~~~~
x86_64/fix_hypercall_test.c:42:22: note: object ‘vmx_hypercall_insn’ of size 1
   42 | extern unsigned char vmx_hypercall_insn;
      |                      ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [../lib.mk:135: tools/testing/selftests/kvm/x86_64/fix_hypercall_test] Error 1

Fixes: 6c2fa8b20d0c ("selftests: KVM: Test KVM_X86_QUIRK_FIX_HYPERCALL_INSN")
Cc: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Message-Id: &lt;20220928233652.783504-3-seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Implement memcmp(), memcpy(), and memset() for guest use</title>
<updated>2022-09-30T10:38:02Z</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2022-09-28T23:36:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b6f71484bf4fbe169fdbd401c829d8981365fd2'/>
<id>urn:sha1:6b6f71484bf4fbe169fdbd401c829d8981365fd2</id>
<content type='text'>
Implement memcmp(), memcpy(), and memset() to override the compiler's
built-in versions in order to guarantee that the compiler won't generate
out-of-line calls to external functions via the PLT.  This allows the
helpers to be safely used in guest code, as KVM selftests don't support
dynamic loading of guest code.

Steal the implementations from the kernel's generic versions, sans the
optimizations in memcmp() for unaligned accesses.

Put the utilities in a separate compilation unit and build with
-ffreestanding to fudge around a gcc "feature" where it will optimize
memset(), memcpy(), etc... by generating a recursive call.  I.e. the
compiler optimizes itself into infinite recursion.  Alternatively, the
individual functions could be tagged with
optimize("no-tree-loop-distribute-patterns"), but using "optimize" for
anything but debug is discouraged, and Linus NAK'd the use of the flag
in the kernel proper[*].

https://lore.kernel.org/lkml/CAHk-=wik-oXnUpfZ6Hw37uLykc-_P0Apyn2XuX-odh-3Nzop8w@mail.gmail.com

Cc: Andrew Jones &lt;andrew.jones@linux.dev&gt;
Cc: Anup Patel &lt;anup@brainfault.org&gt;
Cc: Atish Patra &lt;atishp@atishpatra.org&gt;
Cc: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Cc: Janosch Frank &lt;frankja@linux.ibm.com&gt;
Cc: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Message-Id: &lt;20220928233652.783504-2-seanjc@google.com&gt;
Reviewed-by: Andrew Jones &lt;andrew.jones@linux.dev&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Gracefully handle empty stack traces</title>
<updated>2022-09-30T10:38:00Z</updated>
<author>
<name>David Matlack</name>
<email>dmatlack@google.com</email>
</author>
<published>2022-09-22T23:17:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=09636efd1bd164ac782ff0d3a714db2c53964776'/>
<id>urn:sha1:09636efd1bd164ac782ff0d3a714db2c53964776</id>
<content type='text'>
Bail out of test_dump_stack() if the stack trace is empty rather than
invoking addr2line with zero addresses. The problem with the latter is
that addr2line will block waiting for addresses to be passed in via
stdin, e.g. if running a selftest from an interactive terminal.

Opportunistically fix up the comment that mentions skipping 3 frames
since only 2 are skipped in the code.

Cc: Vipin Sharma &lt;vipinsh@google.com&gt;
Cc: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: David Matlack &lt;dmatlack@google.com&gt;
Message-Id: &lt;20220922231724.3560211-1-dmatlack@google.com&gt;
[Small tweak to keep backtrace() call close to if(). - Paolo]
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: replace assertion with warning in access_tracking_perf_test</title>
<updated>2022-09-30T10:38:00Z</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
<email>eesposit@redhat.com</email>
</author>
<published>2022-09-26T08:29:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6336a810db5c7e8e48b55b12fbb5e9cbd36a3d19'/>
<id>urn:sha1:6336a810db5c7e8e48b55b12fbb5e9cbd36a3d19</id>
<content type='text'>
Page_idle uses {ptep/pmdp}_clear_young_notify which in turn calls
the mmu notifier callback -&gt;clear_young(), which purposefully
does not flush the TLB.

When running the test in a nested guest, point 1. of the test
doc header is violated, because KVM TLB is unbounded by size
and since no flush is forced, KVM does not update the sptes
accessed/idle bits resulting in guest assertion failure.

More precisely, only the first ACCESS_WRITE in run_test() actually
makes visible changes, because sptes are created and the accessed
bit is set to 1 (or idle bit is 0). Then the first mark_memory_idle()
passes since access bit is still one, and sets all pages as idle
(or not accessed). When the next write is performed, the update
is not flushed therefore idle is still 1 and next mark_memory_idle()
fails.

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Message-Id: &lt;20220926082923.299554-1-eesposit@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf build: Fixup disabling of -Wdeprecated-declarations for the python scripting engine</title>
<updated>2022-09-29T19:03:35Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2022-09-29T18:20:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e8bf60a675473a034ecfcb7a842b98868ed74a3'/>
<id>urn:sha1:8e8bf60a675473a034ecfcb7a842b98868ed74a3</id>
<content type='text'>
A brown paper bag where -Wno-error=deprecated-declarations was added
from compiler output when the right thing is to add
-Wno-deprecated-declarations, fix it.

Fixes: 4ee3c4da8b1b9c22 ("perf scripting python: Do not build fail on deprecation warnings")
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tests mmap-basic: Remove unused variable to address clang 15 warning</title>
<updated>2022-09-29T18:08:51Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2022-09-29T14:05:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5551717bddb0c8aa78c4d2f8846624e2cf6816f7'/>
<id>urn:sha1:5551717bddb0c8aa78c4d2f8846624e2cf6816f7</id>
<content type='text'>
A clang 15 build reveal several unused-but-set variables, removing the
'foo' variable in tests/mmap-basic.o object to address one of those
cases.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lore.kernel.org/lkml/20220929140514.226807-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf parse-events: Ignore clang 15 warning about variable set but unused in bison produced code</title>
<updated>2022-09-29T18:08:13Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2022-09-29T08:13:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5149a427d27751da95b04fabe98ab65f412b5777'/>
<id>urn:sha1:5149a427d27751da95b04fabe98ab65f412b5777</id>
<content type='text'>
clang 15 now warns:

  46    65.20 fedora:rawhide                : FAIL clang version 15.0.0 (Fedora 15.0.0-3.fc38)
    util/parse-events-bison.c:1401:9: error: variable 'parse_events_nerrs' set but not used [-Werror,-Wunused-but-set-variable]
        int yynerrs = 0;
            ^
    #define yynerrs         parse_events_nerrs
                            ^
    1 error generated.
    make[3]: *** [/git/perf-6.0.0-rc7/tools/build/Makefile.build:139: util] Error 2

Just ignore one more compiler warning for the bison generated C code.

Committer notes:

Older clangs don't know about -Wunused-but-set-variable, so we need to
add -Wno-unknown-warning-option to avoid this:

  37    44.92 fedora:32                     : FAIL clang version 10.0.1 (Fedora 10.0.1-3.fc32)
    error: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Werror,-Wunknown-warning-option]
    make[3]: *** [/git/perf-6.0.0-rc7/tools/build/Makefile.build:139: util] Error 2

Reported-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/lkml/20220929140514.226807-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
