public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: amit.virdi@st•com (Amit Virdi)
To: linux-arm-kernel@lists•infradead.org
Subject: copy from user broken on no-MMU (Was: Need advice: unable to mount filesystem)
Date: Mon, 21 Oct 2013 16:59:54 +0530	[thread overview]
Message-ID: <52651032.3040505@st.com> (raw)
In-Reply-To: <20131016082019.GA10079@pengutronix.de>

Dear Uwe,

On 10/16/2013 1:50 PM, Uwe Kleine-K?nig wrote:
> Hello Amit,
>
> (fixed subject and added Nico to Cc:)
>
> On Wed, Oct 16, 2013 at 10:55:17AM +0530, Amit Virdi wrote:
>> I'm using cortex-R4 in my SoC. I figured earlier that the support
>> for MMU-less kernel was broken from Kernel v3.6 onwards. As a
>> result, I was facing problem in mounting the filesystem. Using git
>> bisect, I figured out that as a result of:
>>
>>> ARM: 7449/1: use generic strnlen_user and strncpy_from_user functions
>>
>> the file system was unable to mount on MMU-less kernel. Till date, I
>> have been using the following local fix [1]:
>>
>> ---
>> diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
>> index 479a635..e5d549f 100644
>> --- a/arch/arm/include/asm/uaccess.h
>> +++ b/arch/arm/include/asm/uaccess.h
>> @@ -190,7 +190,7 @@ static inline void set_fs(mm_segment_t fs)
>>   #define access_ok(type,addr,size)	(__range_ok(addr,size) == 0)
>>
>>   #define user_addr_max() \
>> -	(segment_eq(get_fs(), USER_DS) ? TASK_SIZE : ~0UL)
>> +	(segment_eq(get_fs(), KERNEL_DL) ? ~0UL : TASK_SIZE)
>>
>>   /*
>>    * The "__xxx" versions of the user access functions do not verify the
> I did:
>
> http://git.pengutronix.de/?p=ukl/linux.git;a=commitdiff;h=089c629270ccd7499a083b530ec6aecc101d078b
>
> but I'm not sure either this is correct. I asked here on the list back
> then with the same patch as your's[1].
>
> [1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/170980/focus=191855

Yes, I see. So what do you think is the best way to resolve this 
problem? It is already lingering around for so long.

>> [2] The patch "ARM: move signal handlers into a vdso-like page"
>> introduced in v3.11-rc4 generates Prefetch abort while booting
>> kernel in MMU-less systems
> My M3 happily runs on v3.12-rc4.
>

I fixed a local problem and now I'm able to execute the Kernel on v3.12-rc5.

Regards
Amit Virdi

      parent reply	other threads:[~2013-10-21 11:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 12:29 Need advice: unable to mount filesystem Amit Virdi
2013-02-13 13:14 ` Linus Walleij
2013-02-14  2:57   ` Anil Kumar
2013-02-14  5:34     ` Amit Virdi
2013-02-14  5:24   ` Amit Virdi
2013-02-14  9:36     ` Linus Walleij
2013-02-15 11:55       ` Amit Virdi
2013-10-16  5:25         ` Amit Virdi
     [not found]           ` <20131016082019.GA10079@pengutronix.de>
2013-10-21 11:29             ` Amit Virdi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52651032.3040505@st.com \
    --to=amit.virdi@st$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox