All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-nonmm-stable] fat-allow-0xe9-near-jump-in-fat_read_static_bpb.patch removed from -mm tree
@ 2026-08-04  4:05 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-08-04  4:05 UTC (permalink / raw)
  To: mm-commits, hirofumi, brauner, zhangcoder, akpm


The quilt patch titled
     Subject: FAT: allow 0xE9 near jump in fat_read_static_bpb()
has been removed from the -mm tree.  Its filename was
     fat-allow-0xe9-near-jump-in-fat_read_static_bpb.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Ziran Zhang <zhangcoder@yeah.net>
Subject: FAT: allow 0xE9 near jump in fat_read_static_bpb()
Date: Sun, 12 Apr 2026 14:59:41 +0800

fat_read_static_bpb() only accepts a short jump as a valid bootstrap code
signature for DOS 1.x volumes when the dos1xfloppy mount option is used.

However, according to the Microsoft fatgen103.doc, the BS_jmpBoot field
has two allowed forms: 0xEB 0x??  0x90 (short jump + NOP) and 0xE9 0x?? 
0x??  (near jump).  The specification explicitly states that either form
is acceptable.

This patch relaxes the check to also accept 0xE9 as the first byte of the
jump instruction.

Link: https://lore.kernel.org/20260412070109.5197-1-zhangcoder@yeah.net
Signed-off-by: Ziran Zhang <zhangcoder@yeah.net>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/fat/inode.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/fs/fat/inode.c~fat-allow-0xe9-near-jump-in-fat_read_static_bpb
+++ a/fs/fat/inode.c
@@ -1479,8 +1479,9 @@ static int fat_read_static_bpb(struct su
 	int error = -EINVAL;
 	unsigned i;
 
-	/* 16-bit DOS 1.x reliably wrote bootstrap short-jmp code */
-	if (b->ignored[0] != 0xeb || b->ignored[2] != 0x90) {
+	/* 16-bit DOS 1.x reliably wrote bootstrap short-jmp or near-jmp code */
+	if ((b->ignored[0] != 0xeb || b->ignored[2] != 0x90) &&
+	    (b->ignored[0] != 0xe9)) {
 		if (!silent)
 			fat_msg(sb, KERN_ERR,
 				"%s; no bootstrapping code", notdos1x);
_

Patches currently in -mm which might be from zhangcoder@yeah.net are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-04  4:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04  4:05 [merged mm-nonmm-stable] fat-allow-0xe9-near-jump-in-fat_read_static_bpb.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.