From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.parknet.co.jp (mail.parknet.co.jp [210.171.160.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88E271DF74F for ; Sat, 11 Apr 2026 17:32:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.171.160.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775928767; cv=none; b=NQ5OFTs6RgzukG6S9E83492MapPAyuWGSFbPAgm8boqBLlg63w7ppPPoiRiYEeYWrJyVxGitWwDf1LgSYK177pc4saSvOeye4pZXEX+sbNWBFnwfbgqfX9BJF4skkXoTSBAhQHE7bOajQnkiAN658sbio0v70QIkVPsi+In28gc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775928767; c=relaxed/simple; bh=x33NLZ4BCKYpeyP36KAMcRt2BAETSlLvYi9sfCCn+3U=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=hkmAX++xIG+IFhRZ39RJA3X2n+TSdu/jwsU6P7khmKd960dvL8K0PWUYWQvWohb4GkRnYU8T23dbNcWxy8fsz+T75+WnQne60/dRwitLHrHI+JutFptsNdO1Q3kObKfit62oGhcUo2d0anU6WKJp3BqupksR7mX39JBr5WApWBs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mail.parknet.co.jp; spf=pass smtp.mailfrom=parknet.co.jp; dkim=pass (2048-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b=rx1oaVRb; dkim=permerror (0-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b=W3lGGdDx; arc=none smtp.client-ip=210.171.160.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mail.parknet.co.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=parknet.co.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b="rx1oaVRb"; dkim=permerror (0-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b="W3lGGdDx" Received: from ibmpc.myhome.or.jp (server.parknet.ne.jp [210.171.168.39]) by mail.parknet.co.jp (Postfix) with ESMTPSA id 960D120A0176; Sun, 12 Apr 2026 02:32:36 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=parknet.co.jp; s=20250114; t=1775928756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AXZe8sxi5NKmVuUipw8L/cLrnsmA6anNHpiub0LFXNU=; b=rx1oaVRbpVLAsamV45vtlMHw0hcEjzyLr/O6ML3L/LGx0Sz+0W3zSsp9yn6c7R9+cRO5hp 6SJeOHbiRHMhpCS62ffaX96t2BBSlFBkb9UKznS3/1hj9bsLlEjhQAeTPmyz08kF+yIc3E GRztlxG4gehtOGT7UhCxEa3BZDKRlbIQcdzZXgZrvngwWiEWGVL6OvWW4WlXSOB8yFh2nw 0HpNvjjnLct6RNE8zfYpPCw1HHNMH3Jgzt/sLR9VLN5DhRTwaQG/Qepqe2BnQLMDTvG9ik inl+GWq+HDl0+y/JwmuyEqjEsrdAY4xyJS0yjHh5FH/YV1SnQS0PW3TvU1VZWA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=parknet.co.jp; s=20250114-ed25519; t=1775928756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AXZe8sxi5NKmVuUipw8L/cLrnsmA6anNHpiub0LFXNU=; b=W3lGGdDxfot1FXlSeAjuw6RkqD9C26f14cdRDcGNH81uovTrG2LHGSwn7LxAKcnAek97F8 FxGA1wDtGpfPVVAA== Received: from devron.myhome.or.jp (devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (Postfix) with ESMTPS id 2610EE00847; Sun, 12 Apr 2026 02:32:36 +0900 (JST) Received: by devron.myhome.or.jp (Postfix, from userid 1000) id 199EF22001A5; Sun, 12 Apr 2026 02:32:36 +0900 (JST) From: OGAWA Hirofumi To: Ziran Zhang Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] FAT: Allow 0xE9 near jump in fat_read_static_bpb() In-Reply-To: <20260411080115.5517-1-zhangcoder@yeah.net> References: <20260411080115.5517-1-zhangcoder@yeah.net> Date: Sun, 12 Apr 2026 02:32:36 +0900 Message-ID: <878qatmmh7.fsf@mail.parknet.co.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Ziran Zhang writes: > The 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. > > Signed-off-by: Ziran Zhang > --- > fs/fat/inode.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/fat/inode.c b/fs/fat/inode.c > index 28f78df08..0f64552e2 100644 > --- a/fs/fat/inode.c > +++ b/fs/fat/inode.c > @@ -1479,8 +1479,8 @@ static int fat_read_static_bpb(struct super_block *sb, > 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)) { Looks like over 80 columns. if ((b->ignored[0] != 0xeb || b->ignored[2] != 0x90) && (b->ignored[0] != 0xe9)) { or such please. Thanks. > if (!silent) > fat_msg(sb, KERN_ERR, > "%s; no bootstrapping code", notdos1x); -- OGAWA Hirofumi