* "copy_to_user" function not working in stable build "2.6.36.4"
@ 2014-07-27 8:22 zubraz singha
2014-07-27 8:30 ` Richard Weinberger
0 siblings, 1 reply; 5+ messages in thread
From: zubraz singha @ 2014-07-27 8:22 UTC (permalink / raw)
To: linux-kernel
Hey Guys,
While writing a read proc entry for Linux kernel (version 2.6.36.4), I
found that the kernel function "copy_to_user" is not working properly.
The kernel function used internally by "copy_to_user" i.e.
"__copy_to_user" works fine and also this same function "copy_to_user"
works quite well on the higher kernel versions, I tried it on Linux
kernel version 3.14. The kernel source code for "2.6.36.4" doesn't
have a definition for a function i.e "_copy_to_user", which is being
called internally by "copy_to_user". However the function
"_copy_to_user" has a definition in higher version kernels like 3.14
etc. I cannot update my kernel, Is there any way I can fix this issue
by manually patching the kernel. There are two possible ways in which
I think it can be solved.
- Write a definition for the _copy_to_user in "2.6.36.4", which will
have the same "access_ok" check and corresponding "__copy_to_user"
function call.
- Modifying the function "copy_to_user" and adding the "access_ok"
check and the "__copy_to_user" function.
Zubraj
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "copy_to_user" function not working in stable build "2.6.36.4"
2014-07-27 8:22 "copy_to_user" function not working in stable build "2.6.36.4" zubraz singha
@ 2014-07-27 8:30 ` Richard Weinberger
2014-07-27 8:44 ` zubraz singha
0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2014-07-27 8:30 UTC (permalink / raw)
To: zubraz singha; +Cc: LKML
On Sun, Jul 27, 2014 at 10:22 AM, zubraz singha <zubrajsingha@gmail.com> wrote:
> Hey Guys,
> While writing a read proc entry for Linux kernel (version 2.6.36.4), I
> found that the kernel function "copy_to_user" is not working properly.
> The kernel function used internally by "copy_to_user" i.e.
> "__copy_to_user" works fine and also this same function "copy_to_user"
> works quite well on the higher kernel versions, I tried it on Linux
> kernel version 3.14. The kernel source code for "2.6.36.4" doesn't
> have a definition for a function i.e "_copy_to_user", which is being
> called internally by "copy_to_user". However the function
> "_copy_to_user" has a definition in higher version kernels like 3.14
> etc. I cannot update my kernel, Is there any way I can fix this issue
> by manually patching the kernel. There are two possible ways in which
> I think it can be solved.
>
> - Write a definition for the _copy_to_user in "2.6.36.4", which will
> have the same "access_ok" check and corresponding "__copy_to_user"
> function call.
> - Modifying the function "copy_to_user" and adding the "access_ok"
> check and the "__copy_to_user" function.
2.6.36.x is not a supported release. The issue is maybe fixed in other
versions but as
your release is not a stable kernel you are on your own. Sorry.
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "copy_to_user" function not working in stable build "2.6.36.4"
2014-07-27 8:30 ` Richard Weinberger
@ 2014-07-27 8:44 ` zubraz singha
2014-07-27 8:46 ` Richard Weinberger
0 siblings, 1 reply; 5+ messages in thread
From: zubraz singha @ 2014-07-27 8:44 UTC (permalink / raw)
To: Richard Weinberger; +Cc: LKML
I do understand that this is a very old build and its not being
supported. As I wrote in my earlier mail, the function works fine
with higher kernel versions. I will try to find out a work around for
this. Appreciate your feedback.
Zubraj
On 7/27/14, Richard Weinberger <richard.weinberger@gmail.com> wrote:
> On Sun, Jul 27, 2014 at 10:22 AM, zubraz singha <zubrajsingha@gmail.com>
> wrote:
>> Hey Guys,
>> While writing a read proc entry for Linux kernel (version 2.6.36.4), I
>> found that the kernel function "copy_to_user" is not working properly.
>> The kernel function used internally by "copy_to_user" i.e.
>> "__copy_to_user" works fine and also this same function "copy_to_user"
>> works quite well on the higher kernel versions, I tried it on Linux
>> kernel version 3.14. The kernel source code for "2.6.36.4" doesn't
>> have a definition for a function i.e "_copy_to_user", which is being
>> called internally by "copy_to_user". However the function
>> "_copy_to_user" has a definition in higher version kernels like 3.14
>> etc. I cannot update my kernel, Is there any way I can fix this issue
>> by manually patching the kernel. There are two possible ways in which
>> I think it can be solved.
>>
>> - Write a definition for the _copy_to_user in "2.6.36.4", which will
>> have the same "access_ok" check and corresponding "__copy_to_user"
>> function call.
>> - Modifying the function "copy_to_user" and adding the "access_ok"
>> check and the "__copy_to_user" function.
>
> 2.6.36.x is not a supported release. The issue is maybe fixed in other
> versions but as
> your release is not a stable kernel you are on your own. Sorry.
>
> --
> Thanks,
> //richard
>
--
-- Regards
Zubraj Singha
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "copy_to_user" function not working in stable build "2.6.36.4"
2014-07-27 8:44 ` zubraz singha
@ 2014-07-27 8:46 ` Richard Weinberger
2014-07-27 8:58 ` zubraz singha
0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2014-07-27 8:46 UTC (permalink / raw)
To: zubraz singha, Richard Weinberger; +Cc: LKML
Am 27.07.2014 10:44, schrieb zubraz singha:
> I do understand that this is a very old build and its not being
> supported. As I wrote in my earlier mail, the function works fine
> with higher kernel versions. I will try to find out a work around for
> this. Appreciate your feedback.
First I'd look into 2.6.32.x. Maybe it needed fixing and you can forward port the fix. :)
Thanks,
//richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "copy_to_user" function not working in stable build "2.6.36.4"
2014-07-27 8:46 ` Richard Weinberger
@ 2014-07-27 8:58 ` zubraz singha
0 siblings, 0 replies; 5+ messages in thread
From: zubraz singha @ 2014-07-27 8:58 UTC (permalink / raw)
To: Richard Weinberger; +Cc: Richard Weinberger, LKML
My mistake, I forgot to add this, the "copy_to_user" function I'm
referring here is for "X86"
based architecture.
What I have found:
-> 2.6.36.4
* "copy_to_user" calls "_copy_to_user"
* "_copy_to_user" no definition.
-> 3.14
* copy_to_user calls "_copy_to_user"
* "_copy_to_user" has a definiton
* _copy_to_user is defined as a function call to access_ok function
and __copy_to_user.
I was just wondering if the fix present in kernel versions "3.14" for
this , will work straight forward on "2.6.36.4". What I mean is
whether back porting of this fix will work, or there are other
parameters to consider.
On 7/27/14, Richard Weinberger <richard@nod.at> wrote:
> Am 27.07.2014 10:44, schrieb zubraz singha:
>> I do understand that this is a very old build and its not being
>> supported. As I wrote in my earlier mail, the function works fine
>> with higher kernel versions. I will try to find out a work around for
>> this. Appreciate your feedback.
>
> First I'd look into 2.6.32.x. Maybe it needed fixing and you can forward
> port the fix. :)
>
> Thanks,
> //richard
>
--
-- Regards
Zubraj Singha
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-27 8:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-27 8:22 "copy_to_user" function not working in stable build "2.6.36.4" zubraz singha
2014-07-27 8:30 ` Richard Weinberger
2014-07-27 8:44 ` zubraz singha
2014-07-27 8:46 ` Richard Weinberger
2014-07-27 8:58 ` zubraz singha
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.