-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix overflow in ECAL GPU unpacking #39617
Fix overflow in ECAL GPU unpacking #39617
Conversation
enable gpu |
please test |
@thomreis FYI |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-39617/32414
|
A new Pull Request was created by @fwyzard (Andrea Bocci) for master. It involves the following packages:
@mandrenguyen, @clacaputo can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7d83b7/28006/summary.html Comparison Summary@slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
GPU Comparison SummarySummary:
|
Thanks for the fix @fwyzard |
By the way, the code does look like it should be simplified and cleaned up a bit... but the minimal fix should be enough (?) for now. |
I am currently working on unpacking the auxiliary collections and after that we wanted to start the Alpaka migration. Code simplification and cleanup could be done before or after the second task, depending on preference. |
+reconstruction
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
I'd do the clean up after the migration. |
PR description:
Avoid a possible overflow in the ECAL GPU unpacking, that could lead to an out-of-bounds read from invalid memory.
The function
find_next_tower_block()
starts from the next memory location and keeps reading until it finds a valid payload, or it reaches the given trailer. However, there was no check that the initial value is not already at or beyond the trailer, which would result in loop that moves forward until it reaches an invalid memory address.This condition has been observed online, for example
resulting in
These changes will stop the loop if the initial value is at or beyond the trailer.
PR validation:
With these changes the ECAL unpacker runs successfully through 10'000 the error stream events.
If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:
To be backported to 12.4.x and 12.5.x for data taking.