[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #20283 [Applications/Tor Browser]: Tor Browser should run without a `/proc` filesystem.



#20283: Tor Browser should run without a `/proc` filesystem.
--------------------------------------+---------------------------
 Reporter:  yawning                   |          Owner:  pospeselr
     Type:  defect                    |         Status:  assigned
 Priority:  Medium                    |      Milestone:
Component:  Applications/Tor Browser  |        Version:
 Severity:  Normal                    |     Resolution:
 Keywords:  tbb-sandboxing            |  Actual Points:
Parent ID:  #20773                    |         Points:
 Reviewer:                            |        Sponsor:
--------------------------------------+---------------------------

Comment (by cypherpunks):

 From conversation with pospeselr:

 I suspect that glibc relies on /proc only for the initial thread.  It is
 possible that for the initial thread you can get the stack base address
 and size using getcontext(2).  In particular, if pthread_getattr_np fails
 or pthread_attr_getstack returns null, and the thread in question is the
 process's initial thread, then it is possible that

 {{{
 ucontext_t uc;
 void *base;
 size_t size;

 if (getcontext(&uc) == -1)
         err(1, "getcontext");
 base = uc.uc_stack.ss_sp;
 size = uc.uc_stack.ss_size;
 }}}

 will recover the stack base address and size that you want.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20283#comment:16>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs