lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Dec 2018 12:26:26 +0000
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     robh+dt@...nel.org, arnd@...db.de, mark.rutland@....com,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        bjorn.andersson@...aro.org, linux-arm-msm@...r.kernel.org,
        bkumar@....qualcomm.com, thierry.escande@...aro.org
Subject: Re: [PATCH v2 6/6] misc: fastrpc: Add support for compat ioctls



>>>
>>> What prevents you from doing that and requiring compat support?
>>>
>> I removed most of the compat IOCTLS except this one.
>> The reason is that this ioctl takes arguments which can vary in number for
>> each call.
> 
> Then do not do that :)
> 
> Remember, you get to design the api, fix the structure size to work
> properly everywhere.
> 
>> So args are passed as pointer to structure, rather than fixed
>> size. I could not find better way to rearrange this to give a fixed size
>> data structure. In theory number of arguments can vary from 0-255 for both
>> in & out.
>>
>> current data structure looks like this:
>>
>> struct fastrpc_invoke_args {
>> 	__s32 fd;
>> 	size_t length;
>> 	void *ptr;
>> };
> 
> Make length and ptr both __u64 and you should be fine, right?  If you do
> that, might as well make fd __u64 as well to align things better.
> 

That is fine for the args structure, but below "args" pointer in "struct 
fastrpc_invoke" is still not fixed size, unless we change that to __u64 
pointing to array of struct fastrpc_invoke_args. I have seen such usages 
in i915_drm.h.
Is that the preferred?

>> struct fastrpc_invoke {
>> 	__u32 handle;
>> 	__u32 sc;
>> 	struct fastrpc_invoke_args *args;
>> };
>>--srini

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ