# stackcollapse.py - format perf samples with one line per distinct call stack # # This script's output has two space-separated fields. The first is a semicolon # separated stack including the program name (from the "comm" field) and the # function names from the call stack. The second is a count: # # swapper;start_kernel;rest_init;cpu_idle;default_idle;native_safe_halt 2 # # The file is sorted according to the first field. # # Input may be created and processed using: # # perf record -a -g -F 99 sleep 60 # perf script report stackcollapse > out.stacks-folded # # (perf script record stackcollapse works too). # # Written by Paolo Bonzini # Based on Brendan Gregg's stackcollapse-perf.pl script. import os import sys from collections import defaultdict from optparse import OptionParser, make_option sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from EventClass import * # command line parsing option_list = [ # formatting options for the bottom entry of the stack make_option("--include-tid", dest="include_tid", action="store_true", default=False, help="include thread id in stack"), make_option("--include-pid", dest="include_pid", action="store_true", default=False, help="include process id in stack"), make_option("--no-comm", dest="include_comm", action="store_false", default=True, help="do not separate stacks according to comm"), make_option("--tidy-java", dest="tidy_java", action="store_true", default=False, help="beautify Java signatures"), make_option("--kernel", dest="annotate_kernel", action="store_true", default=False, help="annotate kernel functions with _[k]") ] parser = OptionParser(option_list=option_list) (opts, args) = parser.parse_args() if len(args) != 0: parser.error("unexpected command line argument") if opts.include_tid and not opts.include_comm: parser.error("requesting tid but not comm is invalid") if opts.include_pid and not opts.include_comm: parser.error("requesting pid but not comm is invalid") # event handlers lines = defaultdict(lambda: 0) def process_event(param_dict): def tidy_function_name(sym, dso): if sym is None: sym = '[unknown]' sym = sym.replace(';', ':') if opts.tidy_java: # the original stackcollapse-perf.pl script gives the # example of converting this: # Lorg/mozilla/javascript/MemberBox;.(Ljava/lang/reflect/Method;)V # to this: # org/mozilla/javascript/MemberBox:.init sym = sym.replace('<', '') sym = sym.replace('>', '') if sym[0] == 'L' and sym.find('/'): sym = sym[1:] try: sym = sym[:sym.index('(')] except ValueError: pass if opts.annotate_kernel and dso == '[kernel.kallsyms]': return sym + '_[k]' else: return sym stack = list() if 'callchain' in param_dict: for entry in param_dict['callchain']: entry.setdefault('sym', dict()) entry['sym'].setdefault('name', None) entry.setdefault('dso', None) stack.append(tidy_function_name(entry['sym']['name'], entry['dso'])) else: param_dict.setdefault('symbol', None) param_dict.setdefault('dso', None) stack.append(tidy_function_name(param_dict['symbol'], param_dict['dso'])) if opts.include_comm: comm = param_dict["comm"].replace(' ', '_') sep = "-" if opts.include_pid: comm = comm + sep + str(param_dict['sample']['pid']) sep = "/" if opts.include_tid: comm = comm + sep + str(param_dict['sample']['tid']) stack.append(comm) stack_string = ';'.join(reversed(stack)) lines[stack_string] = lines[stack_string] + 1 def trace_end(): list = lines.keys() list.sort() for stack in list: print "%s %d" % (stack, lines[stack]) ux.org.uk/cgit/git.armlinux.org.uk/linux-net-next.git/commit/?id=2d5d4b0a6da1271a7dfa9a7052870361e72ba424'/> 2d5d4b0a6da1271a7dfa9a7052870361e72ba424 When BIP is used to protect Beacon frames, the Timestamp field is masked to zero. Otherwise, the BIP processing is identical to the way it was already used with group-addressed Robust Management frames. Signed-off-by: Jouni Malinen <jouni@codeaurora.org> Link: https://lore.kernel.org/r/20200222132548.20835-4-jouni@codeaurora.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
When BIP is used to protect Beacon frames, the Timestamp field is masked
to zero. Otherwise, the BIP processing is identical to the way it was
already used with group-addressed Robust Management frames.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Link: https://lore.kernel.org/r/20200222132548.20835-4-jouni@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
mac80211: Support BIGTK configuration for Beacon protection 2020-02-24T09:35:57+00:00 Jouni Malinen jouni@codeaurora.org 2020-02-22T13:25:44+00:00 e5473e80d46767ebc64dac4958f30299a3b14b1b Extend mac80211 key configuration to support the new BIGTK with key index values 6 and 7. Support for actually protecting Beacon frames (adding the MME in AP mode and checking it in STA mode) is covered in separate commits. Signed-off-by: Jouni Malinen <jouni@codeaurora.org> Link: https://lore.kernel.org/r/20200222132548.20835-3-jouni@codeaurora.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Extend mac80211 key configuration to support the new BIGTK with key
index values 6 and 7. Support for actually protecting Beacon frames
(adding the MME in AP mode and checking it in STA mode) is covered in
separate commits.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Link: https://lore.kernel.org/r/20200222132548.20835-3-jouni@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Revert "nl80211: add src and dst addr attributes for control port tx/rx" 2020-02-24T09:22:02+00:00 Johannes Berg johannes.berg@intel.com 2020-02-24T09:19:12+00:00 8d74a623cc3cecda89da628b8f3d115d8cf1ee8f This reverts commit 8c3ed7aa2b9ef666195b789e9b02e28383243fa8. As Jouni points out, there's really no need for this, since the RSN pre-authentication frames are normal data frames, not port control frames (locally). We can still revert this now since it hasn't actually gone beyond -next. Fixes: 8c3ed7aa2b9e ("nl80211: add src and dst addr attributes for control port tx/rx") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://lore.kernel.org/r/20200224101910.b746e263287a.I9eb15d6895515179d50964dec3550c9dc784bb93@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This reverts commit 8c3ed7aa2b9ef666195b789e9b02e28383243fa8.

As Jouni points out, there's really no need for this, since the
RSN pre-authentication frames are normal data frames, not port
control frames (locally).

We can still revert this now since it hasn't actually gone beyond
-next.

Fixes: 8c3ed7aa2b9e ("nl80211: add src and dst addr attributes for control port tx/rx")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200224101910.b746e263287a.I9eb15d6895515179d50964dec3550c9dc784bb93@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Revert "mac80211: support NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_MAC_ADDRS" 2020-02-24T09:21:52+00:00 Johannes Berg johannes.berg@intel.com 2020-02-24T09:19:11+00:00 8079e4fee5639cc01374cc2d2ea3f952598896b4 This reverts commit 9b125c27998719288e4dcf2faf54511039526692. As Jouni points out, there's really no need for this, since the RSN pre-authentication frames are normal data frames, not port control frames (locally). Fixes: 9b125c279987 ("mac80211: support NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_MAC_ADDRS") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://lore.kernel.org/r/20200224101910.b87da63a3cd6.Ic94bc51a370c4aa7d19fbca9b96d90ab703257dc@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This reverts commit 9b125c27998719288e4dcf2faf54511039526692.

As Jouni points out, there's really no need for this, since the
RSN pre-authentication frames are normal data frames, not port
control frames (locally).

Fixes: 9b125c279987 ("mac80211: support NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_MAC_ADDRS")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200224101910.b87da63a3cd6.Ic94bc51a370c4aa7d19fbca9b96d90ab703257dc@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
cfg80211: remove support for adjacent channel compensation 2020-02-21T19:00:39+00:00 Emmanuel Grumbach emmanuel.grumbach@intel.com 2020-02-14T22:23:38+00:00 7bb106eb689101dc56cc205d5fb4ecf5c0554348 The only driver that used that was iwlwifi and it removed support for this. Remove the feature here as well. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://lore.kernel.org/r/20200214232336.a530de38e511.I393bc395f6037c8cca6421ed550e3072dc248aed@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
The only driver that used that was iwlwifi and it removed
support for this. Remove the feature here as well.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200214232336.a530de38e511.I393bc395f6037c8cca6421ed550e3072dc248aed@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
mac80211: check vif pointer before airtime calculation 2020-02-21T11:11:39+00:00 Johannes Berg johannes.berg@intel.com 2020-02-21T09:45:45+00:00 ca98c47d54d76d2c3f59f8f66530362562914b6b In case of monitor mode injection, vif may be NULL, don't crash on that in ieee80211_calc_expected_tx_airtime(). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://lore.kernel.org/r/20200221104544.dddb7a3568fd.I0ede2733a3c76e95daeab07538449ea847e7b78d@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
In case of monitor mode injection, vif may be NULL, don't crash
on that in ieee80211_calc_expected_tx_airtime().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20200221104544.dddb7a3568fd.I0ede2733a3c76e95daeab07538449ea847e7b78d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>