Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
![Screenshot 2023-12-18 at 10 40 27 PM](https://private-user-images.githubusercontent.com/3837836/291468646-4c30ad72-76ee-4939-a5fb-16b570d38cf2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIwOTI3OTYsIm5iZiI6MTcyMjA5MjQ5NiwicGF0aCI6Ii8zODM3ODM2LzI5MTQ2ODY0Ni00YzMwYWQ3Mi03NmVlLTQ5MzktYTVmYi0xNmI1NzBkMzhjZjIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjdUMTUwMTM2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NmNiMWNkN2ViNDYzNGJmN2U5ZTQ1NGU4ZDY2MzNlNzIxNzMyNGNjZTZiYTZmY2E5Y2U1ZDBiMzdjYjA1YTQ4NSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.DsZp9AED1OCjQ3kuiiFghV6vxFgNAEHJzXJ_2HJmdNU)
This bug was also called moonshine in the beginning | |
Basically the following bug is present in all bootroms I have looked at: | |
1. When usb is started to get an image over dfu, dfu registers an interface to handle all the commands and allocates a buffer for input and output | |
2. if you send data to dfu the setup packet is handled by the main code which then calls out to the interface code | |
3. the interface code verifies that wLength is shorter than the input output buffer length and if that's the case it updates a pointer passed as an argument with a pointer to the input output buffer | |
4. it then returns wLength which is the length it wants to recieve into the buffer | |
5. the usb main code then updates a global var with the length and gets ready to recieve the data packages | |
6. if a data package is recieved it gets written to the input output buffer via the pointer which was passed as an argument and another global variable is used to keep track of how many bytes were recieved already | |
7. if all the data was recieved th |
let ab = new ArrayBuffer(8); | |
let fv = new Float64Array(ab); | |
let dv = new BigUint64Array(ab); | |
let f2i = (f) => { | |
fv[0] = f; | |
return dv[0]; | |
} |
diff --git a/libusb/os/linux_usbfs.h b/libusb/os/linux_usbfs.h | |
index 2449632..5ef03ba 100644 | |
--- a/libusb/os/linux_usbfs.h | |
+++ b/libusb/os/linux_usbfs.h | |
@@ -82,7 +82,7 @@ struct usbfs_iso_packet_desc { | |
}; | |
#define MAX_BULK_BUFFER_LENGTH 16384 | |
-#define MAX_CTRL_BUFFER_LENGTH 4096 | |
+#define MAX_CTRL_BUFFER_LENGTH 0xFFFF |
I bundled these up into groups and wrote some thoughts about why I ask them!
If these helped you, I'd love to hear about it!! I'm on twitter @vcarl_ or send me an email carl.vitullo@gmail.com
https://blog.vcarl.com/interview-questions-onboarding-workplace/