{"push_id":2334859892,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"ce4ae8a72a5e5e613159378f7287b2fd50c052e2","before":"862ff6d99c6366f6258ffce1b7f45bb10ae42fa7","commits":[{"sha":"ce4ae8a72a5e5e613159378f7287b2fd50c052e2","author":{"name":"Serapheim Dimitropoulos","email":"31c92bebb032489bf87421691eb3bb2a4ff5c997@delphix.com"},"message":"9091 MDB smart-write\n\nReviewed by: Matthew Ahrens <mahrens@delphix.com>\nReviewed by: Paul Dagnelie <pcd@delphix.com>\nReviewed by: Prashanth Sreenivasa <pks@delphix.com>\nReviewed by: Robert Mustacchi <rm@joyent.com>\n\nCurrently, if you want to write to a kernel tunable using\nmdb, you need to use the /Z or /W flags to write 8 or 4\nbytes respectively. If you use the wrong one, you will either\noverwrite only part of the tunable, or overrun the end of the\ntunable and zero out the next 4 bytes of memory. That second\noption in particular can be disastrous. Given that MDB knows\nthe size of the tunables because it has CTF data, it would be\nnice if MDB supported a \"smart write\" format string that\nselected the size of the write based on the size of the thing\nbeing written to. It should fail or require a size be specified\nif we're writing to an area without a specific size.\n\nA new dcmd and a new format for writing are added to mdb.\n\nNew format:\n- Looks like this -> [address]/z [value]\n- Writes the value in the address starting from the specified\n  address\n- The size of the write is inferred by the CTF data of the\n  symbol at the address provided\n- If no CTF data exist at the given address, the write fails\n\nNew dcmd:\n- Looks like this -> [address]::write [value]\n- Works exactly like the format specifier above\n- For physical writes specify the -p argument\n  (i.e. [address]\\z [value])\n- For object file writes specify the -o argument\n  (i.e. [address]?z [value])\n- If no CTF data was found and the write fails the\n  user can force a write with -l [size]\n- The allowed lengths of a forced write are 1, 2, 4,\n  and 8 bytes.\n\nBoth of the above work with integer, pointer, and enum types\n(except the -l option in the dcmd that doesn't care about the type).\n\nCloses #544","distinct":true,"url":"https://api.github.com/repos/openzfs/openzfs/commits/ce4ae8a72a5e5e613159378f7287b2fd50c052e2"}]}
{"actor":{"display_login":"prakashsurya"}}