<div dir="ltr"><div><div>using a word like "root" is disingenuous. almost all JACK instances belong to a user who is the only one to run processes who access the server. and every single one of those processes can stomp on memory used by the others.<br><br></div>symbol visibility in unix libraries has been a historical weak spot. gcc makes all symbols visible by default (opposite of MS-based compilers).<br><br></div>i'm happy to accept a patch that fixes visibility, but i'm not interested in continuing discussion of the scope or details about it.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 16, 2015 at 5:29 PM, Tito Latini <span dir="ltr"><<a href="mailto:tito.01beta@gmail.com" target="_blank">tito.01beta@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Mar 16, 2015 at 01:22:56PM -0500, Paul Davis wrote:<br>
> Although their export is a mistake, I really don't see this as of any<br>
> particular importance.<br>
><br>
> JACK is almost always a per-user system. JACK also allows clients to<br>
> scribble all over each other ports. The fact that someone can write an<br>
> application which does this is really not much of an issue compared to that.<br>
<br>
</span>live coding over net is trendy and there are tools linked to libjack,<br>
often with the possibility to call foreign functions. In this context,<br>
an user without particular privileges could cause a crash to the root.<br>
<br>
Regardless, to complete the report, the hidden functions are:<br>
<br>
cleanup_mlock                        default_jack_error_callback<br>
default_jack_info_callback           jack_attach_port_segment<br>
jack_attach_shm                      jack_call_sync_client<br>
jack_call_timebase_master            jack_cleanup_shm<br>
jack_client_alloc                    jack_client_alloc_internal<br>
jack_client_deliver_request          jack_client_fix_port_buffers<br>
jack_client_handle_latency_callback  jack_client_handle_port_connection<br>
jack_client_handle_session_callback  jack_client_open_aux<br>
jack_clock_source_name               jack_default_server_name<br>
jack_destroy_shm                     jack_event_type_name<br>
jack_generate_unique_id              jack_get_all_descriptions<br>
jack_get_description                 jack_get_free_shm_info<br>
jack_get_mhz                         jack_get_microseconds_from_cycles<br>
jack_get_microseconds_from_system    jack_get_port_functions<br>
jack_get_process_done_fd             jack_hpet_init<br>
jack_init_time                       jack_initialize_shm<br>
jack_internal_client_load_aux        jack_messagebuffer_add<br>
jack_messagebuffer_exit              jack_messagebuffer_init<br>
jack_messagebuffer_thread_init       jack_midi_internal_event_size<br>
jack_pool_alloc                      jack_pool_release<br>
jack_port_by_id_int                  jack_port_by_name_int<br>
jack_port_name_equals                jack_port_new<br>
jack_port_type_buffer_size           jack_register_server<br>
jack_release_shm                     jack_release_shm_info<br>
jack_resize_shm                      jack_server_dir<br>
jack_set_clock_source                jack_shmalloc<br>
jack_start_freewheel                 jack_stop_freewheel<br>
jack_transport_copy_position         jack_unregister_server<br>
jack_user_dir                        silent_jack_error_callback<br>
start_server<br>
<br>
<br>
(obtained with the follow imperfect script, useful to discover<br>
exported internal functions also in other non-stripped libraries)<br>
<br>
<br>
#!/bin/bash<br>
# Discover JACK's hidden functions.<br>
#<br>
# example:<br>
# ./jack_hidden_functions /usr/lib64/libjack.so /usr/include/jack/*<br>
#<br>
<br>
find_headers()<br>
{<br>
        local fname="$1"<br>
        shift<br>
        sed -n '/[^A-Za-z0-9_]*'"${fname}"'[^A-Za-z0-9_]/{\_^[ \t]*/\?\*_d;\_^[ \t]*//_d;p}' "$@"<br>
}<br>
<br>
globl_without_header()<br>
{<br>
        while read lib; do<br>
                [ -z "$(find_headers ${lib} "$@" | head -1)" ] && echo "${lib}"<br>
        done<br>
}<br>
<br>
main()<br>
{<br>
        if [ ! -f "$1" -o ! -f "$2" ]; then<br>
                echo "Usage: $(basename $0) <libfile> <hfile> [hfile...]"<br>
                exit 2<br>
        fi<br>
<br>
        local libpath="$1"<br>
        shift<br>
        nm "${libpath}" | awk '$2 == "T" {print $3}' | globl_without_header "$@"<br>
}<br>
<br>
main "$@"<br>
</blockquote></div><br></div>