lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 7 Sep 2022 17:46:04 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Brian Norris <briannorris@...omium.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] tracefs: Only clobber mode/uid/gid on remount if
 asked

On Fri, 26 Aug 2022 17:44:17 -0700
Brian Norris <briannorris@...omium.org> wrote:

> Users may have explicitly configured their tracefs permissions; we
> shouldn't overwrite those just because a second mount appeared.
> 
> Only clobber if the options were provided at mount time.
> 
> Note: the previous behavior was especially surprising in the presence of
> automounted /sys/kernel/debug/tracing/.
> 
>   # Don't change /sys/kernel/tracing/ permissions on automount.
>   umount /sys/kernel/debug/tracing/

BTW, I noticed that the above doesn't do anything. That is,
you cannot unmount tracefs from /sys/kernel/debug/tracing.

 # ls /sys/kernel/debug/tracing/
available_events            buffer_total_size_kb   error_log                 hwlat_detector   options         recursed_functions   set_event_notrace_pid   set_ftrace_pid      stack_trace         trace_clock       trace_stat           uprobe_events
available_filter_functions  current_tracer         eval_map                  instances        osnoise         saved_cmdlines       set_event_pid           set_graph_function  stack_trace_filter  trace_marker      tracing_cpumask      uprobe_profile
available_tracers           dynamic_events         events                    kprobe_events    per_cpu         saved_cmdlines_size  set_ftrace_filter       set_graph_notrace   synthetic_events    trace_marker_raw  tracing_max_latency  user_events_data
buffer_percent              dyn_ftrace_total_info  free_buffer               kprobe_profile   printk_formats  saved_tgids          set_ftrace_notrace      snapshot            timestamp_mode      trace_options     tracing_on           user_events_status
buffer_size_kb              enabled_functions      function_profile_enabled  max_graph_depth  README          set_event            set_ftrace_notrace_pid  stack_max_size      trace               trace_pipe        tracing_thresh

  # umount /sys/kernel/debug/tracing/

  # ls /sys/kernel/debug/tracing/
available_events            buffer_total_size_kb   error_log                 hwlat_detector   options         recursed_functions   set_event_notrace_pid   set_ftrace_pid      stack_trace         trace_clock       trace_stat           uprobe_events
available_filter_functions  current_tracer         eval_map                  instances        osnoise         saved_cmdlines       set_event_pid           set_graph_function  stack_trace_filter  trace_marker      tracing_cpumask      uprobe_profile
available_tracers           dynamic_events         events                    kprobe_events    per_cpu         saved_cmdlines_size  set_ftrace_filter       set_graph_notrace   synthetic_events    trace_marker_raw  tracing_max_latency  user_events_data
buffer_percent              dyn_ftrace_total_info  free_buffer               kprobe_profile   printk_formats  saved_tgids          set_ftrace_notrace      snapshot            timestamp_mode      trace_options     tracing_on           user_events_status
buffer_size_kb              enabled_functions      function_profile_enabled  max_graph_depth  README          set_event            set_ftrace_notrace_pid  stack_max_size      trace               trace_pipe        tracing_thresh


-- Steve



>   stat /sys/kernel/debug/tracing/.
> 
>   # Don't change /sys/kernel/tracing/ permissions.
>   mount -t tracefs none /mnt/foo
> 
>   # Change /sys/kernel/tracing/ mode and uid, but not gid.
>   mount -t tracefs -o uid=bar,mode=0750 none /mnt/baz
> 
> Signed-off-by: Brian Norris <briannorris@...omium.org>
> ---
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ