Git Product home page Git Product logo

Comments (6)

supervacuus avatar supervacuus commented on June 20, 2024 1

I'll attach the diff here, you can see for yourself.
crashpad.diff.txt

Thanks. That is a sensible approach; I could imagine merging something like this. We could be even more defensive and open the process with limited access only after we fail with full access. But I like limiting access as long as we don't need it.

There is also a provision there to handle a failure to suspend a thread (for some reason which I did not analyze in depth).

From the docs you linked, the EAC watchdog/supervisor has already suspended threads in the application. In that case, the suspension from the crashpad_handler would fail. So they bypass the error path for threads they already suspended so that the crashpad_handler can take the context snapshots.

from sentry-native.

Swatinem avatar Swatinem commented on June 20, 2024

Integrating changes directly into our fork of crashpad is a good idea. Otherwise, Iā€™m surprised that this did never come up upstream, as I believe there must be other games that use upstream crashpad instead of our fork.
Either way, fixing this upstream or in our fork is definitely a good idea.

It basically limits the permission of created processes and promotes a process when necessary.

Do you have any more details here? Does it restrict the operation of crashpad, or the possibility / fidelity of the collected minidump in any way?

from sentry-native.

kristjanvalur avatar kristjanvalur commented on June 20, 2024

I guess people aren't using crashpad much, but rely on breakpad. This is the default, for example, for your own UE plugin (we are still using our own, which was used as a model for yours, I believe). We want this to get immediate results from CI environments etc.
I'll attach the diff here, you can see for yourself.
crashpad.diff.txt

from sentry-native.

kristjanvalur avatar kristjanvalur commented on June 20, 2024

Basically, it optains a limited handle to the parent process, until such time as it has to examine its stack, when it can promote the handle. The watchdog process prohibits memory access to the process until and if it crashes, at which time it will produce a short time window where the crash handler can access the process memory.
There is also a provision there to handle a failure to suspend a thread (for some reason which I did not analyze in depth).

More info on EAC and crash handlers is here:
https://dev.epicgames.com/docs/game-services/anti-cheat/using-anti-cheat#external-crash-dumpers

from sentry-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.