Skip to content
  • Hjem
  • Seneste
  • Etiketter
  • Populære
  • Verden
  • Bruger
  • Grupper
Temaer
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Kollaps
FARVEL BIG TECH
  1. Forside
  2. Ikke-kategoriseret
  3. just learned about this project erjic that does seccomp+bwrap sandboxing https://codeberg.org/prisixia/erjic the interface is really nicely designed and i believe will fit the needs of my build system perfectly

just learned about this project erjic that does seccomp+bwrap sandboxing https://codeberg.org/prisixia/erjic the interface is really nicely designed and i believe will fit the needs of my build system perfectly

Planlagt Fastgjort Låst Flyttet Ikke-kategoriseret
90 Indlæg 17 Posters 9 Visninger
  • Ældste til nyeste
  • Nyeste til ældste
  • Most Votes
Svar
  • Svar som emne
Login for at svare
Denne tråd er blevet slettet. Kun brugere med emne behandlings privilegier kan se den.
  • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

    just learned about this project erjic that does seccomp+bwrap sandboxing https://codeberg.org/prisixia/erjic the interface is really nicely designed and i believe will fit the needs of my build system perfectly

    tris@chaos.socialT This user is from outside of this forum
    tris@chaos.socialT This user is from outside of this forum
    tris@chaos.social
    wrote sidst redigeret af
    #27

    @hipsterelectron Have you seen https://gitlab.exherbo.org/sydbox/sydbox ? xD

    1 Reply Last reply
    0
    • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

      these are not the kind of analogies introduced in high school physics, which describe ballistic trajectories without air resistance or gravitational potential difference or the curvature of the earth. the OS executable interpreter is literally a package manager and the libc dynamic linker is also literally a manage manager.

      the OS in particular is notable because it maps a binary executable into a format suitable for the MMU and instruction stream required by the CPU. the compiler is of course complicit in this—the ELF format is translated by the kernel into an instruction stream for the CPU. during this process the data is read from the filesystem into RAM, because the CPU operates upon RAM.

      hipsterelectron@circumstances.runH This user is from outside of this forum
      hipsterelectron@circumstances.runH This user is from outside of this forum
      hipsterelectron@circumstances.run
      wrote sidst redigeret af
      #28

      every phone and desktop OS i know of employs a concept of memory paging which conflates the filesystem and active memory, which is why shared libraries (including the libc itself) are so useful—when the process needs to execute some generic operation, the CPU instruction pointer (translated by the MMU, which is configured by the OS) can jump into a page shared across multiple processes. since the instruction pointer can only operate over data (aka "code") in RAM, sharing that data means less memory is needed to execute multiple processes at once.

      hipsterelectron@circumstances.runH 1 Reply Last reply
      0
      • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

        every phone and desktop OS i know of employs a concept of memory paging which conflates the filesystem and active memory, which is why shared libraries (including the libc itself) are so useful—when the process needs to execute some generic operation, the CPU instruction pointer (translated by the MMU, which is configured by the OS) can jump into a page shared across multiple processes. since the instruction pointer can only operate over data (aka "code") in RAM, sharing that data means less memory is needed to execute multiple processes at once.

        hipsterelectron@circumstances.runH This user is from outside of this forum
        hipsterelectron@circumstances.runH This user is from outside of this forum
        hipsterelectron@circumstances.run
        wrote sidst redigeret af
        #29

        i am forcing myself not to derail into a discussion of task scheduling, but "multiple processes at once" does in fact specifically mean multiple live processes executing in parallel through some form of timesharing mechanism (i ignore kernel threads here). the essentially round-robin preemption model with process-specific nice values (ignoring threads) used by linux and all BSDs i know of wants to share as much memory as possible across processes, because at all times it is trying to execute them all at once.

        that's kind of a strange assumption, isn't it?

        hipsterelectron@circumstances.runH 1 Reply Last reply
        0
        • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

          previously (in conversation with junyer, the late RE2 maintainer) i had arrived upon the motto "build xor pkg" (see e.g. https://circumstances.run/@hipsterelectron/115241855909691763) to codify what (imho) pants and spack do right: separating packaging concerns from build concerns:

          • a package manager (pip, spack, npm, poetry, and every linux distro) describes relationships across codebases (and therefore necessarily defines an interdependent ecosystem).
          • a build tool covers one specific codebase. it is a tool for maintainers to describe their code, to develop the code, and to generate release artifacts (which are definitionally consumed by package managers).
          c0dec0dec0de@hachyderm.ioC This user is from outside of this forum
          c0dec0dec0de@hachyderm.ioC This user is from outside of this forum
          c0dec0dec0de@hachyderm.io
          wrote sidst redigeret af
          #30

          @hipsterelectron so, where does this philosophy place CPack and rpmbuild, respectively?
          As a person who writes software and uses CMake as a build system and also has to package (and rebuild) other people’s software with rpmbuild, I have _opinions_.

          1 Reply Last reply
          0
          • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

            i am forcing myself not to derail into a discussion of task scheduling, but "multiple processes at once" does in fact specifically mean multiple live processes executing in parallel through some form of timesharing mechanism (i ignore kernel threads here). the essentially round-robin preemption model with process-specific nice values (ignoring threads) used by linux and all BSDs i know of wants to share as much memory as possible across processes, because at all times it is trying to execute them all at once.

            that's kind of a strange assumption, isn't it?

            hipsterelectron@circumstances.runH This user is from outside of this forum
            hipsterelectron@circumstances.runH This user is from outside of this forum
            hipsterelectron@circumstances.run
            wrote sidst redigeret af
            #31

            once you execute a process (via execvlp(), or posix_spawn(), or whatever) it's immediately off to the races! that process is added to the big soup of other processes. you can't even stop it without sending a signal—which doesn't pause it, but kills it. the process itself needs to decide to open up a semaphore or pipe you gave it in order to pause its execution.

            think about it: isn't this a form of cooperative scheduling? when you can't rein in a subprocess except by killing it entirely? how often do you genuinely want a subprocess to execute however long it wants—unless you yourself control the code and force it to yield?

            hipsterelectron@circumstances.runH pounce@nyan.networkP navi@social.vlhl.devN 3 Replies Last reply
            0
            • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

              once you execute a process (via execvlp(), or posix_spawn(), or whatever) it's immediately off to the races! that process is added to the big soup of other processes. you can't even stop it without sending a signal—which doesn't pause it, but kills it. the process itself needs to decide to open up a semaphore or pipe you gave it in order to pause its execution.

              think about it: isn't this a form of cooperative scheduling? when you can't rein in a subprocess except by killing it entirely? how often do you genuinely want a subprocess to execute however long it wants—unless you yourself control the code and force it to yield?

              hipsterelectron@circumstances.runH This user is from outside of this forum
              hipsterelectron@circumstances.runH This user is from outside of this forum
              hipsterelectron@circumstances.run
              wrote sidst redigeret af
              #32

              we will now terminate this tangent, but the point of this is: shared libraries (a packaging mechanism) are motivated by sharing memory among parallel process executions. your hardworking beloved distro packager is able to package software to use shared libraries (they "control the code" in that sense) as much as possible, in order to enable their end users to use the OS efficiently in unexpected ways (watching videos, making music, building LLVM).

              hipsterelectron@circumstances.runH d_rift@beige.partyD 2 Replies Last reply
              0
              • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                once you execute a process (via execvlp(), or posix_spawn(), or whatever) it's immediately off to the races! that process is added to the big soup of other processes. you can't even stop it without sending a signal—which doesn't pause it, but kills it. the process itself needs to decide to open up a semaphore or pipe you gave it in order to pause its execution.

                think about it: isn't this a form of cooperative scheduling? when you can't rein in a subprocess except by killing it entirely? how often do you genuinely want a subprocess to execute however long it wants—unless you yourself control the code and force it to yield?

                pounce@nyan.networkP This user is from outside of this forum
                pounce@nyan.networkP This user is from outside of this forum
                pounce@nyan.network
                wrote sidst redigeret af
                #33
                @hipsterelectron yeah as an osdever this bugs me
                memory entitlement and processor scheduling are capabilities that should be controlled by the parent and not the child
                1 Reply Last reply
                0
                • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                  we will now terminate this tangent, but the point of this is: shared libraries (a packaging mechanism) are motivated by sharing memory among parallel process executions. your hardworking beloved distro packager is able to package software to use shared libraries (they "control the code" in that sense) as much as possible, in order to enable their end users to use the OS efficiently in unexpected ways (watching videos, making music, building LLVM).

                  hipsterelectron@circumstances.runH This user is from outside of this forum
                  hipsterelectron@circumstances.runH This user is from outside of this forum
                  hipsterelectron@circumstances.run
                  wrote sidst redigeret af
                  #34

                  this is another reason why distro package managers almost always support at most one version of any package at any time across the system—the distro package manager is a tool to maintain the user's system, and the distro packagers build the entire dependency graph together. a distro is a monorepo, and the package manager is their build tool.

                  hipsterelectron@circumstances.runH 2 Replies Last reply
                  0
                  • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                    once you execute a process (via execvlp(), or posix_spawn(), or whatever) it's immediately off to the races! that process is added to the big soup of other processes. you can't even stop it without sending a signal—which doesn't pause it, but kills it. the process itself needs to decide to open up a semaphore or pipe you gave it in order to pause its execution.

                    think about it: isn't this a form of cooperative scheduling? when you can't rein in a subprocess except by killing it entirely? how often do you genuinely want a subprocess to execute however long it wants—unless you yourself control the code and force it to yield?

                    navi@social.vlhl.devN This user is from outside of this forum
                    navi@social.vlhl.devN This user is from outside of this forum
                    navi@social.vlhl.dev
                    wrote sidst redigeret af
                    #35
                    @hipsterelectron uh but SIGSTOP and SIGCONT do stop/continue a process without killing it

                    arbitrary code you don't control might not deal with that well (e.g. a wayland program would miss the keep-alive pings, or something that uses timers would have the timer signals queue up), but they're there
                    navi@social.vlhl.devN 1 Reply Last reply
                    0
                    • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                      this is another reason why distro package managers almost always support at most one version of any package at any time across the system—the distro package manager is a tool to maintain the user's system, and the distro packagers build the entire dependency graph together. a distro is a monorepo, and the package manager is their build tool.

                      hipsterelectron@circumstances.runH This user is from outside of this forum
                      hipsterelectron@circumstances.runH This user is from outside of this forum
                      hipsterelectron@circumstances.run
                      wrote sidst redigeret af
                      #36

                      ( cc @ireneista @SRAZKVT this is intentionally handwavey but i'm working on it )

                      1 Reply Last reply
                      0
                      • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                        we will now terminate this tangent, but the point of this is: shared libraries (a packaging mechanism) are motivated by sharing memory among parallel process executions. your hardworking beloved distro packager is able to package software to use shared libraries (they "control the code" in that sense) as much as possible, in order to enable their end users to use the OS efficiently in unexpected ways (watching videos, making music, building LLVM).

                        d_rift@beige.partyD This user is from outside of this forum
                        d_rift@beige.partyD This user is from outside of this forum
                        d_rift@beige.party
                        wrote sidst redigeret af
                        #37

                        @hipsterelectron this tangent is a subprocess.

                        1 Reply Last reply
                        0
                        • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                          this is another reason why distro package managers almost always support at most one version of any package at any time across the system—the distro package manager is a tool to maintain the user's system, and the distro packagers build the entire dependency graph together. a distro is a monorepo, and the package manager is their build tool.

                          hipsterelectron@circumstances.runH This user is from outside of this forum
                          hipsterelectron@circumstances.runH This user is from outside of this forum
                          hipsterelectron@circumstances.run
                          wrote sidst redigeret af
                          #38

                          in fact, it's completely possible to use distinct library versions across subgraphs of a dependency graph. this is, crucially, something both pants and spack support!

                          it's more impressive in spack, which incorporates this into dependency solving, whereas pants simply lets you declare multiple dependency versions with separate names (and then subprojects just depend upon the one they need). this is absolutely crucial for corporate monorepos like twitter inc, where multiple teams work on completely separate projects that don't communicate with each other. imposing a single version of a dependency means you have to migrate the whole repo at once before anyone can upgrade. it's a complete fucking disaster

                          tomzalt@mastodon.socialT hipsterelectron@circumstances.runH 2 Replies Last reply
                          0
                          • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                            in fact, it's completely possible to use distinct library versions across subgraphs of a dependency graph. this is, crucially, something both pants and spack support!

                            it's more impressive in spack, which incorporates this into dependency solving, whereas pants simply lets you declare multiple dependency versions with separate names (and then subprojects just depend upon the one they need). this is absolutely crucial for corporate monorepos like twitter inc, where multiple teams work on completely separate projects that don't communicate with each other. imposing a single version of a dependency means you have to migrate the whole repo at once before anyone can upgrade. it's a complete fucking disaster

                            tomzalt@mastodon.socialT This user is from outside of this forum
                            tomzalt@mastodon.socialT This user is from outside of this forum
                            tomzalt@mastodon.social
                            wrote sidst redigeret af
                            #39

                            @hipsterelectron was the single version really such a downside at Twitter? Want to hear you perspective from EE side.

                            From Data Platform I helped many times with the typical suspects, jackson, guava and other libraries messing everything up. We had the main issue of Hadoop being outside of the monorepo and having surprise runtime dependencies and failures and during my time we switched every to classpath isolation. I felt we were the “pain sponges” and that was good.

                            tomzalt@mastodon.socialT 1 Reply Last reply
                            0
                            • navi@social.vlhl.devN navi@social.vlhl.dev
                              @hipsterelectron uh but SIGSTOP and SIGCONT do stop/continue a process without killing it

                              arbitrary code you don't control might not deal with that well (e.g. a wayland program would miss the keep-alive pings, or something that uses timers would have the timer signals queue up), but they're there
                              navi@social.vlhl.devN This user is from outside of this forum
                              navi@social.vlhl.devN This user is from outside of this forum
                              navi@social.vlhl.dev
                              wrote sidst redigeret af
                              #40
                              @hipsterelectron tbh a shell's job control relies on somewhat on multi-process preemptive multitasking

                              background jobs can be stopped and continued, not just by direct SIGSTOP/SIGCONT (`command &` and `bg`) , but also by trying to read from the tty while not being in the foreground (causes SIGTTIN) -- that also causes it to stop until it's the foreground process (via `fg`)
                              1 Reply Last reply
                              0
                              • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                                in fact, it's completely possible to use distinct library versions across subgraphs of a dependency graph. this is, crucially, something both pants and spack support!

                                it's more impressive in spack, which incorporates this into dependency solving, whereas pants simply lets you declare multiple dependency versions with separate names (and then subprojects just depend upon the one they need). this is absolutely crucial for corporate monorepos like twitter inc, where multiple teams work on completely separate projects that don't communicate with each other. imposing a single version of a dependency means you have to migrate the whole repo at once before anyone can upgrade. it's a complete fucking disaster

                                hipsterelectron@circumstances.runH This user is from outside of this forum
                                hipsterelectron@circumstances.runH This user is from outside of this forum
                                hipsterelectron@circumstances.run
                                wrote sidst redigeret af
                                #41

                                bazel doesn't support this, because google hates you. nix and guix also don't support this—but recall that nix and guix are actually distros, and distros benefit from system software sharing library versions (nix and guix can i believe have multiple versions of a library across dependency subgraphs—cc @alina is that right?).

                                bazel is unusable as a monorepo build system for this reason, and the google codebase is full of known vulnerabilities from millions of vendored copies of open source code that are never maintained or updated. that's how engineers are forced to deal with build systems that fail to describe the communication structure between subprojects—i.e. the human communication mechanisms within a corporation.

                                hipsterelectron@circumstances.runH 1 Reply Last reply
                                0
                                • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                                  bazel doesn't support this, because google hates you. nix and guix also don't support this—but recall that nix and guix are actually distros, and distros benefit from system software sharing library versions (nix and guix can i believe have multiple versions of a library across dependency subgraphs—cc @alina is that right?).

                                  bazel is unusable as a monorepo build system for this reason, and the google codebase is full of known vulnerabilities from millions of vendored copies of open source code that are never maintained or updated. that's how engineers are forced to deal with build systems that fail to describe the communication structure between subprojects—i.e. the human communication mechanisms within a corporation.

                                  hipsterelectron@circumstances.runH This user is from outside of this forum
                                  hipsterelectron@circumstances.runH This user is from outside of this forum
                                  hipsterelectron@circumstances.run
                                  wrote sidst redigeret af
                                  #42

                                  imho, guix especially but also nix have more powerful dependency structures than the typical distro methodology, and this is why users are encouraged to extend package recipes themselves, instead of imposing a stark distinction between distro packagers and end users.

                                  this is wonderful in some ways. but like the lockfile PEP, it also tasks end users to develop the specialized expertise of a distro packager, who is tasked with carefully understanding changes across a dependency graph. guix and nix have configuration languages and introspection tools for this purpose, but tooling cannot replace expertise and judgement!

                                  hipsterelectron@circumstances.runH 1 Reply Last reply
                                  0
                                  • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                                    imho, guix especially but also nix have more powerful dependency structures than the typical distro methodology, and this is why users are encouraged to extend package recipes themselves, instead of imposing a stark distinction between distro packagers and end users.

                                    this is wonderful in some ways. but like the lockfile PEP, it also tasks end users to develop the specialized expertise of a distro packager, who is tasked with carefully understanding changes across a dependency graph. guix and nix have configuration languages and introspection tools for this purpose, but tooling cannot replace expertise and judgement!

                                    hipsterelectron@circumstances.runH This user is from outside of this forum
                                    hipsterelectron@circumstances.runH This user is from outside of this forum
                                    hipsterelectron@circumstances.run
                                    wrote sidst redigeret af
                                    #43

                                    recall "b2b vs b2c"—this distinction can also be observed cryptographically. the standard distro model (where heroes like mgorny or q66 go through hell so you don't have to) also enables them to sign kernel and package build artifacts with a private key. that cryptographic signature codifies trust: "i personally have verified this is safe, with my expertise as an engineer and my love for the user". and if there's a problem, their reputation is on the line.

                                    hipsterelectron@circumstances.runH 1 Reply Last reply
                                    0
                                    • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                                      recall "b2b vs b2c"—this distinction can also be observed cryptographically. the standard distro model (where heroes like mgorny or q66 go through hell so you don't have to) also enables them to sign kernel and package build artifacts with a private key. that cryptographic signature codifies trust: "i personally have verified this is safe, with my expertise as an engineer and my love for the user". and if there's a problem, their reputation is on the line.

                                      hipsterelectron@circumstances.runH This user is from outside of this forum
                                      hipsterelectron@circumstances.runH This user is from outside of this forum
                                      hipsterelectron@circumstances.run
                                      wrote sidst redigeret af
                                      #44

                                      where do you draw that line, in a model which fails to distinguish between distro and user? forget mathematics—where can you even provide a statement of trust? who verifies safety?

                                      nix and guix have landed upon "reproducibility" to answer this, where guix is imho much more thoughtful and ahierarchical about it. this particular cryptographic definition of "reproducibility" requires absolute bit-for-bit matching, across the whole dependency graph. there is no room for configuration—not without forking a whole subgraph.

                                      hipsterelectron@circumstances.runH 1 Reply Last reply
                                      0
                                      • hipsterelectron@circumstances.runH hipsterelectron@circumstances.run

                                        where do you draw that line, in a model which fails to distinguish between distro and user? forget mathematics—where can you even provide a statement of trust? who verifies safety?

                                        nix and guix have landed upon "reproducibility" to answer this, where guix is imho much more thoughtful and ahierarchical about it. this particular cryptographic definition of "reproducibility" requires absolute bit-for-bit matching, across the whole dependency graph. there is no room for configuration—not without forking a whole subgraph.

                                        hipsterelectron@circumstances.runH This user is from outside of this forum
                                        hipsterelectron@circumstances.runH This user is from outside of this forum
                                        hipsterelectron@circumstances.run
                                        wrote sidst redigeret af
                                        #45

                                        bit-for-bit matching is, impressively, actually achievable, despite lack of OS support for filesystem transactions. it can be achieved by isolating a build process within a virtualized directory (i believe both nix and guix use FUSE—cc @janneke is this true?). FUSE lets you achieve any number of guarantees the kernel and filesystem provide no API for. however, it indicates a flaw in POSIX and linux.

                                        as is typical with linux, sandboxing like this is very difficult without requiring root, but recall that nix and guix are distros—the distro naturally requires root. however, this also means a codebase cannot provide a guix recipe for non-guix systems—a portable codebase must support some other build system (i like meson and automake).

                                        hipsterelectron@circumstances.runH janneke@todon.nlJ c0dec0dec0de@hachyderm.ioC 3 Replies Last reply
                                        0
                                        • tomzalt@mastodon.socialT tomzalt@mastodon.social

                                          @hipsterelectron was the single version really such a downside at Twitter? Want to hear you perspective from EE side.

                                          From Data Platform I helped many times with the typical suspects, jackson, guava and other libraries messing everything up. We had the main issue of Hadoop being outside of the monorepo and having surprise runtime dependencies and failures and during my time we switched every to classpath isolation. I felt we were the “pain sponges” and that was good.

                                          tomzalt@mastodon.socialT This user is from outside of this forum
                                          tomzalt@mastodon.socialT This user is from outside of this forum
                                          tomzalt@mastodon.social
                                          wrote sidst redigeret af
                                          #46

                                          @hipsterelectron at Netflix in the ML Platform the freedom of dependencies was an absolute nightmare in JVM world. Everything was service based but implying client libraries with heavy dependency trees. In ML you want every input you can get your hands on, so bring the entire universe together. Then you want to apply ML everywhere, thus take the whole universe everywhere else. Every single project with so much gradle boilerplate to resolve same issue all the time.

                                          tomzalt@mastodon.socialT 1 Reply Last reply
                                          0
                                          Svar
                                          • Svar som emne
                                          Login for at svare
                                          • Ældste til nyeste
                                          • Nyeste til ældste
                                          • Most Votes


                                          • Log ind

                                          • Har du ikke en konto? Tilmeld

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          Graciously hosted by data.coop
                                          • First post
                                            Last post
                                          0
                                          • Hjem
                                          • Seneste
                                          • Etiketter
                                          • Populære
                                          • Verden
                                          • Bruger
                                          • Grupper