Re: mount ffs as msdos, system hangs

2010-07-26 Thread frantisek holop
hmm, on Sun, Jul 25, 2010 at 09:41:15PM -0500, J Sisson said that
 On Sun, Jul 25, 2010 at 8:01 PM, frantisek holop min...@obiit.org wrote:
 
  well done misc@, living up to your name.
  the bootcamp of the internet.
 
 
 It's better to create a crappy diff that gets rejected than whine
 incessantly on a mailing
 list that by your own admission has a reputation for being like boot camp.

so sending half-baked crappy diffs will estabilish one
as a useful, non-whining member of the community, right?

incessantly?  maybe you could look in the archives
how much i post on this list.

so wait, if i had submitted a shot in the dark bug report
with sendbug, it'd be just closed with some comment or so,
but first posting questions about it will get you flame
and a label of being a whiner.

my whining, is a comparison of experiences with others,
questions if someone can reproduce a particular problem
i am having, whether it is considered a problem at all,
and so on.  a practice i thought about as the first step
of bug reporting and as such a perfectly valid subject
for a mailing list of this type.  me and my assumptions.


i dont understand why some people take problems reported
so personally, as if a personal attack, and/or also
interpreting it as a demand for an instant fix or
i dont know what.  it is not, wake up please.


as for go read the sources every time there is a problem,
even the developers are not familiar on the source level
with every single part of the kernel and the system.
they will go and ask the guy who knows it the best.
i dont get it why is it expected of us, the users.

maybe sendbug should be renamed to sendwhining

-f
-- 
mips = meaningless index of processor speed



Re: mount ffs as msdos, system hangs

2010-07-26 Thread David Vasek

On Mon, 26 Jul 2010, frantisek holop wrote:


hmm, on Mon, Jul 26, 2010 at 12:12:32AM +0200, David Vasek said that

It is not what happened. The -t msdos was forced by you. But you


ah shit.  you are right :]

and it worked because ffs does not overwrite the beginning
of the partition.

i misinterpreted what happened,
but this is still a problem, right? :]



If ffs had overwritten the beginning of the partition you would have ended 
with a *different* error message and the kernel would not have crashed. 
But more likely, the situation you describe could have never ever 
occurred. Nobody else wants it this way, for a reason. You still haven't 
thought about it enough nor you haven't learnt enough.


= Your homework is to figure out what the other error message would be
   and why.

(Trying to create a diff would help you to learn too, sending a bug report 
will not.)


Regards,
David



Re: mount ffs as msdos, system hangs

2010-07-26 Thread frantisek holop
since my first email, i see what i did wrong...
that was the point of writing to the mail list
in the first place, to see if i was doing something
silly.  turns out i was.  does that warrant abuse?
of course it does, i am not new here.


i also see, that now this problem became simply
a should we babysit root issue, and i dont
want root to be babysit either.

but regardless of that, i think leaving old garbage
after newfs-ing a partition is not a good idea in
any case and it's one of those things i wouldn't
except either.  my mistake again.

 If ffs had overwritten the beginning of the partition you would have
 ended with a *different* error message and the kernel would not have
 
 = Your homework is to figure out what the other error message would be
and why.

it would be the same error message ffs gives when given
a non-ffs partition:

mount_msdos: /dev/sd1a on /mnt: Invalid argument



 (Trying to create a diff would help you to learn too, sending a bug
 report will not.)

this is simply not true.  writing a useful, informative bug report
needs research, testing, etc.  i have learnt a lot by sending bugs.
in fact, did not send bug reports because in the process of writing
it i realized what i was doing wrong.  maybe if i had started writing
that report for this issue, i would have realized the mistake myself.

-f
-- 
to have a friend you must first be one.



Re: mount ffs as msdos, system hangs

2010-07-26 Thread Paul de Weerd
On Mon, Jul 26, 2010 at 12:04:04PM +0200, frantisek holop wrote:
| but regardless of that, i think leaving old garbage
| after newfs-ing a partition is not a good idea in
| any case and it's one of those things i wouldn't
| except either.  my mistake again.

Different filesystems use different parts of the disk, this is a fact
of life. For any and all re-use of disks, I tend to recommend to zero
out as much as you can wait for before putting a new OS on a disk.
After having dealt with the weird linuxisms that come up when not
properly wiping your disk not too long ago, my believe in this
approach has been greatly reaffirmed.

(in some cases, linux can put some metadata on either or both the
beginning and end of a disk - wiping only the first few megs leaves
the data at the end for great fun but not much profit upon
reinstalling).

I've not had much issues in this area with OpenBSD myself, but then I
tend to not mix different filesystems on my OpenBSD disks anyway (my
machines usually just run one OS). It still doesn't hurt to wipe the
disk though.

Paul 'WEiRD' de Weerd

-- 
[++-]+++.+++[---].+++[+
+++-].++[-]+.--.[-]
 http://www.weirdnet.nl/ 



Re: mount ffs as msdos, system hangs

2010-07-26 Thread David Vasek

On Mon, 26 Jul 2010, frantisek holop wrote:


since my first email, i see what i did wrong...
that was the point of writing to the mail list
in the first place, to see if i was doing something
silly.  turns out i was.  does that warrant abuse?
of course it does, i am not new here.


i also see, that now this problem became simply
a should we babysit root issue, and i dont
want root to be babysit either.

but regardless of that, i think leaving old garbage
after newfs-ing a partition is not a good idea in
any case and it's one of those things i wouldn't
except either.  my mistake again.


Finish your homework first.


If ffs had overwritten the beginning of the partition you would have
ended with a *different* error message and the kernel would not have

= Your homework is to figure out what the other error message would be
   and why.


it would be the same error message ffs gives when given
a non-ffs partition:

mount_msdos: /dev/sd1a on /mnt: Invalid argument


No, it would not be. Try harder.

Regards,
David



Re: mount ffs as msdos, system hangs

2010-07-26 Thread Tony Abernethy
frantisek holop wrote:
 my whining, is a comparison of experiences with others,
 questions if someone can reproduce a particular problem
 i am having, whether it is considered a problem at all,
 and so on.  a practice i thought about as the first step
 of bug reporting and as such a perfectly valid subject
 for a mailing list of this type.  me and my assumptions.
The responses to your whining indicate otherwise.

 i dont understand why some people take problems reported
 so personally, as if a personal attack, and/or also
 interpreting it as a demand for an instant fix or
 i dont know what.  it is not, wake up please.
Methinks you misinterpret who is being attacked.
According to your interpretation, what was your purpose,
if any, in your postings?

 as for go read the sources every time there is a problem,
 even the developers are not familiar on the source level
 with every single part of the kernel and the system.
 they will go and ask the guy who knows it the best.
 i dont get it why is it expected of us, the users.
However those developers are not only capable of reading some
of the source, they have WRITTEN some of it.



Re: mount ffs as msdos, system hangs

2010-07-26 Thread J Sisson
On Mon, Jul 26, 2010 at 3:50 AM, frantisek holop min...@obiit.org wrote:

 so sending half-baked crappy diffs will estabilish one
 as a useful, non-whining member of the community, right?


Oh...you're on the paid support plan?  My bad.

You get OpenBSD for free.  That's pretty amazing, isn't it?  Why is it hard
to believe that reframing a potential solution as here's a diff instead of
I
broke my system as root and you need to take time out of your day to help
me will get better results?  Sure, the diff may get rejected, but at least
you're
showing a touch bit more effort than the effort it takes to fire up your
e-mail
client.



Re: mount ffs as msdos, system hangs

2010-07-26 Thread Chris Bennett

frantisek holop wrote:

hi there,

i have just managed to mount an ffs partition
as msdos.  the the system promptly dies.

$ sudo fdisk sd0
Disk: sd0   geometry: 120/255/63 [1935360 Sectors]
Offset: 0   Signature: 0xAA55
Starting Ending LBA Info:
 #: id  C   H   S -  C   H   S [   start:size ]
---
 0: A6  0   1   1 -119 254  63 [  63: 1927737 ] OpenBSD 
 1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused  
 2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused  
 3: 00  0   0   0 -  0   0   0 [   0:   0 ] unused  


$ sudo mount -t msdos -o nodev,nosuid,-x,-l,-m666 /dev/sd0a /mnt
$
[dead system]


Despite all the whining by all of us, I think you have to admit some 
very useful information has come up on this thread. So get over being 
mad. I actually learned some interesting (useful) things reading the 
replies.




Re: mount ffs as msdos, system hangs

2010-07-26 Thread Ed Ahlsen-Girard
From:   STeve Andre' andres () msu ! edu
 Date:   2010-07-25 23:22:39

 
 I think that is a fundamentally flawed assumption.  Root can do
 *ANYTHING*.  Anything at all.  Sure, preventing crashes is good,
 but you can't get around the fact that root is omniscient.
  ^^ ^^

The problem is that root retained its omnipotence while leaving the
omniscience in its other pants.

--
Edward Ahlsen-Girard



Re: mount ffs as msdos, system hangs

2010-07-26 Thread Matthew Szudzik
On Sun, Jul 25, 2010 at 09:48:23PM -0400, Kenneth R Westerback wrote:
 If you wanted to mount according to the partition type number, DON'T
 USE '-t blah'. We give you the option to OVERRIDE the partition
 type number and you made use of that override. You have taken command

I believe that this thread is the result of documentation error on the
mount(8) man page.  A patch for the man page is at the end of this
message.

The problem is that the man page says:

 The argument following the -t is used to indicate the file system type.
 The type ffs is the default.

This is incorrect.  According to lines 248 through 251 of the source
file at

 http://www.openbsd.org/cgi-bin/cvsweb/src/sbin/mount/mount.c?annotate=1.50

the actual default behavior is to check the disklabel's filesystem type:

 If -t flag has not been specified, and spec contains either
 a ':' or a '@' then assume that an NFS filesystem is being
 specified ala Sun.  If not, check the disklabel for a
 known filesystem type.

The original poster in this thread is wondering why mount(8) did not
check the disklabel's filesystem type when he specified the -t option.
The answer is that mount(8) checks the disklabel's filesystem type by
default, but that -t overrides that default behavior.


--- sbin/mount/mount.8.orig Mon Jul 26 11:59:30 2010
+++ sbin/mount/mount.8  Mon Jul 26 12:48:45 2010
@@ -269,12 +269,15 @@
 The argument following the
 .Fl t
 is used to indicate the file system type.
-The type
-.Ar ffs
-is the default.
+If this option is omitted, then
+.Nm
+attempts to guess a file system type using the 
+.Xr disklabel 5
+and other information.
 The
 .Fl t
 option can be used
+to override this behavior and
 to indicate that the actions should only be taken on
 file systems of the specified type.
 More than one type may be specified in a comma separated list.



Re: mount ffs as msdos, system hangs

2010-07-26 Thread Theo de Raadt
 On Sun, Jul 25, 2010 at 09:48:23PM -0400, Kenneth R Westerback wrote:
  If you wanted to mount according to the partition type number, DON'T
  USE '-t blah'. We give you the option to OVERRIDE the partition
  type number and you made use of that override. You have taken command
 
 I believe that this thread is the result of documentation error on the
 mount(8) man page.  A patch for the man page is at the end of this
 message.
 
 The problem is that the man page says:
 
  The argument following the -t is used to indicate the file system type.
  The type ffs is the default.
 
 This is incorrect.  According to lines 248 through 251 of the source
 file at
 
  http://www.openbsd.org/cgi-bin/cvsweb/src/sbin/mount/mount.c?annotate=1.50
 
 the actual default behavior is to check the disklabel's filesystem type:
 
  If -t flag has not been specified, and spec contains either
  a ':' or a '@' then assume that an NFS filesystem is being
  specified ala Sun.  If not, check the disklabel for a
  known filesystem type.
 
 The original poster in this thread is wondering why mount(8) did not
 check the disklabel's filesystem type when he specified the -t option.
 The answer is that mount(8) checks the disklabel's filesystem type by
 default, but that -t overrides that default behavior.
 
 
 --- sbin/mount/mount.8.orig Mon Jul 26 11:59:30 2010
 +++ sbin/mount/mount.8  Mon Jul 26 12:48:45 2010
 @@ -269,12 +269,15 @@
  The argument following the
  .Fl t
  is used to indicate the file system type.
 -The type
 -.Ar ffs
 -is the default.
 +If this option is omitted, then
 +.Nm
 +attempts to guess a file system type using the 
 +.Xr disklabel 5
 +and other information.
  The
  .Fl t
  option can be used
 +to override this behavior and
  to indicate that the actions should only be taken on
  file systems of the specified type.
  More than one type may be specified in a comma separated list.

This diff isn't quite right.  There are no disklabels on NFS
partitions; heck, there's no true disklabel on a MSDOS-only memory
stick.  The language you've written is too specific.



Re: mount ffs as msdos, system hangs

2010-07-26 Thread Theo de Raadt
 On Mon, Jul 26, 2010 at 10:07:37AM -0600, Theo de Raadt wrote:
  This diff isn't quite right.  There are no disklabels on NFS
  partitions; heck, there's no true disklabel on a MSDOS-only memory
  stick.  The language you've written is too specific.
 
 How about the following?
 
 
 --- sbin/mount/mount.8.orig   Mon Jul 26 11:59:30 2010
 +++ sbin/mount/mount.8Mon Jul 26 17:02:03 2010
 @@ -269,12 +269,16 @@
  The argument following the
  .Fl t
  is used to indicate the file system type.
 -The type
 -.Ar ffs
 -is the default.
 +If this option is omitted, then
 +.Nm
 +attempts to guess a file system type using
 +.Ar special
 +and
 +.Xr readlabelfs 3 .
  The
  .Fl t
  option can be used
 +to override this behavior and
  to indicate that the actions should only be taken on
  file systems of the specified type.
  More than one type may be specified in a comma separated list.

There is no readlabelfs() for NFS filesystems.  You are being too
specific in saying how it works.



Re: mount ffs as msdos, system hangs

2010-07-26 Thread Matthew Szudzik
On Mon, Jul 26, 2010 at 10:07:37AM -0600, Theo de Raadt wrote:
 This diff isn't quite right.  There are no disklabels on NFS
 partitions; heck, there's no true disklabel on a MSDOS-only memory
 stick.  The language you've written is too specific.

How about the following?


--- sbin/mount/mount.8.orig Mon Jul 26 11:59:30 2010
+++ sbin/mount/mount.8  Mon Jul 26 17:02:03 2010
@@ -269,12 +269,16 @@
 The argument following the
 .Fl t
 is used to indicate the file system type.
-The type
-.Ar ffs
-is the default.
+If this option is omitted, then
+.Nm
+attempts to guess a file system type using
+.Ar special
+and
+.Xr readlabelfs 3 .
 The
 .Fl t
 option can be used
+to override this behavior and
 to indicate that the actions should only be taken on
 file systems of the specified type.
 More than one type may be specified in a comma separated list.



Re: mount ffs as msdos, system hangs

2010-07-26 Thread Matthew Szudzik
On Mon, Jul 26, 2010 at 12:21:53PM -0600, Theo de Raadt wrote:
 There is no readlabelfs() for NFS filesystems.  You are being too
 specific in saying how it works.

In the case of an NFS filesystem, mount(8) just checks whether the
special string contains a : or @ character.  So, the diff is
literally correct: mount(8) attempts to guess a file system type using
special and readlabelfs(3).



Re: mount ffs as msdos, system hangs

2010-07-26 Thread Theo de Raadt
 On Mon, Jul 26, 2010 at 12:21:53PM -0600, Theo de Raadt wrote:
  There is no readlabelfs() for NFS filesystems.  You are being too
  specific in saying how it works.
 
 In the case of an NFS filesystem, mount(8) just checks whether the
 special string contains a : or @ character.  So, the diff is
 literally correct: mount(8) attempts to guess a file system type using
 special and readlabelfs(3).

It is not correct.

It has no statement In the case of NFS, something else happens.  Or
In some other cases, some other stuff happens.

Come on.  Read it carefully. 



Re: mount ffs as msdos, system hangs

2010-07-26 Thread Kevin Chadwick
I'm top posting because I think people have read enough.

My sudo policy only allows me to test this;

$ /usr/bin/sudo /sbin/mount_msdos -o
nodev,nosuid,noexec /dev/sd0c /mnt/usb0 

and I get

mount_msdos: /dev/sd0c on /mnt/usb0: Inappropriate file type or format


So I see no problem and Being able to force a system to do weird things
can be useful anyway.



As a side note and for people to be aware, I have seen BBB resets and
hangs followed by hangs and crash dumps sometimes self initiating but
especially when the usb is unplugged without waiting for it to settle
down. This has occurred on 4.6 stable and now a july snapshot but only
with some usbs like 8Gig microsds (4.6), a cheap 128mb disk (4.7
july) and a usb to ide (2.5inch) converter (4.7 July). The funny thing
is I had no problem with these on a snapshot from a little before the
4.7 release date. I thought it was one particular laptopwhich was the
worst for it, but I've had it happen on 3 different systems, 1 desktop
and 2 laptops.

I haven't said anything till now because I want to do some testing and
comparison and don't have time right now (only affects some usbs, some
of the time anyway), but I figured it's best to air it even if there's
little to go on right now, in case anyone else has had this happen.


On Mon, 26 Jul 2010 06:06:42 -0500
J Sisson sisso...@gmail.com wrote:

 On Mon, Jul 26, 2010 at 3:50 AM, frantisek holop min...@obiit.org wrote:
 
  so sending half-baked crappy diffs will estabilish one
  as a useful, non-whining member of the community, right?
 
 
 Oh...you're on the paid support plan?  My bad.
 
 You get OpenBSD for free.  That's pretty amazing, isn't it?  Why is it hard
 to believe that reframing a potential solution as here's a diff instead of
 I
 broke my system as root and you need to take time out of your day to help
 me will get better results?  Sure, the diff may get rejected, but at least
 you're
 showing a touch bit more effort than the effort it takes to fire up your
 e-mail
 client.



Re: mount ffs as msdos, system hangs

2010-07-26 Thread Kevin Chadwick
On Mon, 26 Jul 2010 12:23:36 +0200
Paul de Weerd we...@weirdnet.nl wrote:

 On Mon, Jul 26, 2010 at 12:04:04PM +0200, frantisek holop wrote:
 | but regardless of that, i think leaving old garbage
 | after newfs-ing a partition is not a good idea in
 | any case and it's one of those things i wouldn't
 | except either.  my mistake again.
 
 Different filesystems use different parts of the disk, this is a fact
 of life. For any and all re-use of disks, I tend to recommend to zero
 out as much as you can wait for before putting a new OS on a disk.
 After having dealt with the weird linuxisms that come up when not
 properly wiping your disk not too long ago, my believe in this
 approach has been greatly reaffirmed.
 
 (in some cases, linux can put some metadata on either or both the
 beginning and end of a disk - wiping only the first few megs leaves
 the data at the end for great fun but not much profit upon
 reinstalling).
 
 I've not had much issues in this area with OpenBSD myself, but then I
 tend to not mix different filesystems on my OpenBSD disks anyway (my
 machines usually just run one OS). It still doesn't hurt to wipe the
 disk though.
 
 Paul 'WEiRD' de Weerd
 
 -- 
 [++-]+++.+++[---].+++[+
 +++-].++[-]+.--.[-]
  http://www.weirdnet.nl/ 
 

The most bizarre case I've come across was with windows XP.

I've wiped a partition before and had windows fail to install
because there was something at the beginning of the disk that needed
wiping.

After a few tries and not wanting to rebuild my tables, I cleared a
partition on another disk. It then wouldn't install to the new disk
untill I unplugged that other disk. I then replugged it after install
and all was sweet (seemingly atleast).



mount ffs as msdos, system hangs

2010-07-25 Thread frantisek holop
hi there,

i have just managed to mount an ffs partition
as msdos.  the the system promptly dies.

$ sudo fdisk sd0
Disk: sd0   geometry: 120/255/63 [1935360 Sectors]
Offset: 0   Signature: 0xAA55
Starting Ending LBA Info:
 #: id  C   H   S -  C   H   S [   start:size ]
---
 0: A6  0   1   1 -119 254  63 [  63: 1927737 ] OpenBSD 
 1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused  
 2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused  
 3: 00  0   0   0 -  0   0   0 [   0:   0 ] unused  

$ sudo mount -t msdos -o nodev,nosuid,-x,-l,-m666 /dev/sd0a /mnt
$
[dead system]

can anybody reproduce this?


OpenBSD 4.7-current (GENERIC) #113: Sat Jul 10 14:50:49 MDT 2010
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Celeron(R) M processor 900MHz (GenuineIntel 686-class) 631 MHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF
real mem  = 527527936 (503MB)
avail mem = 508919808 (485MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 03/11/09, BIOS32 rev. 0 @ 0xf0010, SMBIOS 
rev. 2.5 @ 0xf06e0 (37 entries)
bios0: vendor American Megatrends Inc. version 1302 date 03/11/2009
bios0: ASUSTeK Computer INC. 701
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC OEMB MCFG
acpi0: wakeup devices P0P3(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4) MC97(S4) 
USB1(S3) USB2(S3) USB3(S3) USB4(S3) EUSB(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 70MHz
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 5 (P0P3)
acpiprt2 at acpi0: bus 3 (P0P5)
acpiprt3 at acpi0: bus 1 (P0P6)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2
acpitz0 at acpi0: critical temperature 90 degC
acpibat0 at acpi0: BAT0 model 701 serial   type LION oem ASUS
acpiac0 at acpi0: AC unit online
acpiasus0 at acpi0
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: PWRB
acpivideo0 at acpi0: VGA_
acpivout0 at acpivideo0: CRTD
acpivout1 at acpivideo0: TVOD
acpivout2 at acpivideo0: LCDD
bios0: ROM list: 0xc/0xf800!
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 Intel 82915GM Host rev 0x04
vga1 at pci0 dev 2 function 0 Intel 82915GM Video rev 0x04
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xd000, size 0x1000
inteldrm0 at vga1: apic 1 int 16 (irq 5)
drm0 at inteldrm0
Intel 82915GM Video rev 0x04 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 Intel 82801FB HD Audio rev 0x04: apic 1 int 
16 (irq 5)
azalia0: codecs: Realtek ALC662
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 Intel 82801FB PCIE rev 0x04: apic 1 int 16 
(irq 5)
pci1 at ppb0 bus 4
ppb1 at pci0 dev 28 function 1 Intel 82801FB PCIE rev 0x04: apic 1 int 17 
(irq 11)
pci2 at ppb1 bus 3
lii0 at pci2 dev 0 function 0 Attansic Technology L2 rev 0xa0: apic 1 int 17 
(irq 11), address 71:ec:da:32:72:24
ukphy0 at lii0 phy 1: Generic IEEE 802.3u media interface, rev. 2: OUI 
0x001374, model 0x0002
ppb2 at pci0 dev 28 function 2 Intel 82801FB PCIE rev 0x04: apic 1 int 18 
(irq 10)
pci3 at ppb2 bus 1
iwn0 at pci3 dev 0 function 0 Intel Wireless WiFi Link 4965 rev 0x61: apic 1 
int 18 (irq 10), MIMO 2T3R, MoW2, address 00:21:5c:04:9e:19
uhci0 at pci0 dev 29 function 0 Intel 82801FB USB rev 0x04: apic 1 int 23 
(irq 3)
uhci1 at pci0 dev 29 function 1 Intel 82801FB USB rev 0x04: apic 1 int 19 
(irq 7)
uhci2 at pci0 dev 29 function 2 Intel 82801FB USB rev 0x04: apic 1 int 18 
(irq 10)
uhci3 at pci0 dev 29 function 3 Intel 82801FB USB rev 0x04: apic 1 int 16 
(irq 5)
ehci0 at pci0 dev 29 function 7 Intel 82801FB USB rev 0x04: apic 1 int 23 
(irq 3)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0xd4
pci4 at ppb3 bus 5
ichpcib0 at pci0 dev 31 function 0 Intel 82801FBM LPC rev 0x04: PM disabled
pciide0 at pci0 dev 31 function 2 Intel 82801FBM SATA rev 0x04: DMA, channel 
0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 1 drive 0: ISILOCMNTOOI NMS22A3
wd0: 1-sector PIO, LBA, 3815MB, 7815024 sectors
wd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 4
ichiic0 at pci0 dev 31 function 3 Intel 82801FB SMBus rev 0x04: apic 1 int 19 
(irq 0)
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 512MB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 

Re: mount ffs as msdos, system hangs

2010-07-25 Thread Chris Bennett

frantisek holop wrote:

hi there,

i have just managed to mount an ffs partition
as msdos.  the the system promptly dies.

$ sudo fdisk sd0
Disk: sd0   geometry: 120/255/63 [1935360 Sectors]
Offset: 0   Signature: 0xAA55
Starting Ending LBA Info:
 #: id  C   H   S -  C   H   S [   start:size ]
---
 0: A6  0   1   1 -119 254  63 [  63: 1927737 ] OpenBSD 
 1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused  
 2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused  
 3: 00  0   0   0 -  0   0   0 [   0:   0 ] unused  


$ sudo mount -t msdos -o nodev,nosuid,-x,-l,-m666 /dev/sd0a /mnt
$
[dead system]

can anybody reproduce this?

If I plug my 110volt computer into a 220volt socket, it will promptly 
die too!


Why on earth would you even try to do this?



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Robert
On Sun, 25 Jul 2010 12:02:25 -0500
Chris Bennett ch...@bennettconstruction.biz wrote:

 frantisek holop wrote:
  i have just managed to mount an ffs partition
  as msdos.  the the system promptly dies.

 If I plug my 110volt computer into a 220volt socket, it will promptly 
 die too!

Well, hopefully it will only blow a fuse.

I haven't tried this mount, but IMHO if you mount some garbage as a
specific file system type, then the OS should give you an error and
deny the mount. It should not crash.
Maybe you are mounting through a script, for automated backups, or
through the automounter. Now if you insert by accident a wrong medium
then this shouldn't lead to a crash.

regards,
Robert



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Theo de Raadt
 I haven't tried this mount, but IMHO

I don't see any humility.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Marcos Laufer

Chris Bennett escribis:

frantisek holop wrote:

hi there,

i have just managed to mount an ffs partition
as msdos.  the the system promptly dies.

$ sudo fdisk sd0
Disk: sd0   geometry: 120/255/63 [1935360 Sectors]
Offset: 0   Signature: 0xAA55
Starting Ending LBA Info:
 #: id  C   H   S -  C   H   S [   start:size ]
--- 

 0: A6  0   1   1 -119 254  63 [  63: 1927737 ] 
OpenBSD  1: 00  0   0   0 -  0   0   0 [   
0:   0 ] unused   2: 00  0   0   0 -  0   0   0 
[   0:   0 ] unused   3: 00  0   0   0 -  
0   0   0 [   0:   0 ] unused 
$ sudo mount -t msdos -o nodev,nosuid,-x,-l,-m666 /dev/sd0a /mnt

$
[dead system]

can anybody reproduce this?

If I plug my 110volt computer into a 220volt socket, it will promptly 
die too!


Why on earth would you even try to do this?




That's no excuse. The point here is that any unprivileged user can hang 
the system at will.




Re: mount ffs as msdos, system hangs

2010-07-25 Thread Theo de Raadt
  i have just managed to mount an ffs partition
  as msdos.  the the system promptly dies.
 
  $ sudo fdisk sd0
  Disk: sd0   geometry: 120/255/63 [1935360 Sectors]
  Offset: 0   Signature: 0xAA55
  Starting Ending LBA Info:
   #: id  C   H   S -  C   H   S [   start:size ]
  ---
   
 
   0: A6  0   1   1 -119 254  63 [  63: 1927737 ] 
  OpenBSD  1: 00  0   0   0 -  0   0   0 [   
  0:   0 ] unused   2: 00  0   0   0 -  0   0   0 
  [   0:   0 ] unused   3: 00  0   0   0 -  
  0   0   0 [   0:   0 ] unused 
  $ sudo mount -t msdos -o nodev,nosuid,-x,-l,-m666 /dev/sd0a /mnt
  $
  [dead system]
 
  can anybody reproduce this?
 
  If I plug my 110volt computer into a 220volt socket, it will promptly 
  die too!
 
  Why on earth would you even try to do this?
 
 
 
 That's no excuse. The point here is that any unprivileged user can hang 
 the system at will.

I don't see an unprivleged user.

I see root performing the mount, since only root can perform mounts
(unless a sysctl is activated, which noone uses).

Hey look everyone, it's another uneducated user mouthing off on a noisy
mailing list.  He goes blah blah blah, loving the sound of his own noise.

There's no excuse for what he's saying.  If he gave a damn about anything
except his own noise he'd go look at the code and find out why this happened.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread frantisek holop
hmm, on Sun, Jul 25, 2010 at 12:02:25PM -0500, Chris Bennett said that
 If I plug my 110volt computer into a 220volt socket, it will
 promptly die too!
 
 Why on earth would you even try to do this?

actually, gasp! it was a typo...  nothing dramatic,
no fuzzy testing of mount, a simple typo.

and i reported it, because for example doing the opposite
is impossible:

$ sudo mount -t ffs /dev/sd1i /mnt
mount_ffs: /dev/sd1i on /mnt: Invalid argument

(sd1i is VFAT)

now if this is a freak accident, and it should mount
an fs it has no understanding of, and then fall over,
and this being the normal state, then i sincerely
apologize for the noise.

i really dont understand whats going on lately on this list.
people reporting valid issues are hammered by apologists.
i am trying to make this system better as well, you know?

-f
-- 
teaching is the art of assisting discovery.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread frantisek holop
hmm, on Sun, Jul 25, 2010 at 01:08:45PM -0600, Theo de Raadt said that
  
  
  
  That's no excuse. The point here is that any unprivileged user can hang 
  the system at will.
 
 I don't see an unprivleged user.
 
 I see root performing the mount, since only root can perform mounts
 (unless a sysctl is activated, which noone uses).

i sent the example as root, but i happen to use that sysctl.
i havent tested this as unprivileged user though.
i think it doesnt matter what the user is, this shouldnt
be happening.

sincerely,
-noone
-- 
you can give a man a fish, or you can teach him to fish.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Theo de Raadt
 hmm, on Sun, Jul 25, 2010 at 01:08:45PM -0600, Theo de Raadt said that
   
   
   
   That's no excuse. The point here is that any unprivileged user can hang 
   the system at will.
  
  I don't see an unprivleged user.
  
  I see root performing the mount, since only root can perform mounts
  (unless a sysctl is activated, which noone uses).
 
 i sent the example as root, but i happen to use that sysctl.

So it is root.

 i havent tested this as unprivileged user though.

Tough.  If you enable that sysctl, it is your own responsibility. 

 i think it doesnt matter what the user is, this shouldnt
 be happening.

We make the source code available, and yet noone here has even sat down
for 30 seconds and gone and checked the kernel msdos mount code and realized
that it almost nothing it can validate a filesystem on.

It saw that space of disk, validated it as msdos, and mounted it.

This is not ffs.  When you do stuff like that, we are not your nanny.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread frantisek holop
hmm, on Sun, Jul 25, 2010 at 02:29:25PM -0600, Theo de Raadt said that
  i think it doesnt matter what the user is, this shouldnt
  be happening.
 
 We make the source code available, and yet noone here has even sat down
 for 30 seconds and gone and checked the kernel msdos mount code and realized
 that it almost nothing it can validate a filesystem on.

does that almost nothing include the partition type number?
because i dont see why would the kernel msdos mount code
even try to start mounting an msdos filesystem with type of A6.

 It saw that space of disk, validated it as msdos, and mounted it.
 
 This is not ffs.  When you do stuff like that, we are not your nanny.

are you really implying that there is no way to identify
a partition as various types of FAT?  i think it's time
that you did some reading..

-f
-- 
to get a loan you must prove you don't need it.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Theo de Raadt
hmm, on Sun, Jul 25, 2010 at 02:29:25PM -0600, Theo de Raadt said that
  i think it doesnt matter what the user is, this shouldnt
  be happening.
 
 We make the source code available, and yet noone here has even sat down
 for 30 seconds and gone and checked the kernel msdos mount code and realized
 that it almost nothing it can validate a filesystem on.

does that almost nothing include the partition type number?
because i dont see why would the kernel msdos mount code
even try to start mounting an msdos filesystem with type of A6.

 It saw that space of disk, validated it as msdos, and mounted it.
 
 This is not ffs.  When you do stuff like that, we are not your nanny.

are you really implying that there is no way to identify
a partition as various types of FAT?  i think it's time
that you did some reading..

ffs does not use the first 8K of a partition.

You used to have MSDOS on there.

Thanks for telling me do so some reading, but a google of your name
on these mailing lists will show a 10 year pattern of you not being
able to self-help.  Something to do with your parents, probably.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Ted Unangst
On Sun, Jul 25, 2010 at 4:46 PM, frantisek holop min...@obiit.org wrote:
 does that almost nothing include the partition type number?
 because i dont see why would the kernel msdos mount code
 even try to start mounting an msdos filesystem with type of A6.

You are more likely to see things if you look for them first...



Re: mount ffs as msdos, system hangs

2010-07-25 Thread frantisek holop
hmm, on Sun, Jul 25, 2010 at 03:17:53PM -0600, Theo de Raadt said that
 ffs does not use the first 8K of a partition.
 
 You used to have MSDOS on there.

yes, that is the correct answer.


it's a pitty the kernel is ignoring the partition type id.

it's also a pitty that ffs apparently leaves the first 8k
untouched when creating a partition, begging for foot shooting
like this so other operating systems can go ahead and mount
the ffs partition as msdos and fall over as well.

and it's a pitty i am such an idiot i dit not know about this
apparently well documented, absolutely common FAQ item
and had the audacity to bring it on this fine mailing list.

-f
-- 
user: a technical term used by computer pros.  see idiot.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Theo de Raadt
 hmm, on Sun, Jul 25, 2010 at 03:17:53PM -0600, Theo de Raadt said that
  ffs does not use the first 8K of a partition.
  
  You used to have MSDOS on there.
 
 yes, that is the correct answer.
 
 
 it's a pitty the kernel is ignoring the partition type id.
 
 it's also a pitty that ffs apparently leaves the first 8k
 untouched when creating a partition, begging for foot shooting
 like this so other operating systems can go ahead and mount
 the ffs partition as msdos and fall over as well.

Yes, it is a pity that ffs leaves the first 8K untouched.  We'll
make sure that your install media from now on zaps the first 8K,
where your boot code resides.

 and it's a pitty i am such an idiot i dit not know about this
 apparently well documented, absolutely common FAQ item
 and had the audacity to bring it on this fine mailing list.

It's a pity you don't go jump in a lake and drown yourself.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread David Vasek

On Sun, 25 Jul 2010, frantisek holop wrote:


hmm, on Sun, Jul 25, 2010 at 02:29:25PM -0600, Theo de Raadt said that

i think it doesnt matter what the user is, this shouldnt
be happening.


We make the source code available, and yet noone here has even sat down
for 30 seconds and gone and checked the kernel msdos mount code and realized
that it almost nothing it can validate a filesystem on.


does that almost nothing include the partition type number?
because i dont see why would the kernel msdos mount code
even try to start mounting an msdos filesystem with type of A6.


Hi Frantisek.

It is not what happened. The -t msdos was forced by you. But you were not 
trying to mount a filesystem with type A6. A typo can happen but your 
mistake is in your interpretation of what has happened after the typo. 
Take a break and then think about it carefully.


Regards,
David



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Jacob Yocom-Piatt

Theo de Raadt wrote:

Thanks for telling me do so some reading, but a google of your name
on these mailing lists will show a 10 year pattern of you not being
able to self-help.  Something to do with your parents, probably.

  



'this hammer *sucks* for putting screws in the wall! what's the deal 
with that?'


speaking of long-running patterns i have noticed that frantisek has no 
end of msdos / windows problems with openbsd. after seeing the 
regularity with which the problems occur this seems like a stupid 
configuration.


you could avoid all these problems by not using msdos support on openbsd 
e.g. have an openbsd machine setup as a samba server and save all your 
files there, instead of having some easily-broken dual-boot or external 
disk swapping setup. you can definitely put a screw in a wall using a 
hammer but it may occur to the more astute that you are using the wrong 
tool for the task.




Re: mount ffs as msdos, system hangs

2010-07-25 Thread frantisek holop
hmm, on Mon, Jul 26, 2010 at 12:12:32AM +0200, David Vasek said that
 It is not what happened. The -t msdos was forced by you. But you

ah shit.  you are right :]

and it worked because ffs does not overwrite the beginning
of the partition.

i misinterpreted what happened,
but this is still a problem, right? :]

-f
-- 
when dating a homeless girl you can drop her off anywhere.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread STeve Andre'
On Sunday 25 July 2010 18:40:19 frantisek holop wrote:
 hmm, on Mon, Jul 26, 2010 at 12:12:32AM +0200, David Vasek said that

  It is not what happened. The -t msdos was forced by you. But you

 ah shit.  you are right :]

 and it worked because ffs does not overwrite the beginning
 of the partition.

 i misinterpreted what happened,
 but this is still a problem, right? :]

 -f

It's a problem in that something bad happened, but that is because
of an operator error.  In particular a root operator error: being root
has the potential for unlimited error.  There is no fix or check for 
rm -rf /, is there.

I've not looked at the code so I can't intelligently comment on what
checks you can or cannot do, but the fundamental issue is that root
has to be aware of every command entered, and must be prepared
to fix *anything*.  An OS cannot prevent you from most problems.
Well, Windows tries, but look at what it feel like to use it...

-- 
STeve Andre'
Disease Control Warden
Dept. of Political Science
Michigan State University

A day without Windows is like a day without a nuclear incident.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread bofh
Ok, when I first learnt how to use unix nearly 20 years ago, one of
the things I learnt was that a privileged user can break shit, but
should not cause kernels to hang or crash.  That would be considered a
bug.  Only DOS and windows 3.1 do that :)

On 7/25/10, STeve Andre' and...@msu.edu wrote:
 On Sunday 25 July 2010 18:40:19 frantisek holop wrote:
 hmm, on Mon, Jul 26, 2010 at 12:12:32AM +0200, David Vasek said that

  It is not what happened. The -t msdos was forced by you. But you

 ah shit.  you are right :]

 and it worked because ffs does not overwrite the beginning
 of the partition.

 i misinterpreted what happened,
 but this is still a problem, right? :]

 -f

 It's a problem in that something bad happened, but that is because
 of an operator error.  In particular a root operator error: being root
 has the potential for unlimited error.  There is no fix or check for
 rm -rf /, is there.

 I've not looked at the code so I can't intelligently comment on what
 checks you can or cannot do, but the fundamental issue is that root
 has to be aware of every command entered, and must be prepared
 to fix *anything*.  An OS cannot prevent you from most problems.
 Well, Windows tries, but look at what it feel like to use it...

 --
 STeve Andre'
 Disease Control Warden
 Dept. of Political Science
 Michigan State University

 A day without Windows is like a day without a nuclear incident.



-- 
Sent from my mobile device

http://www.glumbert.com/media/shift
http://www.youtube.com/watch?v=tGvHNNOLnCk
This officer's men seem to follow him merely out of idle curiosity.
-- Sandhurst officer cadet evaluation.
Securing an environment of Windows platforms from abuse - external or
internal - is akin to trying to install sprinklers in a fireworks
factory where smoking on the job is permitted.  -- Gene Spafford
learn french:  http://www.youtube.com/watch?v=30v_g83VHK4



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Philip Guenther
On Sun, Jul 25, 2010 at 4:16 PM, bofh goodb...@gmail.com wrote:
 Ok, when I first learnt how to use unix nearly 20 years ago, one of
 the things I learnt was that a privileged user can break shit, but
 should not cause kernels to hang or crash.  That would be considered a
 bug.  Only DOS and windows 3.1 do that :)

Hahahaha

cp /etc/termcap /dev/mem

That has crashed *every* version UNIX I have worked with, substituting
an alternative large file on those pure sysv systems without
/etc/termcap, of course.

But let's say we figure out a way to do what you suggest and have the
kernel robust and protected against all actions of a privileged user.
What does that get us?  They can still fuck up ld.so or libc, and
poof, most the programs on the system will crash when started!
Overwrite /etc/passwd with /dev/random and rename /bin and your system
will stop being useful.

WHAT PROBLEM ARE YOU TRYING TO SOLVE?


Philip Guenther



Re: mount ffs as msdos, system hangs

2010-07-25 Thread frantisek holop
hmm, on Sun, Jul 25, 2010 at 04:33:27PM -0700, Philip Guenther said that
 What does that get us?  They can still fuck up ld.so or libc, and
 poof, most the programs on the system will crash when started!
 Overwrite /etc/passwd with /dev/random and rename /bin and your system
 will stop being useful.
 
 WHAT PROBLEM ARE YOU TRYING TO SOLVE?

the borderline between the useful and useless error checking
is sometimes a bit fuzzy i think.

i personally think this is an issue, perhaps not an important
one, but one that i dont associate with bsd superior quality,
that's all.  i mean what was the chance of happening of this?
but it could help make the system more robust..
it highlighted an issue outside the box.

-f
-- 
bungee diving - living it up when you're going down!



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Philip Guenther
On Sun, Jul 25, 2010 at 11:29 AM, Robert info...@die-optimisten.net wrote:
 I haven't tried this mount, but IMHO if you mount some garbage as a
 specific file system type, then the OS should give you an error and
 deny the mount. It should not crash.
 Maybe you are mounting through a script, for automated backups, or
 through the automounter. Now if you insert by accident a wrong medium
 then this shouldn't lead to a crash.

You want the kernel to detect a bad filesystem at mount time.  Let's
think through the consequences of that.  You can crash a system right
now by mounting an otherwise valid ffs partition that has been
corrupted in particular ways.  This has been documented for *decades*
on the mount_ffs man page.  (I recall seeing it on the manpage in
SunOS 4.1.0 in 1991 or so.)  To prevent that, fsck would have to be
built into the kernel (you might replace the binary, after all) and
run on each mount.  Note that 'preen' mode can be trivially tricked
too, so each call to mount() will do a full fsck.

What, you want to be able to mount a clean 1TB partition in less than
an hour?  But there might be some corruption in the structures around
the 800GB mark!

Oh, so you think we should defer this until the data is actually
accessed?  Really?  Have you tried to work out the correctness
invariants for this?  Remember, since this is an NFS server, stuff can
be accessed right after mount without path walking, so your invariants
can't depend on path checking being done for them...


If you're writing a script that needs to mount possibly corrupt data,
then you need to screw your head on and do things like run fsck -y -t
whatever on the device first.  And use a sane fs type.


Philip Guenther



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Tony Abernethy
frantisek holop wrote:
 the borderline between the useful and useless error checking
 is sometimes a bit fuzzy i think.


Not THAT fuzzy.
Foreign file systems NEVER get prime attention.
When you do stupid things the results are rather predictable
and you compound your error by trying to blame everybody else
for your own singular lack of sanity.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread STeve Andre'
I think that is a fundamentally flawed assumption.  Root can do
*ANYTHING*.  Anything at all.  Sure, preventing crashes is good,
but you can't get around the fact that root is omniscient.

On Sunday 25 July 2010 19:16:05 bofh wrote:
 Ok, when I first learnt how to use unix nearly 20 years ago, one of
 the things I learnt was that a privileged user can break shit, but
 should not cause kernels to hang or crash.  That would be considered a
 bug.  Only DOS and windows 3.1 do that :)

 On 7/25/10, STeve Andre' and...@msu.edu wrote:
  On Sunday 25 July 2010 18:40:19 frantisek holop wrote:
  hmm, on Mon, Jul 26, 2010 at 12:12:32AM +0200, David Vasek said that
 
   It is not what happened. The -t msdos was forced by you. But you
 
  ah shit.  you are right :]
 
  and it worked because ffs does not overwrite the beginning
  of the partition.
 
  i misinterpreted what happened,
  but this is still a problem, right? :]
 
  -f
 
  It's a problem in that something bad happened, but that is because
  of an operator error.  In particular a root operator error: being root
  has the potential for unlimited error.  There is no fix or check for
  rm -rf /, is there.
 
  I've not looked at the code so I can't intelligently comment on what
  checks you can or cannot do, but the fundamental issue is that root
  has to be aware of every command entered, and must be prepared
  to fix *anything*.  An OS cannot prevent you from most problems.
  Well, Windows tries, but look at what it feel like to use it...


-- 
STeve Andre'
Disease Control Warden
Dept. of Political Science
Michigan State University

A day without Windows is like a day without a nuclear incident.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Peter Theunis
STeve Andre' [and...@msu.edu] wrote:
 I think that is a fundamentally flawed assumption.  Root can do
 *ANYTHING*.  Anything at all.  Sure, preventing crashes is good,
 but you can't get around the fact that root is omniscient.
 

Had this 'root' been *omniscient*, the incident wouldn't have
happened. You probably meant to say that root is, in fact *omnipotent* !

p

 On Sunday 25 July 2010 19:16:05 bofh wrote:
  Ok, when I first learnt how to use unix nearly 20 years ago, one of
  the things I learnt was that a privileged user can break shit, but
  should not cause kernels to hang or crash.  That would be considered a
  bug.  Only DOS and windows 3.1 do that :)
 
  On 7/25/10, STeve Andre' and...@msu.edu wrote:
   On Sunday 25 July 2010 18:40:19 frantisek holop wrote:
   hmm, on Mon, Jul 26, 2010 at 12:12:32AM +0200, David Vasek said that
  
It is not what happened. The -t msdos was forced by you. But you
  
   ah shit.  you are right :]
  
   and it worked because ffs does not overwrite the beginning
   of the partition.
  
   i misinterpreted what happened,
   but this is still a problem, right? :]
  
   -f
  
   It's a problem in that something bad happened, but that is because
   of an operator error.  In particular a root operator error: being root
   has the potential for unlimited error.  There is no fix or check for
   rm -rf /, is there.
  
   I've not looked at the code so I can't intelligently comment on what
   checks you can or cannot do, but the fundamental issue is that root
   has to be aware of every command entered, and must be prepared
   to fix *anything*.  An OS cannot prevent you from most problems.
   Well, Windows tries, but look at what it feel like to use it...
 
 
 -- 
 STeve Andre'
 Disease Control Warden
 Dept. of Political Science
 Michigan State University
 
 A day without Windows is like a day without a nuclear incident.
 

-- 
I'm a VIP at my local liquor store and I'm root. Fear me !
--
PGP-Key: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x78AE48D9
PGP-Fingerprint: B4B5 2521 73BF 4BA3 13D2  80ED CF26 BE66 78AE 48D9



Re: mount ffs as msdos, system hangs

2010-07-25 Thread frantisek holop
hmm, on Sun, Jul 25, 2010 at 08:10:32PM -0400, Tony Abernethy said that
 Foreign file systems NEVER get prime attention.

that's the kind of thinking that comes from redmond.

 When you do stupid things the results are rather predictable
 and you compound your error by trying to blame everybody else
 for your own singular lack of sanity.

i did not blame anyone for my mistake.
just because you report what happened to you
and ask what the others think about, doesnt
mean that i blame them or demand a fix.
it could very well have happened that someone
said, yes this might be a bug, and someone
might have tried to fix it.  the end.

instead of saying right at beginning that for
this and this reason this and this happened
and for this and this reason it is not considered
a problem, this thread could have been a valuable
resource for the archive; but i was sent reading
the source, my parents were insulted and i was
sent to drown in a lake. now i also lack sanity.

well done misc@, living up to your name.
the bootcamp of the internet.

-f
-- 
to know the road ahead, ask those coming back.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Theo de Raadt
 hmm, on Sun, Jul 25, 2010 at 08:10:32PM -0400, Tony Abernethy said that
  Foreign file systems NEVER get prime attention.
 
 that's the kind of thinking that comes from redmond.

You have no right to speak.

  When you do stupid things the results are rather predictable
  and you compound your error by trying to blame everybody else
  for your own singular lack of sanity.
 
 i did not blame anyone for my mistake.
 just because you report what happened to you
 and ask what the others think about, doesnt
 mean that i blame them or demand a fix.
 it could very well have happened that someone
 said, yes this might be a bug, and someone
 might have tried to fix it.  the end.
 
 instead of saying right at beginning that for
 this and this reason this and this happened
 and for this and this reason it is not considered
 a problem, this thread could have been a valuable
 resource for the archive; but i was sent reading
 the source, my parents were insulted and i was
 sent to drown in a lake. now i also lack sanity.
 
 well done misc@, living up to your name.
 the bootcamp of the internet.

You are the one who makes misc what it is.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Kenneth R Westerback
On Sun, Jul 25, 2010 at 10:46:50PM +0200, frantisek holop wrote:
 hmm, on Sun, Jul 25, 2010 at 02:29:25PM -0600, Theo de Raadt said that
   i think it doesnt matter what the user is, this shouldnt
   be happening.
  
  We make the source code available, and yet noone here has even sat down
  for 30 seconds and gone and checked the kernel msdos mount code and realized
  that it almost nothing it can validate a filesystem on.
 
 does that almost nothing include the partition type number?
 because i dont see why would the kernel msdos mount code
 even try to start mounting an msdos filesystem with type of A6.

If you wanted to mount according to the partition type number, DON'T
USE '-t blah'. We give you the option to OVERRIDE the partition
type number and you made use of that override. You have taken command
and we will watch your further progress with interest.

We give you the pistol. Even bullets. Shooting the rabbit or your
foot is up to you.

 Ken

 
  It saw that space of disk, validated it as msdos, and mounted it.
  
  This is not ffs.  When you do stuff like that, we are not your nanny.
 
 are you really implying that there is no way to identify
 a partition as various types of FAT?  i think it's time
 that you did some reading..
 
 -f
 -- 
 to get a loan you must prove you don't need it.



Re: mount ffs as msdos, system hangs

2010-07-25 Thread J Sisson
On Sun, Jul 25, 2010 at 8:01 PM, frantisek holop min...@obiit.org wrote:

 well done misc@, living up to your name.
 the bootcamp of the internet.


It's better to create a crappy diff that gets rejected than whine
incessantly on a mailing
list that by your own admission has a reputation for being like boot camp.

You claim to know a decent amount about the situation, why not at least take
a crack
at a fix?



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Tony Abernethy
frantisek holop wrote:
 to know the road ahead, ask those coming back.

You mean the ones who like it so much they travel it twice?



Re: mount ffs as msdos, system hangs

2010-07-25 Thread Brynet
bofh wrote:
 Ok, when I first learnt how to use unix nearly 20 years ago, one of
 the things I learnt was that a privileged user can break shit, but
 should not cause kernels to hang or crash.  That would be considered a
 bug.  Only DOS and windows 3.1 do that :)

Unfortunately it's not that black and white, root can do some evil stuff
with the mem/kmem, drm/xf86 and a boat loat of other gateways into
kernel land.

The point is that root can do a lot of stupid things, this is a feature,
not a bug.. abuse wisely.

In this case the kernel was told, by root, to interpret garbage on some
partition.. pleasing 'root' is a high priority to 'kernel', they have a
friends with benefits relationship.

It's the best peep show I've seen, excluding all the ones with boobs.

Enjoy Unix, I sure do.
-Bryan.