Dr. Tilmann Bubeck
393d1d1d76
ext4: implementation of a new ioctl called EXT4_IOC_SWAP_BOOT
...
Add a new ioctl, EXT4_IOC_SWAP_BOOT which swaps i_blocks and
associated attributes (like i_blocks, i_size, i_flags, ...) from the
specified inode with inode EXT4_BOOT_LOADER_INO (#5 ). This is
typically used to store a boot loader in a secure part of the
filesystem, where it can't be changed by a normal user by accident.
The data blocks of the previous boot loader will be associated with
the given inode.
This usercode program is a simple example of the usage:
int main(int argc, char *argv[])
{
int fd;
int err;
if ( argc != 2 ) {
printf("usage: ext4-swap-boot-inode FILE-TO-SWAP\n");
exit(1);
}
fd = open(argv[1], O_WRONLY);
if ( fd < 0 ) {
perror("open");
exit(1);
}
err = ioctl(fd, EXT4_IOC_SWAP_BOOT);
if ( err < 0 ) {
perror("ioctl");
exit(1);
}
close(fd);
exit(0);
}
[ Modified by Theodore Ts'o to fix a number of bugs in the original code.]
Signed-off-by: Dr. Tilmann Bubeck <t.bubeck@reinform.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-04-08 12:54:05 -04:00
..
2013-03-03 10:16:19 -08:00
2012-11-26 14:22:21 +01:00
2013-02-13 13:43:02 +01:00
2012-12-17 17:15:25 -08:00
2012-12-15 13:03:48 -08:00
2013-01-22 17:51:01 +00:00
2013-02-21 17:22:25 -08:00
2012-04-16 14:37:13 +02:00
2013-01-09 08:05:11 -08:00
2013-02-27 19:10:22 -08:00
2012-11-09 18:07:11 +05:30
2013-02-28 12:52:24 -08:00
2012-06-26 21:19:02 -07:00
2013-02-02 00:01:16 +01:00
2012-09-04 01:35:44 +02:00
2012-04-03 13:09:18 +02:00
2012-10-08 13:50:12 +10:30
2013-03-05 17:22:08 -08:00
2013-03-15 17:34:01 -07:00
2013-02-25 16:46:44 -08:00
2013-01-22 09:41:43 -08:00
2013-01-01 11:18:26 -02:00
2013-01-20 19:22:19 +10:00
2012-04-20 09:24:27 -07:00
2012-11-19 14:28:24 +01:00
2012-03-30 16:03:15 -07:00
2013-04-08 12:54:05 -04:00
2012-11-14 15:07:18 -08:00
2012-12-14 08:48:59 +01:00
2013-03-18 21:19:49 +01:00
2013-03-22 11:18:34 +01:00
2012-03-07 16:08:24 +01:00
2012-09-01 09:57:10 -07:00
2012-03-30 16:03:15 -07:00
2012-09-20 16:49:17 -04:00
2013-03-11 07:49:37 -07:00
2013-01-31 19:20:33 -05:00
2012-03-30 16:03:15 -07:00
2013-02-27 12:28:30 -08:00
2012-07-18 18:35:57 -07:00
2013-01-21 14:52:42 -08:00
2013-02-06 15:59:30 -08:00
2012-05-02 00:10:49 -07:00
2013-03-02 20:09:50 +00:00
2012-11-19 14:28:24 +01:00
2012-12-06 13:54:48 -05:00
2013-01-26 22:20:06 -08:00
2013-03-19 21:21:51 +09:00
2013-01-10 01:27:46 +01:00
2012-04-16 14:37:13 +02:00
2013-01-24 17:25:13 +01:00
2013-03-04 14:23:11 +01:00
2013-02-15 17:02:25 +11:00
2012-10-02 21:14:29 +10:00
2012-11-16 09:59:58 -08:00
2012-03-30 16:03:15 -07:00
2012-09-13 16:52:04 +02:00
2013-02-22 15:37:15 +00:00
2012-12-17 17:15:22 -08:00
2013-01-15 21:57:44 -08:00
2013-03-17 10:12:13 +01:00
2013-01-03 15:57:16 -08:00
2013-01-04 16:11:46 -08:00
2012-09-17 17:12:58 -07:00
2013-02-28 19:48:26 -08:00
2013-03-11 07:54:29 -07:00
2012-11-11 18:10:46 -08:00
2013-02-13 17:33:20 -02:00
2013-02-24 13:07:18 -08:00
2013-02-23 17:50:23 -08:00
2013-02-18 13:55:24 -08:00
2013-03-01 12:48:36 +01:00
2013-02-22 19:22:52 -08:00
2012-12-18 21:10:22 -08:00
2013-02-21 12:05:51 -08:00
2013-03-03 12:06:09 -08:00
2013-01-08 14:14:55 -08:00
2012-03-16 20:35:01 +00:00
2013-02-22 11:39:13 +01:00
2013-01-11 11:38:03 -08:00
2012-11-14 09:39:44 -08:00
2012-03-23 16:58:37 -07:00
2012-11-21 13:03:01 -08:00
2013-02-27 19:10:23 -08:00
2012-10-24 17:06:43 +02:00
2012-11-29 03:30:34 -08:00
2013-02-27 15:13:36 +05:30
2012-03-07 16:08:24 +01:00
2012-11-19 14:10:53 +01:00
2013-01-17 12:19:09 -08:00
2012-07-29 21:11:05 -03:00
2012-05-17 19:06:13 -04:00
2012-11-11 19:06:00 +01:00
2012-12-10 15:54:27 +01:00
2012-05-25 16:18:34 +02:00
2013-01-11 11:38:03 -08:00
2013-02-27 19:10:21 -08:00
2012-12-05 23:52:10 +00:00
2012-11-27 21:08:57 +01:00
2013-03-03 12:06:09 -08:00
2012-09-04 16:06:34 -07:00
2012-11-28 18:36:06 +10:00
2013-02-19 08:42:37 +01:00
2013-01-31 19:20:33 -05:00
2012-05-09 13:59:09 -07:00
2012-06-28 12:03:15 +02:00
2013-02-08 13:27:13 -02:00
2013-01-08 14:14:55 -08:00
2012-12-12 17:38:33 -08:00
2012-03-30 16:03:15 -07:00
2012-02-28 16:05:06 +01:00
2012-03-30 16:03:15 -07:00
2012-09-26 19:56:15 +02:00
2013-01-23 16:39:51 +01:00
2013-03-08 15:05:34 -08:00
2012-09-10 17:05:45 +02:00
2012-09-06 22:16:58 -07:00
2012-10-09 16:22:40 +09:00
2012-09-18 12:53:22 +03:00
2013-01-03 15:57:16 -08:00
2012-10-06 03:05:01 +09:00
2012-10-01 15:27:48 +02:00
2012-12-17 17:15:23 -08:00
2012-06-25 12:11:58 -07:00
2012-04-16 14:37:13 +02:00
2013-03-08 15:05:34 -08:00
2012-10-16 09:34:01 -07:00
2012-09-21 10:48:03 -06:00
2012-05-08 16:01:34 -07:00
2012-07-13 22:24:45 -07:00