public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.0-test9 Root no longer permitted to format floppies?
@ 2000-12-07 16:54 Richard B. Johnson
  2000-12-07 18:05 ` Tigran Aivazian
  2000-12-07 19:28 ` Andries Brouwer
  0 siblings, 2 replies; 4+ messages in thread
From: Richard B. Johnson @ 2000-12-07 16:54 UTC (permalink / raw)
  To: Linux kernel


Script started on Thu Dec  7 11:44:01 2000
# fdformat /dev/fd0h1440
Double-sided, 80 tracks, 18 sec/track. Total capacity 1440 kB.
Formatting ... 
ioctl(FDFMTBEG): Operation not permitted
# exit
exit
Script done on Thu Dec  7 11:44:42 2000

Who do you have to be in order to format floppy drives? Or have all
the ioctl numbers been changed since 2.2.18 ?

write(1, "Double-sided, 80 tracks, 18 sec/"..., 63) = 63
write(1, "Formatting ... ", 15)         = 15
ioctl(3, 0x247, 0)                      = -1 EPERM (Operation not permitted)
brk(0)                                  = 0x804af98
brk(0x804afe8)                          = 0x804afe8
brk(0x804b000)                          = 0x804b000
brk(0x804c000)                          = 0x804c000


It looks like they should still be okay?

fd.h:#define FDFMTBEG _IO(2,0x47)
fd.h:#define	FDFMTTRK _IOW(2,0x48, struct format_descr)
fd.h:#define FDFMTEND _IO(2,0x49)

Maybe a broken MACRO?

Cheers,
Dick Johnson

Penguin : Linux version 2.4.0 on an i686 machine (799.54 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.4.0-test9 Root no longer permitted to format floppies?
  2000-12-07 16:54 2.4.0-test9 Root no longer permitted to format floppies? Richard B. Johnson
@ 2000-12-07 18:05 ` Tigran Aivazian
  2000-12-07 18:38   ` Richard B. Johnson
  2000-12-07 19:28 ` Andries Brouwer
  1 sibling, 1 reply; 4+ messages in thread
From: Tigran Aivazian @ 2000-12-07 18:05 UTC (permalink / raw)
  To: Richard B. Johnson; +Cc: Linux kernel

there was an issue with floppy ioctls and permission checks in block
device ->open routine recently. Just use test12-pre7 or other sufficiently
recent kernel and it will work.

If you _do_ want to know what's going on -- look for the thread where I
reported that floppies can't me mounted readonly, then AV proposed the
fix, then it turned out that Alain Knaff forgot to put his name in the
MAINTAINERS file so we didn't tell him about the fix and it apparently
broke some userspace tools. Later on, it was fixed in a way that makes
everyone happy.

Regards,
Tigran

 On Thu, 7 Dec 2000, Richard B. Johnson
wrote:

> 
> Script started on Thu Dec  7 11:44:01 2000
> # fdformat /dev/fd0h1440
> Double-sided, 80 tracks, 18 sec/track. Total capacity 1440 kB.
> Formatting ... 
> ioctl(FDFMTBEG): Operation not permitted
> # exit
> exit
> Script done on Thu Dec  7 11:44:42 2000
> 
> Who do you have to be in order to format floppy drives? Or have all
> the ioctl numbers been changed since 2.2.18 ?
> 
> write(1, "Double-sided, 80 tracks, 18 sec/"..., 63) = 63
> write(1, "Formatting ... ", 15)         = 15
> ioctl(3, 0x247, 0)                      = -1 EPERM (Operation not permitted)
> brk(0)                                  = 0x804af98
> brk(0x804afe8)                          = 0x804afe8
> brk(0x804b000)                          = 0x804b000
> brk(0x804c000)                          = 0x804c000
> 
> 
> It looks like they should still be okay?
> 
> fd.h:#define FDFMTBEG _IO(2,0x47)
> fd.h:#define	FDFMTTRK _IOW(2,0x48, struct format_descr)
> fd.h:#define FDFMTEND _IO(2,0x49)
> 
> Maybe a broken MACRO?
> 
> Cheers,
> Dick Johnson
> 
> Penguin : Linux version 2.4.0 on an i686 machine (799.54 BogoMips).
> 
> "Memory is like gasoline. You use it up when you are running. Of
> course you get it all back when you reboot..."; Actual explanation
> obtained from the Micro$oft help desk.
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> Please read the FAQ at http://www.tux.org/lkml/
> 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.4.0-test9 Root no longer permitted to format floppies?
  2000-12-07 18:05 ` Tigran Aivazian
@ 2000-12-07 18:38   ` Richard B. Johnson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard B. Johnson @ 2000-12-07 18:38 UTC (permalink / raw)
  To: Tigran Aivazian; +Cc: Linux kernel

On Thu, 7 Dec 2000, Tigran Aivazian wrote:

> there was an issue with floppy ioctls and permission checks in block
> device ->open routine recently. Just use test12-pre7 or other sufficiently
> recent kernel and it will work.
> 
> If you _do_ want to know what's going on -- look for the thread where I
> reported that floppies can't me mounted readonly, then AV proposed the
> fix, then it turned out that Alain Knaff forgot to put his name in the
> MAINTAINERS file so we didn't tell him about the fix and it apparently
> broke some userspace tools. Later on, it was fixed in a way that makes
> everyone happy.
> 
> Regards,
> Tigran
> 

Okay. Looks like someone is on top of this.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.0 on an i686 machine (799.54 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.4.0-test9 Root no longer permitted to format floppies?
  2000-12-07 16:54 2.4.0-test9 Root no longer permitted to format floppies? Richard B. Johnson
  2000-12-07 18:05 ` Tigran Aivazian
@ 2000-12-07 19:28 ` Andries Brouwer
  1 sibling, 0 replies; 4+ messages in thread
From: Andries Brouwer @ 2000-12-07 19:28 UTC (permalink / raw)
  To: Richard B. Johnson; +Cc: Linux kernel

On Thu, Dec 07, 2000 at 11:54:38AM -0500, Richard B. Johnson wrote:

> # fdformat /dev/fd0h1440
> Double-sided, 80 tracks, 18 sec/track. Total capacity 1440 kB.
> Formatting ... 
> ioctl(FDFMTBEG): Operation not permitted

Probably an old fdformat?
Try a recent util-linux.


[I forgot the details - people will correct me -
Old situation: a special kludge in floppy.c allows ioctls,
including formatting, on a fd opened without read or write
permission. And the old fdformat did just that.
Some cleanup removed the kludge, and fdformat had to open
the fd for writing. So the util-linux fdformat was updated.
Later Alain Knaff said that the old kludge remained necessary,
because one might wish to use ioctl's on write protected floppies.
Maybe the change was partially reverted, I have not checked.]

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-12-07 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-07 16:54 2.4.0-test9 Root no longer permitted to format floppies? Richard B. Johnson
2000-12-07 18:05 ` Tigran Aivazian
2000-12-07 18:38   ` Richard B. Johnson
2000-12-07 19:28 ` Andries Brouwer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox