On 09/12/2014 10:52 AM, Thomas Gleixner wrote: > > Well, I did not see the trainwreck which tried to use the generic > decoder, but as I explained in the other mail, there is no reason not > to use it and I can't see any complexity in retrieving the data beyond > calling insn_get_length(insn); > Looking at how complex the state machine ended up being, it probably was the wrong direction. It is safe to copy_from_user() 15 bytes, decode what we get (which may be less than 15 bytes) and then verify with insn_get_length() that what we decoded is actually what we copied if the copy_from_user() length is < 15. My intent was to explore a state machine limited to the restricted "mib" encodings that are valid for BNDSTX and BNDLDX only, but in the end it really doesn't make enough difference that it is worth messing with, I don't think. -hpa -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>