{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":78370639,"defaultBranch":"main","name":"rbpf","ownerLogin":"qmonnet","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2017-01-08T21:09:07.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/17001771?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1710418119.0","currentOid":""},"activityList":{"items":[{"before":"50a8fbaacc887c49791255a318a5f3d005547a5e","after":"17353e3b2f82c186a0394e3ea77421a856a1deda","ref":"refs/heads/main","pushedAt":"2024-05-02T07:52:04.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"src/ebpf.rs: Increase instruction limit to 1 million\n\nThe linux kernel allows programs of 1 million instructions, see\n\nhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c04c0d2b968ac45d6ef020316808ef6c82325a82\n\nI'm hitting the 4096 limit in some corner cases with\nhttps://github.com/seanyoung/cir, if the infrared protocol is very\ncomplex (e.g. XMP). rbpf is used for testing the generated IR decoders\nin the test framework.\n\nSigned-off-by: Sean Young ","shortMessageHtmlLink":"src/ebpf.rs: Increase instruction limit to 1 million"}},{"before":"3e80ed720a6e25e7fcad2b801ca388aa909cc6ff","after":"50a8fbaacc887c49791255a318a5f3d005547a5e","ref":"refs/heads/main","pushedAt":"2024-04-23T09:31:12.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"README.md: Update link referencing JIT\n\nThe link has expired and the author changed name, let's update the\nreference.\n\nSigned-off-by: 60ke \nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"README.md: Update link referencing JIT"}},{"before":"19a2be85e7bae4115eccb979551a869bffca9abc","after":null,"ref":"refs/heads/arsh-fix-tests","pushedAt":"2024-03-15T12:11:18.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"}},{"before":"adea893e1881a2c077f825a5d3c93816e5941dba","after":"3e80ed720a6e25e7fcad2b801ca388aa909cc6ff","ref":"refs/heads/main","pushedAt":"2024-03-15T12:11:17.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"src/interpreter: Remove/explain masks for 32-bit shift operations\n\nWe recently fixed the 64-bit arithmetic shift-right operations by adding\na mask to the number of bits (as immediates or from the source register)\nby which to shift, as per the eBPF ISA specification. The 32-bit\noperations must use the same mask, but .wrapping_shr() already takes\ncare of it for us. Let's add a comment to make it explicit.\n\nAs it turns out, masking is just as well unnecessary for the\nnon-arithmetic left-right shift operations that we tried to fix\nrecently. Let's also remove the mask there.\n\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"src/interpreter: Remove/explain masks for 32-bit shift operations"}},{"before":"4d9af4e4afeb31546c65c0b58bb3efc0d0d1f4b5","after":"19a2be85e7bae4115eccb979551a869bffca9abc","ref":"refs/heads/arsh-fix-tests","pushedAt":"2024-03-15T11:51:33.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"src/interpreter: Remove/explain masks for 32-bit shift operations\n\nWe recently fixed the 64-bit arithmetic shift-right operations by adding\na mask to the number of bits (as immediates or from the source register)\nby which to shift, as per the eBPF ISA specification. The 32-bit\noperations must use the same mask, but .wrapping_shr() already takes\ncare of it for us. Let's add a comment to make it explicit.\n\nAs it turns out, masking is just as well unnecessary for the\nnon-arithmetic left-right shift operations that we tried to fix\nrecently. Let's also remove the mask there.\n\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"src/interpreter: Remove/explain masks for 32-bit shift operations"}},{"before":"505d54afa4df47dd700f52039234a7a0f998cf1d","after":"adea893e1881a2c077f825a5d3c93816e5941dba","ref":"refs/heads/main","pushedAt":"2024-03-15T11:41:21.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"src/interpreter.rs: Fix arithmetic left/right shift implementation (mask offset)\n\nWe mask the mask offset for arithmetic shifts operaitons. The current\nversion of the BPF Instruction Set Specification specifies that\n\"Shift operations use a mask of 0x3F (63) for 64-bit operations and\n0x1F (31) for 32-bit operations\" [0].\n\n[0]: https://www.ietf.org/archive/id/draft-thaler-bpf-isa-02.html#section-3.1-2.2.16.1.1\n\nSigned-off-by: ret2happy ","shortMessageHtmlLink":"src/interpreter.rs: Fix arithmetic left/right shift implementation (m…"}},{"before":"238e048614b4533487d8322ec528be90681cfa68","after":null,"ref":"refs/heads/pr/unused-imports","pushedAt":"2024-03-14T12:08:39.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"}},{"before":"21b2e418e05c83b283c3d4961a8cd86db57d6786","after":"505d54afa4df47dd700f52039234a7a0f998cf1d","ref":"refs/heads/main","pushedAt":"2024-03-14T12:08:36.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"src: Remove unused imports raised by linter\n\nI observed the following warning while running the tests, let's address\nthem:\n\n warning: the item `time` is imported redundantly\n --> src/helpers.rs:22:5\n |\n 22 | use time;\n | ^^^^\n |\n ::: src/lib.rs:32:1\n |\n 32 | extern crate time;\n | ------------------ the item `time` is already imported here\n |\n = note: `#[warn(unused_imports)]` on by default\n\n warning: the item `std` is imported redundantly\n --> src/jit.rs:8:5\n |\n 8 | use std;\n | ^^^ the item `std` is already imported by prelude\n\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"src: Remove unused imports raised by linter"}},{"before":null,"after":"238e048614b4533487d8322ec528be90681cfa68","ref":"refs/heads/pr/unused-imports","pushedAt":"2024-03-14T11:24:18.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"src: Remove unused imports raised by linter\n\nI observed the following warning while running the tests, let's address\nthem:\n\n warning: the item `time` is imported redundantly\n --> src/helpers.rs:22:5\n |\n 22 | use time;\n | ^^^^\n |\n ::: src/lib.rs:32:1\n |\n 32 | extern crate time;\n | ------------------ the item `time` is already imported here\n |\n = note: `#[warn(unused_imports)]` on by default\n\n warning: the item `std` is imported redundantly\n --> src/jit.rs:8:5\n |\n 8 | use std;\n | ^^^ the item `std` is already imported by prelude\n\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"src: Remove unused imports raised by linter"}},{"before":"2cb24f7dcb42f7c1fcb869ead011fc57332636a6","after":"4d9af4e4afeb31546c65c0b58bb3efc0d0d1f4b5","ref":"refs/heads/arsh-fix-tests","pushedAt":"2024-03-14T11:18:44.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"tests/ubpf_vm.rs: Add tests for arsh offset masking\n\nAdd tests to make sure we handle the masking of the value (in the source\nregister or as an immediate) telling by how many bits the value in the\ndestination register should be shifted.\n\nThe context is that we used to do no masking on this value, but the BPF\nISA specification does require one, and the kernel implements it when\nthe value is passed in the source register (and rejects immediates that\nit deems invalid).\n\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"tests/ubpf_vm.rs: Add tests for arsh offset masking"}},{"before":null,"after":"2cb24f7dcb42f7c1fcb869ead011fc57332636a6","ref":"refs/heads/arsh-fix-tests","pushedAt":"2024-03-14T11:12:04.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"tests/ubpf_vm.rs: Add tests for arsh offset masking\n\nAdd tests to make sure we handle the masking of the value (in the source\nregister or as an immediate) telling by how many bits the value in the\ndestination register should be shifted.\n\nThe context is that we used to do no masking on this value, but the BPF\nISA specification does require one, and the kernel implements it when\nthe value is passed in the source register (and rejects immediates that\nit deems invalid).\n\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"tests/ubpf_vm.rs: Add tests for arsh offset masking"}},{"before":"252baeb8a4b11cc9b9bf4e4ce2f4bea4a07d4be7","after":null,"ref":"refs/heads/pr/appveyor-rust-stable","pushedAt":"2024-03-14T10:14:42.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"}},{"before":"7bebff57bec037cab5acd57ddbd72363fb163faf","after":"21b2e418e05c83b283c3d4961a8cd86db57d6786","ref":"refs/heads/main","pushedAt":"2024-03-14T10:14:39.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":".appveyor.yml: Update Rust version\n\nI'd like to avoid pinning Rust to a specific version in Appveyor. This\nis less deterministic for the tests, but because we don't run them often\nanyway we want to use up-to-date versions when we do. And this would be\nconsistent with the Linux workflows.\n\nHowever, I haven't found a way to pass a \"stable\" channel to the\nworkflow, if using \"stable\" it fails to download the computed .msi name\n(as [0]) which doesn't exist. Looking at the download page [1], there's\nindeed no such channel name, and packages for the stable releases use a\nversion number.\n\nSo we just bump the version to the current Rust stable in this commit.\n\n[0] https://static.rust-lang.org/dist/rust-stable-x86_64-pc-windows-msvc.msi\n[1] https://forge.rust-lang.org/infra/other-installation-methods.html\n\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":".appveyor.yml: Update Rust version"}},{"before":"1d39d1cced0ac2f3cd1801df994186c583401d70","after":"252baeb8a4b11cc9b9bf4e4ce2f4bea4a07d4be7","ref":"refs/heads/pr/appveyor-rust-stable","pushedAt":"2024-03-14T09:56:03.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":".appveyor.yml: Update Rust version\n\nI'd like to avoid pinning Rust to a specific version in Appveyor. This\nis less deterministic for the tests, but because we don't run them often\nanyway we want to use up-to-date versions when we do. And this would be\nconsistent with the Linux workflows.\n\nHowever, I haven't found a way to pass a \"stable\" channel to the\nworkflow, if using \"stable\" it fails to download the computed .msi name\n(as [0]) which doesn't exist. Looking at the download page [1], there's\nindeed no such channel name, and packages for the stable releases use a\nversion number.\n\nSo we just bump the version to the current Rust stable in this commit.\n\n[0] https://static.rust-lang.org/dist/rust-stable-x86_64-pc-windows-msvc.msi\n[1] https://forge.rust-lang.org/infra/other-installation-methods.html\n\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":".appveyor.yml: Update Rust version"}},{"before":null,"after":"1d39d1cced0ac2f3cd1801df994186c583401d70","ref":"refs/heads/pr/appveyor-rust-stable","pushedAt":"2024-03-14T09:42:08.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":".appveyor.yml: Use 'stable' channel for Rust version\n\nDon't pin to a specific version in Appveyor. This is less deterministic\nfor the tests, but because we don't run them often anyway we want to use\nup-to-date versions when we do. And this is consistent with the Linux\nworkflows.\n\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":".appveyor.yml: Use 'stable' channel for Rust version"}},{"before":null,"after":"b142df7d2fc16c2f53cea133d62a0157a5092fcf","ref":"refs/heads/maps-2017-experiments","pushedAt":"2024-01-23T09:19:50.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"WIP, backup","shortMessageHtmlLink":"WIP, backup"}},{"before":"1b9d7e96329cc9fc7b1041fbe5151ab24a15e32e","after":null,"ref":"refs/heads/pr/shifts","pushedAt":"2024-01-05T14:52:37.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"}},{"before":"c8d34a03d8329646c181f15f5c5ebd71146666c4","after":"7bebff57bec037cab5acd57ddbd72363fb163faf","ref":"refs/heads/main","pushedAt":"2024-01-05T14:52:33.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"src/interpreter.rs: Fix left/right shifts implementation (mask offset)\n\nThe current version of the BPF Instruction Set Specification specifies\nthat \"Shift operations use a mask of 0x3F (63) for 64-bit operations and\n0x1F (31) for 32-bit operations\" [0].\n\nThe current implementation is not compliant, and Rust complains if we\noverflow the number of bits we have when trying to shift. Let's fix it,\nand let's complete the test suite regarding left and right shift\noperations.\n\nNote: The JITs are not updated at this stage. The standard does not\nmention any difference between JIT and interpreter, but the kernel\nclearly considers the masking for the interpreter only. JIT-compilers\nare supposed to handle the overflow case in an implementation-defined\n(architecture-dependant) fashion. Kernel also use masking for shifts\nwith registers only (not immediates) and handles overflows with\nimmediates in the verifier by rejecting the programs.\n\n[0]: https://www.ietf.org/archive/id/draft-thaler-bpf-isa-02.html#section-3.1-18\n\nReported-by: HAPPY \nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"src/interpreter.rs: Fix left/right shifts implementation (mask offset)"}},{"before":"9bd61f2dd733bb95ddc9e6901297401f8c35eabd","after":"c8d34a03d8329646c181f15f5c5ebd71146666c4","ref":"refs/heads/main","pushedAt":"2024-01-05T14:50:31.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"tests/disassembler.rs: Add non-regression test for -0x8000 offset\n\nMake sure we do not panic again when trying to negate the 0x8000 offset\nfor load, store, jump instructions.\n\nLink: https://github.com/qmonnet/rbpf/issues/91\nLink: https://github.com/qmonnet/rbpf/issues/92\nSigned-off-by: Quentin Monnet \nSigned-off-by: Richard Smith ","shortMessageHtmlLink":"tests/disassembler.rs: Add non-regression test for -0x8000 offset"}},{"before":"36bf0d646c589d951535914a65525963997466ad","after":"9bd61f2dd733bb95ddc9e6901297401f8c35eabd","ref":"refs/heads/main","pushedAt":"2024-01-05T14:44:38.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"tests/ubpf_vm.rs: Add non-regression tests for 32-bit divisions by 0\n\nWe had an issue in the interpreter, because for 32-bit div and mod we\nwould check that the whole (64-bit long) divisor was not 0, but then\nwe'd only use the last 32 bits of this divisor to perform the arithmetic\noperation. We fixed the bug, but let's add a non-regression test to\ncatch this in the future.\n\nLink: https://github.com/qmonnet/rbpf/issues/95\nLink: https://github.com/qmonnet/rbpf/issues/96\nSigned-off-by: Quentin Monnet \nSigned-off-by: Richard Smith ","shortMessageHtmlLink":"tests/ubpf_vm.rs: Add non-regression tests for 32-bit divisions by 0"}},{"before":"4812c52fe1009ee1e3c2307662d175bdd07b5c71","after":"36bf0d646c589d951535914a65525963997466ad","ref":"refs/heads/main","pushedAt":"2024-01-05T14:44:27.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"tests/ubpf_vm.rs: Add regression test for check_mem() addition overflow\n\nAdd a test to make sure we don't overflow on additions between addr and\nlen in check_mem().\n\nLink: https://github.com/qmonnet/rbpf/issues/94\nSigned-off-by: Quentin Monnet \nSigned-off-by: Richard Smith ","shortMessageHtmlLink":"tests/ubpf_vm.rs: Add regression test for check_mem() addition overflow"}},{"before":null,"after":"1b9d7e96329cc9fc7b1041fbe5151ab24a15e32e","ref":"refs/heads/pr/shifts","pushedAt":"2024-01-05T00:48:52.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"src/interpreter.rs: Fix left/right shifts implementation (mask offset)\n\nThe current version of the BPF Instruction Set Specification specifies\nthat \"Shift operations use a mask of 0x3F (63) for 64-bit operations and\n0x1F (31) for 32-bit operations\" [0].\n\nThe current implementation is not compliant, and Rust complains if we\noverflow the number of bits we have when trying to shift. Let's fix it,\nand let's complete the test suite regarding left and right shift\noperations.\n\nNote: The JITs are not updated at this stage. The standard does not\nmention any difference between JIT and interpreter, but the kernel\nclearly considers the masking for the interpreter only. JIT-compilers\nare supposed to handle the overflow case in an implementation-defined\n(architecture-dependant) fashion. Kernel also use masking for shifts\nwith registers only (not immediates) and handles overflows with\nimmediates in the verifier by rejecting the programs.\n\n[0]: https://www.ietf.org/archive/id/draft-thaler-bpf-isa-02.html#section-3.1-18\n\nReported-by: HAPPY \nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"src/interpreter.rs: Fix left/right shifts implementation (mask offset)"}},{"before":"0f365500d3d5d02148e1c12d1773aa5dbf20033e","after":"4812c52fe1009ee1e3c2307662d175bdd07b5c71","ref":"refs/heads/main","pushedAt":"2023-09-06T19:59:55.000Z","pushType":"pr_merge","commitsCount":20,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"cranelift: Use the default libcall names\n\nSome operations may not work in some older CPU's and may need to\nbe lowered to a libcall.\n\nSigned-off-by: Afonso Bordado ","shortMessageHtmlLink":"cranelift: Use the default libcall names"}},{"before":null,"after":"899b0dcb04d8c8a05d4d9104d2f6ab576d704f3d","ref":"refs/heads/pr/cranelift-jit-reworked","pushedAt":"2023-09-05T00:13:35.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"cranelift: Use the default libcall names\n\nSome operations may not work in some older CPU's and may need to\nbe lowered to a libcall.\n\nSigned-off-by: Afonso Bordado ","shortMessageHtmlLink":"cranelift: Use the default libcall names"}},{"before":"c93e1a2c7105506714aebc102cffb20fd51e39a3","after":null,"ref":"refs/heads/pr/fix-div0-skip-offset","pushedAt":"2023-08-31T16:49:00.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"}},{"before":"7d2b019a51d48b7c91c269e5eec3084883a14b7c","after":"0f365500d3d5d02148e1c12d1773aa5dbf20033e","ref":"refs/heads/main","pushedAt":"2023-08-31T16:48:57.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"src/jit.rs: Fix offset when skipping insns for handling divisions by 0\n\nWhen dividing by the content of a register, we have a specific case to\nhandle divisions by zero. When the denominator is not 0, we skip the\nrelated instructions by emitted a near jump with the relevant offset.\n\nHowever, this offset was incorrect. We accounted for two instructions: a\n2-byte long XOR of the destination register with itself to set it to 0,\nand a 5-byte long jump. The former may in fact emit 3 bytes under\ncertain condition, depending on the destination in use. For example,\nwhen dividing from r7, we emit 3 bytes, and the fixed offset of 7 bytes\nwe used is incorrect, and triggers a segfault.\n\nTo fix this, let's add a check to determine the offset value we should\nuse. We also add related tests to make sure we don't regress on this in\nthe future.\n\nFixes: ce7d416d9a98 (\"src/jit.rs: Update behaviour for divisions by zero (JIT)\")\nFixes: https://github.com/qmonnet/rbpf/issues/88\nReported-by: Officeyutong\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"src/jit.rs: Fix offset when skipping insns for handling divisions by 0"}},{"before":null,"after":"c93e1a2c7105506714aebc102cffb20fd51e39a3","ref":"refs/heads/pr/fix-div0-skip-offset","pushedAt":"2023-08-31T16:29:23.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"src/jit.rs: Fix offset when skipping insns for handling divisions by 0\n\nWhen dividing by the content of a register, we have a specific case to\nhandle divisions by zero. When the denominator is not 0, we skip the\nrelated instructions by emitted a near jump with the relevant offset.\n\nHowever, this offset was incorrect. We accounted for two instructions: a\n2-byte long XOR of the destination register with itself to set it to 0,\nand a 5-byte long jump. The former may in fact emit 3 bytes under\ncertain condition, depending on the destination in use. For example,\nwhen dividing from r7, we emit 3 bytes, and the fixed offset of 7 bytes\nwe used is incorrect, and triggers a segfault.\n\nTo fix this, let's add a check to determine the offset value we should\nuse. We also add related tests to make sure we don't regress on this in\nthe future.\n\nFixes: ce7d416d9a98 (\"src/jit.rs: Update behaviour for divisions by zero (JIT)\")\nFixes: https://github.com/qmonnet/rbpf/issues/88\nReported-by: Officeyutong\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"src/jit.rs: Fix offset when skipping insns for handling divisions by 0"}},{"before":"cae002640321b1e1cf7e3b9462dc852b5a9ec928","after":null,"ref":"refs/heads/pr/readme-doc-kernel","pushedAt":"2023-06-05T10:01:05.073Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"}},{"before":"8d42a07b9d093d28f2bbe71297042759c63d8bdb","after":"7d2b019a51d48b7c91c269e5eec3084883a14b7c","ref":"refs/heads/main","pushedAt":"2023-06-05T10:01:01.313Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"README.md: Update link to BPF docs in kernel repository\n\nThe BPF documentation has evolved quite a bit since 2016. File\nfilter.txt is not the best link to provide here, we can instead point to\nthe directory Documentation/bpf/ which contains more resources.\n\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"README.md: Update link to BPF docs in kernel repository"}},{"before":null,"after":"cae002640321b1e1cf7e3b9462dc852b5a9ec928","ref":"refs/heads/pr/readme-doc-kernel","pushedAt":"2023-06-05T09:59:32.778Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"qmonnet","name":"Quentin Monnet","path":"/qmonnet","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/17001771?s=80&v=4"},"commit":{"message":"README.md: Update link to BPF docs in kernel repository\n\nThe BPF documentation has evolved quite a bit since 2016. File\nfilter.txt is not the best link to provide here, we can instead point to\nthe directory Documentation/bpf/ which contains more resources.\n\nSigned-off-by: Quentin Monnet ","shortMessageHtmlLink":"README.md: Update link to BPF docs in kernel repository"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEP4nccQA","startCursor":null,"endCursor":null}},"title":"Activity · qmonnet/rbpf"}