ktf
ktf copied to clipboard
Overriding function output paramater
Hi, i'm using KTF_OVERRIDE macro to override kernel functions and KTF_SET_RETURN_VALUE macro to set the returned value of the overrided function. I was wondering if there is a way to override an output parameter of the overrided function or if it is planned to implement this feature ? Thanks in advance for your help and thanks a lot for your great job. Pascal
hi Pascal
On 11/10/19 12:14, pfourguet wrote:
Hi, i'm using KTF_OVERRIDE macro to override kernel functions and KTF_SET_RETURN_VALUE macro to set the returned value of the overrided function. I was wondering if there is a way to override an output parameter of the overrided function or if it is planned to implement this feature ?
I'm not quite sure I follow; can you provide a code snippet that illustrates the functionality you'd like to have, or perhaps a bit more detail on how you'd use this feature? We'd certainly like to expand the functionality to fit more use cases. Thanks!
Alan
Thanks in advance for your help and thanks a lot for your great job. Pascal
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/oracle/ktf/issues/16?email_source=notifications&email_token=AHXTCM6NMI536XLBNXV4XH3QOBNYPA5CNFSM4I7YNGHKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HRFYFXQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHXTCM4KR6YPKRG4LFLGWBLQOBNYPANCNFSM4I7YNGHA.
hi Alan, saying i would like to override the kernel function with the following prototype: int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size, int timeout)
The data parameter is used as an output for this function, it contains useful data after its execution. While overriding this function, i wonder how to set data parameter to point to testing values. thanks for your help. pascal
Hello, I'm also interested on this possibility for testing. Any news about that ?