public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* Kernel oops caused by signed divide
@ 2024-09-09 17:21 Zac Ecob
  2024-09-09 17:27 ` Yonghong Song
  2024-09-09 17:29 ` Alexei Starovoitov
  0 siblings, 2 replies; 16+ messages in thread
From: Zac Ecob @ 2024-09-09 17:21 UTC (permalink / raw)
  To: bpf@vger.kernel.org

Hello,

I recently received a kernel 'oops' about a divide error. 
After some research, it seems that the 'div64_s64' function used for the 'MOD'/'REM' instructions boils down to an 'idiv'.

The 'dividend' is set to INT64_MIN, and the 'divisor' to -1, then because of two's complement, there is no corresponding positive value, causing the error (at least to my understanding).


Apologies if this is already known / not a relevant concern.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-09-10 22:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-09 17:21 Kernel oops caused by signed divide Zac Ecob
2024-09-09 17:27 ` Yonghong Song
2024-09-09 17:29 ` Alexei Starovoitov
2024-09-09 23:47   ` Yonghong Song
2024-09-10 14:21   ` Yonghong Song
2024-09-10 14:44     ` Dave Thaler
2024-09-10 15:18       ` Yonghong Song
2024-09-10 15:21         ` Alexei Starovoitov
2024-09-10 18:12           ` Yonghong Song
2024-09-10 15:21     ` Alexei Starovoitov
2024-09-10 18:02       ` Yonghong Song
2024-09-10 18:25         ` Alexei Starovoitov
2024-09-10 19:32           ` Yonghong Song
2024-09-10 21:53             ` Alexei Starovoitov
2024-09-10 22:00               ` Yonghong Song
2024-09-10 22:43               ` Andrii Nakryiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox