mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge bitcoin/bitcoin#27896: Remove the syscall sandbox
32e2ffc393Remove the syscall sandbox (fanquake) Pull request description: After initially being merged in #20487, it's no-longer clear that an internal syscall sandboxing mechanism is something that Bitcoin Core should have/maintain, especially when compared to better maintained/supported alterantives, i.e [firejail](https://github.com/netblue30/firejail). There is more related discussion in #24771. Note that given where it's used, the sandbox also gets dragged into the kernel. If it's removed, this should not require any sort of deprecation, as this was only ever an opt-in, experimental feature. Closes #24771. ACKs for top commit: davidgumberg: crACK https://github.com/bitcoin/bitcoin/pull/27896/commits/32e2ffc39374f61bb2435da507f285459985df9e achow101: ACK32e2ffc393dergoegge: ACK32e2ffc393Tree-SHA512: 8cf71c5623bb642cb515531d4a2545d806e503b9d57bfc15a996597632b06103d60d985fd7f843a3c1da6528bc38d0298d6b8bcf0be6f851795a8040d71faf16
This commit is contained in:
commit
caff95a023
28 changed files with 5 additions and 1175 deletions
|
|
@ -30,7 +30,6 @@
|
|||
#include <util/fs.h>
|
||||
#include <util/sock.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/syscall_sandbox.h>
|
||||
#include <util/thread.h>
|
||||
#include <util/threadinterrupt.h>
|
||||
#include <util/trace.h>
|
||||
|
|
@ -1381,7 +1380,6 @@ void CConnman::ThreadSocketHandler()
|
|||
{
|
||||
AssertLockNotHeld(m_total_bytes_sent_mutex);
|
||||
|
||||
SetSyscallSandboxPolicy(SyscallSandboxPolicy::NET);
|
||||
while (!interruptNet)
|
||||
{
|
||||
DisconnectNodes();
|
||||
|
|
@ -1401,7 +1399,6 @@ void CConnman::WakeMessageHandler()
|
|||
|
||||
void CConnman::ThreadDNSAddressSeed()
|
||||
{
|
||||
SetSyscallSandboxPolicy(SyscallSandboxPolicy::INITIALIZATION_DNS_SEED);
|
||||
FastRandomContext rng;
|
||||
std::vector<std::string> seeds = Params().DNSSeeds();
|
||||
Shuffle(seeds.begin(), seeds.end(), rng);
|
||||
|
|
@ -1607,7 +1604,6 @@ std::unordered_set<Network> CConnman::GetReachableEmptyNetworks() const
|
|||
void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
|
||||
{
|
||||
AssertLockNotHeld(m_unused_i2p_sessions_mutex);
|
||||
SetSyscallSandboxPolicy(SyscallSandboxPolicy::NET_OPEN_CONNECTION);
|
||||
FastRandomContext rng;
|
||||
// Connect to specific addresses
|
||||
if (!connect.empty())
|
||||
|
|
@ -1976,7 +1972,6 @@ std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo() const
|
|||
void CConnman::ThreadOpenAddedConnections()
|
||||
{
|
||||
AssertLockNotHeld(m_unused_i2p_sessions_mutex);
|
||||
SetSyscallSandboxPolicy(SyscallSandboxPolicy::NET_ADD_CONNECTION);
|
||||
while (true)
|
||||
{
|
||||
CSemaphoreGrant grant(*semAddnode);
|
||||
|
|
@ -2045,7 +2040,6 @@ void CConnman::ThreadMessageHandler()
|
|||
{
|
||||
LOCK(NetEventsInterface::g_msgproc_mutex);
|
||||
|
||||
SetSyscallSandboxPolicy(SyscallSandboxPolicy::MESSAGE_HANDLER);
|
||||
while (!flagInterruptMsgProc)
|
||||
{
|
||||
bool fMoreWork = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue