{"id":2219181,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2219181/?format=json","project":{"id":12,"url":"http://patchwork.ozlabs.org/api/1.0/projects/12/?format=json","name":"Linux CIFS Client","link_name":"linux-cifs-client","list_id":"linux-cifs.vger.kernel.org","list_email":"linux-cifs@vger.kernel.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260402141839.461257-13-huiwen.he@linux.dev>","date":"2026-04-02T14:18:38","name":"[v3,12/13] smb/client: check if SMB1 DOS/SRV error mapping arrays are sorted","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"420b53de94069db74db59aaab3b9dc80bc911c37","submitter":{"id":93029,"url":"http://patchwork.ozlabs.org/api/1.0/people/93029/?format=json","name":null,"email":"huiwen.he@linux.dev"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260402141839.461257-13-huiwen.he@linux.dev/mbox/","series":[{"id":498490,"url":"http://patchwork.ozlabs.org/api/1.0/series/498490/?format=json","date":"2026-04-02T14:18:28","name":"smb: improve search speed of SMB1 maperror","version":3,"mbox":"http://patchwork.ozlabs.org/series/498490/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2219181/checks/","tags":{},"headers":{"Return-Path":"\n <linux-cifs+bounces-10645-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-cifs@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256\n header.s=key1 header.b=pHOLT4Ow;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10645-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev\n header.b=\"pHOLT4Ow\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=91.218.175.172","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.dev","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.dev"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fmkhF5BQ7z1yCs\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 03 Apr 2026 01:27:09 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 93A12303A8DF\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  2 Apr 2026 14:20:20 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 4E5625FDA7;\n\tThu,  2 Apr 2026 14:20:20 +0000 (UTC)","from out-172.mta0.migadu.com (out-172.mta0.migadu.com\n [91.218.175.172])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B5BF21D3F3\n\tfor <linux-cifs@vger.kernel.org>; Thu,  2 Apr 2026 14:20:18 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775139620; cv=none;\n b=cqNFD8JS8HYFRfgpULsRmljgTO2YU5UNLh9ZhboK4WDwjzKE2hEShqu2NM3CuxjqqhhXJoB7TsAyNJN4x3/VFzHnAGw2TQY0LWD0gmRAbWz6dJtwQuvcuRjnQQF73zny1WG5n8aEQzynVTWLS6NLcBm+UYHI1akUYRREfcSu6cI=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775139620; c=relaxed/simple;\n\tbh=3dZQqwqAIhn34Ck/iGekNDeArCK7NmJz/V1ng0QyNe4=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Q4rpffvQPuX892NrChmrUivxsB0einphBwEPpHp+QBd4jGgG/CsoiYNoqMNSoSK25vELnwtvOu9Qm0ksll9mkVAXxfghmi1GloyhJX0cxN80APJM7y1oGY+FkZ/P/yp3czrJqR24Vb0rIUUwzvoXeSe4ZO8y0D5+NOwndhjrpk8=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.dev;\n spf=pass smtp.mailfrom=linux.dev;\n dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev\n header.b=pHOLT4Ow; arc=none smtp.client-ip=91.218.175.172","X-Report-Abuse":"Please report any abuse attempt to abuse@migadu.com and\n include these headers.","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1;\n\tt=1775139616;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=sQnXWuMlmwBukSBB50TW9nKs2RJY8XutuKl1q8W9hZA=;\n\tb=pHOLT4OwAto92Qqp4El17AIUk8HHuPE5bkEjylM03+I//AqxAc/bcE/8V0zKazVFEi7Px8\n\tCVorghlyI5Bmm7NHQ/N3bcHtBcjoik+CIqkNYE+9MLLRUOVohjkb1e7d5g+3iUOkGH+wtj\n\tww4OuGwhFy4rpxhrJapSZrSFzXO5XZw=","From":"huiwen.he@linux.dev","To":"smfrench@gmail.com,\n\tlinkinjeon@kernel.org,\n\tdhowells@redhat.com,\n\tchenxiaosong@kylinos.cn,\n\tchenxiaosong@chenxiaosong.com,\n\ttangyouling@kylinos.cn","Cc":"linux-cifs@vger.kernel.org","Subject":"[PATCH v3 12/13] smb/client: check if SMB1 DOS/SRV error mapping\n arrays are sorted","Date":"Thu,  2 Apr 2026 14:18:38 +0000","Message-ID":"<20260402141839.461257-13-huiwen.he@linux.dev>","In-Reply-To":"<20260402141839.461257-1-huiwen.he@linux.dev>","References":"<20260402141839.461257-1-huiwen.he@linux.dev>","Precedence":"bulk","X-Mailing-List":"linux-cifs@vger.kernel.org","List-Id":"<linux-cifs.vger.kernel.org>","List-Subscribe":"<mailto:linux-cifs+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-cifs+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Migadu-Flow":"FLOW_OUT"},"content":"From: Youling Tang <tangyouling@kylinos.cn>\n\nAlthough the arrays are sorted at build time, verify the ordering again\nwhen cifs.ko is loaded to avoid potential regressions introduced by\nfuture script changes.\n\nSigned-off-by: Youling Tang <tangyouling@kylinos.cn>\nReviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>\n---\n fs/smb/client/smb1maperror.c | 12 ++++++++++++\n 1 file changed, 12 insertions(+)","diff":"diff --git a/fs/smb/client/smb1maperror.c b/fs/smb/client/smb1maperror.c\nindex 28e1c84fa83b..bca9b60ac836 100644\n--- a/fs/smb/client/smb1maperror.c\n+++ b/fs/smb/client/smb1maperror.c\n@@ -219,6 +219,10 @@ static int __init __array ## _is_sorted(void)\t\t\t\t\\\n \n /* ntstatus_to_dos_map_is_sorted */\n DEFINE_CHECK_SORT_FUNC(ntstatus_to_dos_map, ntstatus);\n+/* mapping_table_ERRDOS_is_sorted */\n+DEFINE_CHECK_SORT_FUNC(mapping_table_ERRDOS, smb_err);\n+/* mapping_table_ERRSRV_is_sorted */\n+DEFINE_CHECK_SORT_FUNC(mapping_table_ERRSRV, smb_err);\n \n int __init smb1_init_maperror(void)\n {\n@@ -228,6 +232,14 @@ int __init smb1_init_maperror(void)\n \tif (rc)\n \t\treturn rc;\n \n+\trc = mapping_table_ERRDOS_is_sorted();\n+\tif (rc)\n+\t\treturn rc;\n+\n+\trc = mapping_table_ERRSRV_is_sorted();\n+\tif (rc)\n+\t\treturn rc;\n+\n \treturn rc;\n }\n \n","prefixes":["v3","12/13"]}