1. 18 2月, 2022 2 次提交
  2. 16 2月, 2022 2 次提交
    • O
      security: implement sctp_assoc_established hook in selinux · 3eb8eaf2
      Ondrej Mosnacek 提交于
      Do this by extracting the peer labeling per-association logic from
      selinux_sctp_assoc_request() into a new helper
      selinux_sctp_process_new_assoc() and use this helper in both
      selinux_sctp_assoc_request() and selinux_sctp_assoc_established(). This
      ensures that the peer labeling behavior as documented in
      Documentation/security/SCTP.rst is applied both on the client and server
      side:
      """
      An SCTP socket will only have one peer label assigned to it. This will be
      assigned during the establishment of the first association. Any further
      associations on this socket will have their packet peer label compared to
      the sockets peer label, and only if they are different will the
      ``association`` permission be validated. This is validated by checking the
      socket peer sid against the received packets peer sid to determine whether
      the association should be allowed or denied.
      """
      
      At the same time, it also ensures that the peer label of the association
      is set to the correct value, such that if it is peeled off into a new
      socket, the socket's peer label  will then be set to the association's
      peer label, same as it already works on the server side.
      
      While selinux_inet_conn_established() (which we are replacing by
      selinux_sctp_assoc_established() for SCTP) only deals with assigning a
      peer label to the connection (socket), in case of SCTP we need to also
      copy the (local) socket label to the association, so that
      selinux_sctp_sk_clone() can then pick it up for the new socket in case
      of SCTP peeloff.
      
      Careful readers will notice that the selinux_sctp_process_new_assoc()
      helper also includes the "IPv4 packet received over an IPv6 socket"
      check, even though it hadn't been in selinux_sctp_assoc_request()
      before. While such check is not necessary in
      selinux_inet_conn_request() (because struct request_sock's family field
      is already set according to the skb's family), here it is needed, as we
      don't have request_sock and we take the initial family from the socket.
      In selinux_sctp_assoc_established() it is similarly needed as well (and
      also selinux_inet_conn_established() already has it).
      
      Fixes: 72e89f50 ("security: Add support for SCTP security hooks")
      Reported-by: NPrashanth Prahlad <pprahlad@redhat.com>
      Based-on-patch-by: NXin Long <lucien.xin@gmail.com>
      Reviewed-by: NXin Long <lucien.xin@gmail.com>
      Tested-by: NRichard Haines <richard_c_haines@btinternet.com>
      Signed-off-by: NOndrej Mosnacek <omosnace@redhat.com>
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      3eb8eaf2
    • O
      security: add sctp_assoc_established hook · 5e50f5d4
      Ondrej Mosnacek 提交于
      security_sctp_assoc_established() is added to replace
      security_inet_conn_established() called in
      sctp_sf_do_5_1E_ca(), so that asoc can be accessed in security
      subsystem and save the peer secid to asoc->peer_secid.
      
      Fixes: 72e89f50 ("security: Add support for SCTP security hooks")
      Reported-by: NPrashanth Prahlad <pprahlad@redhat.com>
      Based-on-patch-by: NXin Long <lucien.xin@gmail.com>
      Reviewed-by: NXin Long <lucien.xin@gmail.com>
      Tested-by: NRichard Haines <richard_c_haines@btinternet.com>
      Signed-off-by: NOndrej Mosnacek <omosnace@redhat.com>
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      5e50f5d4
  3. 05 2月, 2022 1 次提交
    • O
      selinux: parse contexts for mount options early · 70f4169a
      Ondrej Mosnacek 提交于
      Commit b8b87fd9 ("selinux: Fix selinux_sb_mnt_opts_compat()")
      started to parse mount options into SIDs in selinux_add_opt() if policy
      has already been loaded. Since it's extremely unlikely that anyone would
      depend on the ability to set SELinux contexts on fs_context before
      loading the policy and then mounting that context after simplify the
      logic by always parsing the options early.
      
      Note that the multi-step mounting is only possible with the new
      fscontext mount API and wasn't possible before its introduction.
      Signed-off-by: NOndrej Mosnacek <omosnace@redhat.com>
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      70f4169a
  4. 02 2月, 2022 3 次提交
  5. 28 1月, 2022 2 次提交
    • C
      LSM: general protection fault in legacy_parse_param · ecff3057
      Casey Schaufler 提交于
      The usual LSM hook "bail on fail" scheme doesn't work for cases where
      a security module may return an error code indicating that it does not
      recognize an input.  In this particular case Smack sees a mount option
      that it recognizes, and returns 0. A call to a BPF hook follows, which
      returns -ENOPARAM, which confuses the caller because Smack has processed
      its data.
      
      The SELinux hook incorrectly returns 1 on success. There was a time
      when this was correct, however the current expectation is that it
      return 0 on success. This is repaired.
      
      Reported-by: syzbot+d1e3b1d92d25abf97943@syzkaller.appspotmail.com
      Signed-off-by: NCasey Schaufler <casey@schaufler-ca.com>
      Acked-by: NJames Morris <jamorris@linux.microsoft.com>
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      ecff3057
    • P
      selinux: fix a type cast problem in cred_init_security() · cdeea454
      Paul Moore 提交于
      In the process of removing an explicit type cast to preserve a cred
      const qualifier in cred_init_security() we ran into a problem where
      the task_struct::real_cred field is defined with the "__rcu"
      attribute but the selinux_cred() function parameter is not, leading
      to a sparse warning:
      
        security/selinux/hooks.c:216:36: sparse: sparse:
          incorrect type in argument 1 (different address spaces)
          @@     expected struct cred const *cred
          @@     got struct cred const [noderef] __rcu *real_cred
      
      As we don't want to add the "__rcu" attribute to the selinux_cred()
      parameter, we're going to add an explicit cast back to
      cred_init_security().
      
      Fixes: b084e189 ("selinux: simplify cred_init_security")
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      cdeea454
  6. 27 1月, 2022 7 次提交
  7. 26 1月, 2022 3 次提交
  8. 23 1月, 2022 15 次提交
    • L
      Linux 5.17-rc1 · e783362e
      Linus Torvalds 提交于
      e783362e
    • L
      Merge tag 'perf-tools-for-v5.17-2022-01-22' of... · 40c84321
      Linus Torvalds 提交于
      Merge tag 'perf-tools-for-v5.17-2022-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull more perf tools updates from Arnaldo Carvalho de Melo:
      
       - Fix printing 'phys_addr' in 'perf script'.
      
       - Fix failure to add events with 'perf probe' in ppc64 due to not
         removing leading dot (ppc64 ABIv1).
      
       - Fix cpu_map__item() python binding building.
      
       - Support event alias in form foo-bar-baz, add pmu-events and
         parse-event tests for it.
      
       - No need to setup affinities when starting a workload or attaching to
         a pid.
      
       - Use path__join() to compose a path instead of ad-hoc snprintf()
         equivalent.
      
       - Override attr->sample_period for non-libpfm4 events.
      
       - Use libperf cpumap APIs instead of accessing the internal state
         directly.
      
       - Sync x86 arch prctl headers and files changed by the new
         set_mempolicy_home_node syscall with the kernel sources.
      
       - Remove duplicate include in cpumap.h.
      
       - Remove redundant err variable.
      
      * tag 'perf-tools-for-v5.17-2022-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf tools: Remove redundant err variable
        perf test: Add parse-events test for aliases with hyphens
        perf test: Add pmu-events test for aliases with hyphens
        perf parse-events: Support event alias in form foo-bar-baz
        perf evsel: Override attr->sample_period for non-libpfm4 events
        perf cpumap: Remove duplicate include in cpumap.h
        perf cpumap: Migrate to libperf cpumap api
        perf python: Fix cpu_map__item() building
        perf script: Fix printing 'phys_addr' failure issue
        tools headers UAPI: Sync files changed by new set_mempolicy_home_node syscall
        tools headers UAPI: Sync x86 arch prctl headers with the kernel sources
        perf machine: Use path__join() to compose a path instead of snprintf(dir, '/', filename)
        perf evlist: No need to setup affinities when disabling events for pid targets
        perf evlist: No need to setup affinities when enabling events for pid targets
        perf stat: No need to setup affinities when starting a workload
        perf affinity: Allow passing a NULL arg to affinity__cleanup()
        perf probe: Fix ppc64 'perf probe add events failed' case
      40c84321
    • L
      Merge tag 'trace-v5.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 67bfce0e
      Linus Torvalds 提交于
      Pull ftrace fix from Steven Rostedt:
       "Fix s390 breakage from sorting mcount tables.
      
        The latest merge of the tracing tree sorts the mcount table at build
        time. But s390 appears to do things differently (like always) and
        replaces the sorted table back to the original unsorted one. As the
        ftrace algorithm depends on it being sorted, bad things happen when it
        is not, and s390 experienced those bad things.
      
        Add a new config to tell the boot if the mcount table is sorted or
        not, and allow s390 to opt out of it"
      
      * tag 'trace-v5.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace: Fix assuming build time sort works for s390
      67bfce0e
    • S
      ftrace: Fix assuming build time sort works for s390 · 6b9b6413
      Steven Rostedt (Google) 提交于
      To speed up the boot process, as mcount_loc needs to be sorted for ftrace
      to work properly, sorting it at build time is more efficient than boot up
      and can save milliseconds of time. Unfortunately, this change broke s390
      as it will modify the mcount_loc location after the sorting takes place
      and will put back the unsorted locations. Since the sorting is skipped at
      boot up if it is believed that it was sorted at run time, ftrace can crash
      as its algorithms are dependent on the list being sorted.
      
      Add a new config BUILDTIME_MCOUNT_SORT that is set when
      BUILDTIME_TABLE_SORT but not if S390 is set. Use this config to determine
      if sorting should take place at boot up.
      
      Link: https://lore.kernel.org/all/yt9dee51ctfn.fsf@linux.ibm.com/
      
      Fixes: 72b3942a ("scripts: ftrace - move the sort-processing in ftrace_init")
      Reported-by: NSven Schnelle <svens@linux.ibm.com>
      Tested-by: NHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: NSteven Rostedt (Google) <rostedt@goodmis.org>
      6b9b6413
    • L
      Merge tag 'kbuild-fixes-v5.17' of... · 473aec0e
      Linus Torvalds 提交于
      Merge tag 'kbuild-fixes-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Bring include/uapi/linux/nfc.h into the UAPI compile-test coverage
      
       - Revert the workaround of CONFIG_CC_IMPLICIT_FALLTHROUGH
      
       - Fix build errors in certs/Makefile
      
      * tag 'kbuild-fixes-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        certs: Fix build error when CONFIG_MODULE_SIG_KEY is empty
        certs: Fix build error when CONFIG_MODULE_SIG_KEY is PKCS#11 URI
        Revert "Makefile: Do not quote value for CONFIG_CC_IMPLICIT_FALLTHROUGH"
        usr/include/Makefile: add linux/nfc.h to the compile-test coverage
      473aec0e
    • L
      Merge tag 'bitmap-5.17-rc1' of git://github.com/norov/linux · 3689f9f8
      Linus Torvalds 提交于
      Pull bitmap updates from Yury Norov:
      
       - introduce for_each_set_bitrange()
      
       - use find_first_*_bit() instead of find_next_*_bit() where possible
      
       - unify for_each_bit() macros
      
      * tag 'bitmap-5.17-rc1' of git://github.com/norov/linux:
        vsprintf: rework bitmap_list_string
        lib: bitmap: add performance test for bitmap_print_to_pagebuf
        bitmap: unify find_bit operations
        mm/percpu: micro-optimize pcpu_is_populated()
        Replace for_each_*_bit_from() with for_each_*_bit() where appropriate
        find: micro-optimize for_each_{set,clear}_bit()
        include/linux: move for_each_bit() macros from bitops.h to find.h
        cpumask: replace cpumask_next_* with cpumask_first_* where appropriate
        tools: sync tools/bitmap with mother linux
        all: replace find_next{,_zero}_bit with find_first{,_zero}_bit where appropriate
        cpumask: use find_first_and_bit()
        lib: add find_first_and_bit()
        arch: remove GENERIC_FIND_FIRST_BIT entirely
        include: move find.h from asm_generic to linux
        bitops: move find_bit_*_le functions from le.h to find.h
        bitops: protect find_first_{,zero}_bit properly
      3689f9f8
    • M
      perf tools: Remove redundant err variable · f0ac5b85
      Minghao Chi 提交于
      Return value from perf_event__process_tracing_data() directly instead
      of taking this in another redundant variable.
      Reported-by: NZeal Robot <zealci@zte.com.cn>
      Signed-off-by: NMinghao Chi <chi.minghao@zte.com.cn>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lore.kernel.org/lkml/20220112080109.666800-1-chi.minghao@zte.com.cnSigned-off-by: NCGEL ZTE <cgel.zte@gmail.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f0ac5b85
    • J
      perf test: Add parse-events test for aliases with hyphens · b4a7276c
      John Garry 提交于
      Add a test which allows us to test parsing an event alias with hyphens.
      
      Since these events typically do not exist on most host systems, add the
      alias to the fake pmu.
      
      Function perf_pmu__test_parse_init() has terms added to match known test
      aliases.
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Acked-by: NIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qi Liu <liuqi115@huawei.com>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: linuxarm@huawei.com
      Link: https://lore.kernel.org/r/1642432215-234089-4-git-send-email-john.garry@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b4a7276c
    • J
      perf test: Add pmu-events test for aliases with hyphens · 34fa67e7
      John Garry 提交于
      Add a test for aliases with hyphens in the name to ensure that the
      pmu-events tables are as expects. There should be no reason why these sort
      of aliases would be treated differently, but no harm in checking.
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Acked-by: NIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qi Liu <liuqi115@huawei.com>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: linuxarm@huawei.com
      Link: https://lore.kernel.org/r/1642432215-234089-3-git-send-email-john.garry@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      34fa67e7
    • J
      perf parse-events: Support event alias in form foo-bar-baz · 864bc8c9
      John Garry 提交于
      Event aliasing for events whose name in the form foo-bar-baz is not
      supported, while foo-bar, foo_bar_baz, and other combinations are, i.e.
      two hyphens are not supported.
      
      The HiSilicon D06 platform has events in such form:
      
        $ ./perf list sdir-home-migrate
      
        List of pre-defined events (to be used in -e):
      
        uncore hha:
          sdir-home-migrate
         [Unit: hisi_sccl,hha]
      
        $ sudo ./perf stat -e sdir-home-migrate
        event syntax error: 'sdir-home-migrate'
                                \___ parser error
        Run 'perf list' for a list of valid events
      
         Usage: perf stat [<options>] [<command>]
      
         -e, --event <event>event selector. use 'perf list' to list available events
      
      To support, add an extra PMU event symbol type for "baz", and add a new
      rule in the bison file.
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Acked-by: NIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qi Liu <liuqi115@huawei.com>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: linuxarm@huawei.com
      Link: https://lore.kernel.org/r/1642432215-234089-2-git-send-email-john.garry@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      864bc8c9
    • G
      perf evsel: Override attr->sample_period for non-libpfm4 events · 3606c0e1
      German Gomez 提交于
      A previous patch preventing "attr->sample_period" values from being
      overridden in pfm events changed a related behaviour in arm-spe.
      
      Before said patch:
      
        perf record -c 10000 -e arm_spe_0// -- sleep 1
      
      Would yield an SPE event with period=10000. After the patch, the period
      in "-c 10000" was being ignored because the arm-spe code initializes
      sample_period to a non-zero value.
      
      This patch restores the previous behaviour for non-libpfm4 events.
      
      Fixes: ae5dcc8a (“perf record: Prevent override of attr->sample_period for libpfm4 events”)
      Reported-by: NChase Conklin <chase.conklin@arm.com>
      Signed-off-by: NGerman Gomez <german.gomez@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Yonghong Song <yhs@fb.com>
      Cc: bpf@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20220118144054.2541-1-german.gomez@arm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3606c0e1
    • L
      perf cpumap: Remove duplicate include in cpumap.h · 24ead7c2
      Lv Ruyi 提交于
      Remove all but the first include of stdbool.h from cpumap.h.
      Reported-by: NZeal Robot <zealci@zte.com.cn>
      Signed-off-by: NLv Ruyi <lv.ruyi@zte.com.cn>
      Acked-by: NIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20220117083730.863200-1-lv.ruyi@zte.com.cnSigned-off-by: NCGEL ZTE <cgel.zte@gmail.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      24ead7c2
    • I
      perf cpumap: Migrate to libperf cpumap api · 44028699
      Ian Rogers 提交于
      Switch from directly accessing the perf_cpu_map to using the appropriate
      libperf API when possible. Using the API simplifies the job of
      refactoring use of perf_cpu_map.
      Signed-off-by: NIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: André Almeida <andrealmeid@collabora.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Dmitriy Vyukov <dvyukov@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
      Cc: Song Liu <song@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
      Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Link: http://lore.kernel.org/lkml/20220122045811.3402706-3-irogers@google.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      44028699
    • I
      perf python: Fix cpu_map__item() building · 1d1d9af2
      Ian Rogers 提交于
      Value should be built as an integer.
      
      Switch some uses of perf_cpu_map to use the library API.
      
      Fixes: 6d18804b ("perf cpumap: Give CPUs their own type")
      Signed-off-by: NIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: André Almeida <andrealmeid@collabora.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Dmitriy Vyukov <dvyukov@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: German Gomez <german.gomez@arm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
      Cc: Song Liu <song@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
      Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Link: http://lore.kernel.org/lkml/20220122045811.3402706-2-irogers@google.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1d1d9af2
    • Y
      perf script: Fix printing 'phys_addr' failure issue · 9edcde68
      Yao Jin 提交于
      Perf script was failed to print the phys_addr for SPE profiling.
      One 'dummy' event is added by SPE profiling but it doesn't have PHYS_ADDR
      attribute set, perf script then exits with error.
      
      Now referring to 'addr', use evsel__do_check_stype() to check the type.
      
      Before:
      
        # perf record -e arm_spe_0/branch_filter=0,ts_enable=1,pa_enable=1,load_filter=1,jitter=0,\
      		store_filter=0,min_latency=0,event_filter=2/ -p 4064384 -- sleep 3
        # perf script -F pid,tid,addr,phys_addr
        Samples for 'dummy:u' event do not have PHYS_ADDR attribute set. Cannot print 'phys_addr' field.
      
      After:
      
        # perf record -e arm_spe_0/branch_filter=0,ts_enable=1,pa_enable=1,load_filter=1,jitter=0,\
      		store_filter=0,min_latency=0,event_filter=2/ -p 4064384 -- sleep 3
        # perf script -F pid,tid,addr,phys_addr
        4064384/4064384 ffff802f921be0d0      2f921be0d0
        4064384/4064384 ffff802f921be0d0      2f921be0d0
      Reviewed-by: NGerman Gomez <german.gomez@arm.com>
      Signed-off-by: NYao Jin <jinyao5@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Hanjun Guo <guohanjun@huawei.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20220121065954.2121900-1-liwei391@huawei.comSigned-off-by: NWei Li <liwei391@huawei.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9edcde68
  9. 22 1月, 2022 5 次提交