From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F14AD317143 for ; Tue, 26 May 2026 06:53:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779778392; cv=none; b=J2/DV8DgDxS40LiB9oAjAlYjeCUh43B8yduTJiDMcGNO0pdbloEHtZXyoFoK4+oGPOyNUl7Q92HEFgwlE8fPtfLXvlBrIVIzyy0PNxeGRPlT4mkjz/oeyyazYLnD/IaLWO8nYpn8Z+8sHdJ3nQ3JibNNzE+vAV1Fuv2kiiUoiNI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779778392; c=relaxed/simple; bh=lI94k3K5Kcc20pekEfGAOaAomJ1QgkYtP6G74MUe9gk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qL4nPjTahSBlCGIPQPKY45S1zc1rOpB/eP3ffYlgMB+FLd5rorolpqm2U0tsjrACPJAnV3Ytiar3Ape7VJ0Hy/hf6PHaduPPDm5NQ4h14YAQ+9IhGR13asN5KBtSjox0CJoVYa7N5bIElw41UzohiAs/uZvsi71NEVp9s1BYgpg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=TR/s+dSF; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="TR/s+dSF" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-44e1860558fso6501816f8f.0 for ; Mon, 25 May 2026 23:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1779778389; x=1780383189; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yXWASYjT/jE4WzpKhE8nVhHkzGwmPlTITkkcMF0D8BI=; b=TR/s+dSFI2Vk05JY9oKvhTkUPLyGjERphtpAPMGuiQxvuv3fbFSbN1th4lK+bttysm cFb/iWCpkNb08kRUbTcn9WjfJUaB3xcjwa8CXEuHNu8ztYYWGwWQbD8loHo0HuyuciOC 0TwcL+CxgU01vXU93n3aCg4f5dmgC1/3cis8o9d493p1B0tb+ArlTCB5LaW6RVOHuZSe xFgNBY2Ddet/gPdHUxjFVULwbZSkZetwjzSKlyv7KFRavsith7RHUAc5uHnKUJqDu/G4 H3+i6q7GH893mbCE8FjnHXqiv6/6t+5ocWoYo60XT6575r8A+rywJ8KG4tumaLrCo8Ff W8Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779778389; x=1780383189; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yXWASYjT/jE4WzpKhE8nVhHkzGwmPlTITkkcMF0D8BI=; b=pVCiu7gTo7AF9hTUDWAcOg8UhP0MPKiwRHSLoyM5+byhIiINVh7mne4GYEn+0WCy0K 4gvNHl9kJUlNCy0vhN3cjgXFKWtPJkYvkW9hXjU+7ZqEw/6yGxi9KiR6kvsdg6ZOFbNH t8NvaKU6+loznw42mxQIYneL9Xi3IMDc2RbNjsFyGscHCVKh4kEUQIZMLGGAVeZs4yEM mqWnwjpbGeoZHzAGZ1LAiFR4Q5BGh2ibL98LOX5p7sdi7g++syVWXbEFwb0l+weopfQv kwPOdx++VKMHrgFiECfWLQaKlNJJgSmSWwh816AEdaMxY5vHSw/qWRKet/8zDOa33pdk qvMg== X-Forwarded-Encrypted: i=1; AFNElJ+44NSuznOqQg9kejuYRbgSuxQIV9msZtfXB5lMBlCaPwqgMzsxbq3s59imiKzxFxzbzrLA5v/ufK4z8w==@vger.kernel.org X-Gm-Message-State: AOJu0YxYEQjpUfMU5b2QjNO4391hQmgrT6H5ey7HTRw8YkBsQZKGlIcL mF6xaX7XpzvG5X3mqTJOGXePRACZcUG7oyhkx+7G85H76xk/V7ZCnsmB7vV6dQov+vI= X-Gm-Gg: Acq92OF4HAftOnxpH3xlVGAAEdFWzUAIk9Nz8AjP+ueEj3cPgHyRqBreAUNCHeeJfc1 VDBGW+2Fj7LSgdsMxQeYjLi1i9EJ3p1hx3jn/j75u/+FtyKpiI1ZEQ81RKlxMGz6/FUhKizk8sR qv5uYqzrQ+AM+rPOdswxrTV2dVOrnk5kA5ju/7SzrCP7aWsBCyClBJTbC7iJKPtXa/jNgS0dDtf Bs1ipZQjM3vcIL7YMb0itpplkU4Wn948jF1OFBCJHh6oh6sezILvE05jx5/bu3eXTUCVYMVjO6A YrVsd5tS4f87j9pXd41kULOMe9ehJjFEj0KpE1el9FNF0v8phS8WyGie5ZPh+1p5N2jMb/yAp44 FZLWHkdlQe5XYi0VjR8JktOSLu1X0JTEyeL6V78DJTytbrQheepHTbsaCzmckJFm8u0M7WcWLIp NuhkXXknyhWjALhwTgwMomyctE9qfQJfYI2JwJzWfcMg+21VwbFks/SaLzQClpP1+S5as4R9QVG abXxdMeVfW8OkwhgEN7BQmYavPIy2k3fLOX26XiNY77F7PjRhm83VDs2cJ2mV8DW9zVbzaLY27a HTdL X-Received: by 2002:a05:6000:2003:b0:43b:4136:1e6f with SMTP id ffacd0b85a97d-45eb38e4b46mr29516257f8f.38.1779778389230; Mon, 25 May 2026 23:53:09 -0700 (PDT) Received: from ?IPV6:2a00:1028:838d:271e:8e3b:4aff:fe4c:a100? (dynamic-2a00-1028-838d-271e-8e3b-4aff-fe4c-a100.ipv6.o2.cz. [2a00:1028:838d:271e:8e3b:4aff:fe4c:a100]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45eb6c9ba2esm33848641f8f.8.2026.05.25.23.53.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 May 2026 23:53:08 -0700 (PDT) Message-ID: <88c5ca1d-eeda-4023-bc7a-397b92780db9@suse.com> Date: Tue, 26 May 2026 08:53:06 +0200 Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/11] Convert moduleparams to seq_buf To: Kees Cook Cc: Luis Chamberlain , Pengpeng Hou , Richard Weinberger , Anton Ivanov , Johannes Berg , "Rafael J. Wysocki" , Len Brown , Corey Minyard , Gabriel Somlo , "Michael S. Tsirkin" , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Simona Vetter , Bart Van Assche , Jason Gunthorpe , Leon Romanovsky , Laurent Pinchart , Hans de Goede , Mauro Carvalho Chehab , Bjorn Helgaas , Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Greg Kroah-Hartman , Jiri Slaby , Alan Stern , Jason Wang , Xuan Zhuo , =?UTF-8?Q?Eugenio_P=C3=A9rez?= , Jason Baron , Jim Cromie , Tiwei Bie , Benjamin Berg , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , "David E. Box" , "Maciej W. Rozycki" , Srinivas Pandruvada , Peter Zijlstra , Heiko Carstens , Vasily Gorbik , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Vinod Koul , Frank Li , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Alexander Potapenko , Marco Elver , Dmitry Vyukov , Andrew Morton , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Andy Shevchenko , Georgia Garcia , kvm@vger.kernel.org, dmaengine@vger.kernel.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, linux-um@lists.infradead.org, linux-acpi@vger.kernel.org, openipmi-developer@lists.sourceforge.net, qemu-devel@nongnu.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20260521133315.work.845-kees@kernel.org> Content-Language: en-US From: Petr Pavlu In-Reply-To: <20260521133315.work.845-kees@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/21/26 3:33 PM, Kees Cook wrote: > Hi, > > I tried to trim the CC list here, but it's still pretty huge... > > We've had a long-standing issue with "write to a string pointer" callbacks > that don't bounds check the destination (and for which the bounds is > also not part of the callback prototype, even if it is "known" to be > PAGE_SIZE, which sysfs_emit() depends on). Both moduleparams and sysfs > use this pattern. As a first step, and to test the migration method, > migrate moduleparams first. > > There are 2 "mechanical" treewide patches that are handled by Coccinelle: > - treewide: Convert struct kernel_param_ops initializers to DEFINE_KERNEL_PARAM_OPS > - treewide: Convert custom kernel_param_ops .get callbacks to seq_buf via cocci > > The last treewide patch is manual, and may need to be broken up into > per-subsystem patches, though I'd prefer to avoid this, as it would > extend the migration from 1 relase to at least 2 releases. (1 to > release the migration infrastructure, then 1 release to collect all the > subsystem changes, and possibly 1 more release to remove the migration > infrastructure.) > > Thoughts, questions? This looks reasonable to me. I added a few minor comments on the patches but they already look solid. -- Thanks, Petr