mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	agalakhov@ifmlrs.uran.ru, Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: [PATCH] Sanitize filesystem NLS handling
Date: Mon, 19 Mar 2007 14:38:21 +0900	[thread overview]
Message-ID: <87vegxdc8i.fsf@duaron.myhome.or.jp> (raw)
In-Reply-To: <45FE13B9.8000203@ums.usu.ru> (Alexander E. Patrakov's message of "Mon\, 19 Mar 2007 09\:38\:17 +0500")

"Alexander E. Patrakov" <patrakov@ums.usu.ru> writes:

> OGAWA Hirofumi wrote:
>> "Alexander E. Patrakov" <patrakov@ums.usu.ru> writes:
>> 
>>>> You allow to set any nls to codepage? If so, it is not good.
>>> I did this because it involved less changes. Only FAT treats codepage as a 
>>> number. All other filesystems already allow arbitrary NLS as a codepage 
>>> mount parameter.
>> 
>> I'm saying here, it is not good for vfat.
>
> All valid options (i.e. numbers) are still available. Prohibiting 
> non-numbers is a lot of work (changing module_param_string to 
> module_param_call and validating the passed string, and also changing the 
> code for all filesystems so that they also validate manually-passed codepage 
> string).

Ok.

>>>> No, utf-8 makes completely wrong entry. It's more wrong than other nls.
>>> For any non-UTF-8 based locales, the other NLS is correct and utf8 indeed 
>>> would produce completely wrong characters. But for UTF-8 based locales, utf8 
>>> is the only correct iocharset.
>> 
>> No, iocharset=utf8 is wrong always.
>
> Here we just disagree, but I think I can change your opinion by giving you a 
> correctly configured UTF-8 Japanese system in the form of a LiveCD (note: 
> the kernel doesn't have this patch there). If you can afford ~500 MB of 
> downloads, please do this:

I don't care about "read", because it doesn't corrupt filesystem. I care
about only "write", because it can corrupt filesystem.

If it's read-only, I'll not care at all, and will agree.

>> Why I can't use utf8 for jfs or something, and use other nls for vfat?
>
> Because you'll get a mismatch between the userspace locale and the iocharset 
> used by the kernel in at least one of these two cases. The mismatch will 
> result in the following:
>
> 1) Your system (e.g., the "ls" command) will not correctly interpret 
> filenames written by known-good setups.
> 2) Known-good setups will not correctly interpret filenames written by your 
> system.
>
> What probably happened in your case is that you have no known-good jfs-based 
> setup and are the only user of your jfs disk, and thus can't see (2). It 
> looks like you don't use UTF-8 userspace locale. Then, the on-disk filenames 
> on your jfs filesystem are wrong, but your system misinterprets them, and 
> two errors seem to cancel each other (but this still doesn't make it a 
> correct setup).

All are user policy. The users can switch locale and
G_FILENAME_ENCODING and something else, some app can switch it even
runtime, and I think kernel shouldn't have user policy, right?
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

  reply	other threads:[~2007-03-19  5:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-18 16:55 Alexander E. Patrakov
2007-03-18 22:01 ` OGAWA Hirofumi
2007-03-19  2:58   ` Alexander E. Patrakov
2007-03-19  3:46     ` OGAWA Hirofumi
2007-03-19  4:38       ` Alexander E. Patrakov
2007-03-19  5:38         ` OGAWA Hirofumi [this message]
2007-03-19  5:49           ` Alexander E. Patrakov
2007-03-19 14:25             ` OGAWA Hirofumi
2007-03-19 15:04               ` Alexander E. Patrakov
2007-03-19 17:26                 ` OGAWA Hirofumi
2007-03-20  6:25                   ` Alexander E. Patrakov
2007-03-21 16:50                     ` OGAWA Hirofumi
2007-03-19 15:10               ` Alexander E. Patrakov
2007-03-19 17:36                 ` OGAWA Hirofumi
2007-03-19  6:38     ` yes --help (was: [PATCH] Sanitize filesystem NLS handling) Bernd Eckenfels
2007-03-19  8:14       ` Alexander E. Patrakov
2007-03-22 12:59 ` [PATCH] Sanitize filesystem NLS handling Roman Zippel
2007-03-22 13:22   ` Alexander E. Patrakov
2007-03-22 13:49     ` Roman Zippel
2007-03-22 13:59       ` Alexander E. Patrakov
2007-03-22 15:45         ` Roman Zippel
2007-03-22 14:58       ` Alexander E. Patrakov
2007-03-22 16:07 ` Alexander E. Patrakov

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=87vegxdc8i.fsf@duaron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=agalakhov@ifmlrs.uran.ru \
    --cc=akpm@osdl.org \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patrakov@ums.usu.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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

all inboxes | Powered by JetHome®