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 5679A38A71D for ; Mon, 16 Mar 2026 09:37:41 +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=1773653862; cv=none; b=KTpw5WOJz6PdscCUWZp54iPfwV87eGajCiRBNB61D6JeVb9H3T+kvSgFEdJ9cct4s4ilP5+vE0LPA/5ui10Lqe6Yw8vhENGo9nxAxSFm+pcwYEcshTOxP5+1skaznMxKy1+MDmg5TEEM4Y0KTBYy+8e4EjNzsL5hRyahR0gZgDk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773653862; c=relaxed/simple; bh=ohtisd9bI4M2jrBNKDar3gcLV+SZLD/2KJOsPMTSQhg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=a1ztfe5Foid2U4pLn4lzCcDLm/mj03SxYFD/j+RzdRdsRC6YL+lFya/ruGUdC8wlZsjIWs7IIr1YumRsCwqTkAWpojB2Nui/Rucdy0KMpdG823n2KT9Dw2gnzyA1N+RUqawwVG72Dmv3COO+y7hcDMJfESdIkTkRQEMXadDFIho= 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=PEJ6lG6c; 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="PEJ6lG6c" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-439c5b40f60so3360054f8f.0 for ; Mon, 16 Mar 2026 02:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1773653860; x=1774258660; 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=v4sLqVtfcMBLmTxrObzblhtIIUozWNm6DMsskCa56uA=; b=PEJ6lG6cAOcZ9f3Zw8N0ZRIRdSI2oxHEVdK03bAPFLXTWTvLgDyTDF6Rr22kzHrqs6 0XAxs0n+B6Xrb+Jw5uVdVo52VWcP6doA1FXTYBJJHiuGD30L5/HzzMEnLrmqdQTqs3gC ww7hGb4TCEPkyKOeZFhSoWd5NnR4LgTNkaaBXWiUYlbSAH9TdC9LOTk8dDbpVI/4YA5z UfGUqoAYY8hiP7c1VFZNlVkxL7xlwUSZTs+n0dxUGvKW6zCIeMco7HHe+Tedwzd0lZT6 54WOIqiF5+iwckypztJcFCA01XshoKETqau4IGG7EP23Nfh299Oep2BSJnP1V52G4Rkq 9zmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773653860; x=1774258660; 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=v4sLqVtfcMBLmTxrObzblhtIIUozWNm6DMsskCa56uA=; b=Vlq5fPVqB+lFfknuA5wVX15rhzLnxJ+iUKXD4N5CZVlhU2eCDiYoyp/E/gORv6ij4j AKh9Jnpjt1KX+ketoUZKAN7uIohZqei8KBlBnlFL3fjrvmf9LZQoMnsFxJFG/6julcUE kuK3WUlDGOT6mWwiP0fv+StUgGwLdbTj3o+D25eiHNEeVvIv7P/JUSvOQCi1guc9v0np Ekpu4uZbYILpC34/JUWZEAyzYXR31vvbLCjGSTzuC6icYPnjfglgVs4/TdlD2OIsXSld nVlRPQT1+zbdTR2jRWqK8inpXtPiCfYro5z6ItpasBdT709DeH8dAaYRqIJSo1CA59y2 XF+w== X-Forwarded-Encrypted: i=1; AJvYcCXhrlyhQeyzEXB96IYEH3CMygo7Lcx0VStk2kjqCqAm8SqlQosgfDdt4Y0TDNVpQrtXtOI3hrHZzD8l30Y=@vger.kernel.org X-Gm-Message-State: AOJu0Ywy3jWrF36IOMmV7HH5Xm3rYp/G8P4ygxBjYemUoNH81r8F6N/j w80EQELf1/yw5vTdlLsrgI5uFl3ubHzE1wlt6uXv96B5gG8jWRgN16FubHGRFuly90HeXw5T73/ J+srL X-Gm-Gg: ATEYQzylqBNOD/qhfi/qLSkLRpeO0uBVZhFJsxfeEI349JdFqo9T1g2QvbPOH5JbYvF k+99vHbIEFSeXVkW5R137b24A3LlLPhGIQgJkjzoSAmqrW8JIavf03aUcc/fh5cMc4JbA90Dwny WtcUA8yqFbZIwjnYvm6kxYuRrZbrOKYeXy9HkQ7QmIK2an05rNyJ3IEvwnszM1Op1jOVKgBSwkP jXrcGpPhKM5c34jYT+Au8sMdLbRZhvKV1toKg0C+I9NcHoaGJhZn5C3WnbIelwVH/DdKcwsz/UD q+9RP2/A1Ra70IVolxR3uh19SIAPMiHBC6HuXJvg+6sI/Ib28BfLwJ00BjrZlgGr6Iijm+BE3dN sgaDjHjE8XFVLO+c2nC2TLim3qvWN3VB6jiyBpPlPvdorI2mlT8ahMNL5+vZY473aIQw3rQD7FC hq2aAgy5sfF5FWkbgOqIdubsRByxhS3aD9A1dwCzV87HVEbt4YqzeCoXs= X-Received: by 2002:a05:600c:4583:b0:483:badb:618b with SMTP id 5b1f17b1804b1-485567050e9mr210066105e9.24.1773653859640; Mon, 16 Mar 2026 02:37:39 -0700 (PDT) Received: from [10.100.51.209] (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48541b6f708sm888164315e9.11.2026.03.16.02.37.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Mar 2026 02:37:39 -0700 (PDT) Message-ID: Date: Mon, 16 Mar 2026 10:37:38 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] module: remove MODULE_VERSION() To: Greg Kroah-Hartman Cc: linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Shyam Saini , Kees Cook , Thorsten Blum , Christoph Hellwig References: <2026031341-evolve-repeater-987b@gregkh> Content-Language: en-US From: Petr Pavlu In-Reply-To: <2026031341-evolve-repeater-987b@gregkh> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/13/26 3:20 PM, Greg Kroah-Hartman wrote: > Module "versions" do not make sense as the kernel is built all at once, > the "version" is the overall kernel version number, so modules can not > really be described as having a unique version given that they rely on > the infrastructure of the whole kernel. > > For now, just make this an "empty" define, to keep existing code > building properly as the tree is slowly purged of the use of this over > time. > > This macro will be removed entirely in the future when there are no > in-tree users. I share a similar sentiment that module versions set by MODULE_VERSION() are not particularly useful for in-tree modules and the macro is often used unnecessarily. However, I don't think this patch takes the best approach to phase it out. The file Documentation/ABI/stable/sysfs-module documents /sys/module//version as a stable ABI. Searching for '^MODULE_VERSION' in v7.0-rc4 shows 600 uses of the macro. My concern is that if any of these modules has a userspace part that checks the version, this patch could potentially break users' systems. I believe it would be safer to start by removing individual uses of MODULE_VERSION(). That way, we can also learn if we're missing any use cases for having module versions. The original patch "Add a MODULE_VERSION macro" [1] from 2004 doesn't say much about the motivation for adding module versions, but it does mention that they should be accessible via sysfs. That was implemented a year later in commit c988d2b28454 ("[PATCH] modules: add version and srcversion to sysfs") [2], which primarily discusses use cases related to DKMS, and to administrators + tech support needing to know what is actually loaded on the system. For the latter, I believe srcversion (or something similar) should be sufficient. [1] https://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux-fullhistory.git/commit/?id=466ae11966ae380eb5e10cdf323e140d824fa10c [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c988d2b2845495373f666a381d354a7f80981d62 -- Thanks, Petr