lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <174787198211.1484572.66428039447930057.stgit@frogsfrogsfrogs> Date: Wed, 21 May 2025 17:10:19 -0700 From: "Darrick J. Wong" <djwong@...nel.org> To: tytso@....edu Cc: John@...ves.net, linux-ext4@...r.kernel.org, miklos@...redi.hu, joannelkoong@...il.com, bernd@...ernd.com, linux-fsdevel@...r.kernel.org Subject: [PATCH 08/10] libext2fs: allow unix_write_byte when the write would be aligned From: Darrick J. Wong <djwong@...nel.org> If someone calls write_byte on an IO channel with an alignment requirement and the range to be written is aligned correctly, go ahead and do the write. This will be needed later when we try to speed up superblock writes. Signed-off-by: "Darrick J. Wong" <djwong@...nel.org> --- lib/ext2fs/unix_io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 4c924ec9ee0760..008a5b46ce7f1f 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c @@ -1534,7 +1534,9 @@ static errcode_t unix_write_byte(io_channel channel, unsigned long offset, #ifdef ALIGN_DEBUG printf("unix_write_byte: O_DIRECT fallback\n"); #endif - return EXT2_ET_UNIMPLEMENTED; + if (!IS_ALIGNED(data->offset + offset, channel->align) || + !IS_ALIGNED(data->offset + offset + size, channel->align)) + return EXT2_ET_UNIMPLEMENTED; } #ifndef NO_IO_CACHE
Powered by blists - more mailing lists