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 F15D63B7B8C 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=1779778393; cv=none; b=ofNXPRa+Zt7cz+XmPTJd9FVvwSL6IS8jgA4bw/WWOV0bBstKPted0xefJ67QOp6tWRFkpfs/BNm65hPt5GjHuHQsduEu73hsqbNCtJ077smL3PH4lJ8c8tBJlZaNat6g93/Xm8DLMs7y8++toZOHq+vD3t+9fJCpivtaQ3DevV8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779778393; c=relaxed/simple; bh=lI94k3K5Kcc20pekEfGAOaAomJ1QgkYtP6G74MUe9gk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pVKToj7FU4QSwJwyxycc01G0JGIz4f4zM8PjfXkQY5/dwfzfUEoOuU4emvoIrb0JeVnb/omCvsY/7gc/jih5lpTGOEsu461IKOuWesmzL9QhR4ZL4vzECD/9bh09EklIlAmeyJ6RZKehAR51F/qqDuXng2rs+MuvHnw0vI+BfI8= 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-459bf19e87bso5943361f8f.1 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=BmbUk7SXwkteutr7sdGOFzpAg0mzfpnxpMJ3fjGvWdc/jY7BBF/Yj2Rg2FOGLshwP1 A0maieYZn6DUiaF/G2d9HzueRmqYARoV12sPmv8tKHXN3/iTwT3IQbHor4BL8jlglqP2 0CIVPOiLmjXIJrKqsx+/kfoiXB99NMK2xjN4A97A8ViMS+WnMm9DUnrVCOgxWOqmGWWj 1NsKTMOAIpQ9PTKoZwa6fMK1Fs6xEWP2M5HXznBolGYs+VLVvBv/rVvzW+blgZuAwWy/ KkKO+9rkwmiSe1bh/hCgUcKiDX7zwQH1Cm4FwFSGLL2IN8yX7t6/A8qF1ZxIx+IS6VK4 3yfw== X-Forwarded-Encrypted: i=1; AFNElJ8STqNgMtP74EI9mj4x/nQKVSaixKZeJsflI2rGWrpaJzUh9bWiBEGyvaX+JNrWw/H7d4jGr5IE2EwxUpKQ@vger.kernel.org X-Gm-Message-State: AOJu0YzA1OZm77tOMbIzOE28JtLIoqp73ZcgxfBil97feMwoQeWDBZ9Q rvLySXOSmIf8DtV6uCCSAP40pyjjnlYxKPQQ1uz3uYletE02C4/A+7Ag/MAlba33G8M= X-Gm-Gg: Acq92OGUzCTfjmz3onafxAOVdjsz4AjwCnr5Cm6hmhqPbwStTgSJrja1Xn42Gmhnsz3 HsE5TpvkncM5A8grPnVHlvKYHZVzitbp0JMiy8k+JZv2VEYSmCnUGlKc9WtyBZVDKFbJtEf0CD0 lVdt4LLJFgdSRIFl3um1QiSpT0VyN91KcDPvC4tHfVLerurXtxxvIYKxBXq2qg1ZMPqSn6+kjPc NzEqOzKP4En4Uch5fHg1Nm31ClhOc38cfks9IsvZVirWIdt2vBw07D6gzVeMyaJsByc5vdVO7kd IkXCN+EiE2NpaabHRAQ/U6cFhlHgVjG2tTq1Kv2jfPn835rzAHjGLReljcodIB+QFFeWgpE3OFg RWef7lE1BHbChF0QLvP7cbIuFNSHWpKrta5ygbRFi8RPoOd48i6Xbe1KPswVPdH8w9XQg4OBoWx zsRhFTkk/ky5EiUCTJvY4Zpg7JURJhJtUplvfCikj5PbpvXeMghUWngW5sij8Ryb+bn5qL5D5dd rpa9ZzSfeqZ3yvO3oNnBuacCrghlZOxNNCc0pUxaaGyUkoqstUTFyp+/r8PA9Z62eaxp/3Otr0E 15uU 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-modules@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