From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 BE4641FBC96 for ; Fri, 3 Jan 2025 16:13:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735920818; cv=none; b=CKUUycF0gPVu4QLx8WqDhqx5DNEo1lEIuTjzxrD1eKcZNkykuX8AKUlcZ76gefBqvS7HQqO5tPjMz766Np63ppTnNK9A/t4jcB9l/tSXp4WxEtfXfAbc2JoKAf88HTL0NHqH68U7iP2Zmb3DNtlK3qEN+Blv7JBEMt9OMC96kK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735920818; c=relaxed/simple; bh=/r66lPp7CAIainpKkGptJJUNd87lK0TmAVRCPwAkAoI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ZwMP8MWicdBr0GNDNcxgiGR0w4uxsjWNlHHGnTY2I08PpZwuvQQtfIcCahC0O5GDClhCr7oR0cqp0sFafYUjkI0aj+ywchXV6J0NDkaIMgFptHM2YcPl3hFte95qKJEPFhfg9qq/g8h2Ae5Q63CaBo3flVactR59tcGQAvBVSG4= 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=IFzoVgMq; arc=none smtp.client-ip=209.85.128.51 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="IFzoVgMq" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-436ce2ab251so3607535e9.1 for ; Fri, 03 Jan 2025 08:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1735920814; x=1736525614; 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=e0/+BaEw88cbF57VlJ24ibkYz9NORtGOkz1oN9V9guI=; b=IFzoVgMqt20LXY2XsYv1EoOOJkt8MPSOmS+w3bxYGiiboBvWDgnsNRV4Pg63jtwqC1 XocgW4UArRILNKzt7pCHoIus35Q0vAnmslTKm246I8u7PAOJyncQrSj3qXNy+Mp6l8j0 cXNAFaE2q75UeoJQ4sT3cYtuZx464cXnps7goFxFAtShgON7wYRZEtDWK+Kqm5G0FFMa LzWwUOpecEjT+eZVJ3Hl2K0t8rbitk5ZGZmJ5UPytO0FoTVHmWpVDx8DK5slLmbZ1Oqc 640/iMwbA6vkzoQnynBox8eDERSGPL71hcf7awc68EDXTZadv/CgI2SH0/iwdHvIIB89 re1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735920814; x=1736525614; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e0/+BaEw88cbF57VlJ24ibkYz9NORtGOkz1oN9V9guI=; b=pOm1L4Gm3nijItJiaU2gZgnPzgib+7gZ/iVuLvX3kXAJRdQz1eVTNXNTH26klY+mnj z8BMkpuU4ZGzYWC98IPu0ptgE3+C/70p/ks4GGVJQvXQp222Iv3CdrtKdh9FS3DNsfej 3/MiP2mKagRSAQ21OpKiymZMKOOqs+svoM9I1DkqFzOVlBlx6iN1i8DIYZA0Q2fkZjEj hMSWvBLi2HEDUzGsDOCAyv1xkTFgnn+enZEvFw4qcScuLY+PAzpOWPjtb9gCQWUbCveZ /Mnk0J/YQi7Gy6d6BxMXmeWsd8Xsa2Rs0clXYbSfPJzipV9uiUFqKJBR14J/k84XMWVg +18A== X-Forwarded-Encrypted: i=1; AJvYcCWoXIotRxvz00EJf/qPOSGZUoBMvFtlN/Gj5kxx8dQqXLtesnYhlMU2ObcQLc1uDNsbhKkLqWU50+R9qRg=@vger.kernel.org X-Gm-Message-State: AOJu0Yytxielp3NJLtubwqqRynA8AdHnjeEuKAzJNaPX0qY5an396/T+ r1dmmLzlaqToATA+H43quTslaE9z4HIbqU0aR3R6z5ip3ljeuOYbngeBkvU5hE4= X-Gm-Gg: ASbGncvbPTSQVWz+VYU00dLN+ITiPkKpoTtmNoNS9yPxwutil/jQEvJSa6GEvxGz2JX iEQo552YXUJvuJ43zXowd/Xx3jQtrVWqUWkORcULgqEhbfuHCUF2xz053wzhgU3ZkteFkAFuu4S 9TXG98OH8vRzuQR5xHlCOQ4Z0sd3lqVWWSJAGMcEBGvQx3gRepIK6R1sAT0eHtvtkip184dCtC5 reSVVyXphZbYAOkECg/esI9kwCZo2YbnzSIxfbK4YOHv99DDH1AneBDjTB4 X-Google-Smtp-Source: AGHT+IF6ufCVy5kcxgJVJdCV+23+Qyw0ze7d8fxk8PzaWHEmYpPh2z0klc5PfNTZhi5tqPkJEOdY1g== X-Received: by 2002:a05:600c:4ec9:b0:436:51bb:7a43 with SMTP id 5b1f17b1804b1-4366854852dmr423005975e9.5.1735920813888; Fri, 03 Jan 2025 08:13:33 -0800 (PST) Received: from [10.100.51.161] ([193.86.92.181]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b015absm521117135e9.13.2025.01.03.08.13.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jan 2025 08:13:33 -0800 (PST) Message-ID: Date: Fri, 3 Jan 2025 17:13:32 +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 v1 0/3] module: Don't fail module loading when setting ro_after_init section RO failed To: Christophe Leroy Cc: Luis Chamberlain , Sami Tolvanen , Daniel Gomez , Kees Cook , linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Mike Rapoport References: Content-Language: en-US From: Petr Pavlu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/5/24 20:46, Christophe Leroy wrote: > This series reworks module loading to avoid leaving the module in a > stale state when protecting ro_after_init section fails. > > Once module init has succeded it is too late to cancel loading. > If setting ro_after_init data section to read-only fails, all we can > do is to inform the user through a warning. This is what patch 2 does. > > Then patch 3 tries to go a bit further by testing the ability to write > protect ro-after-init section prior to initialising the module. I've been holding off on applying this series to modules-next because there was still some discussion on the previous RFC version [1], and I wanted to give people more time to potentially comment. Mike Rapoport also recently posted a series with a patch [2] that proposes restoring of large pages after fragmentation. Should the last patch here be then dropped? [1] https://lore.kernel.org/linux-modules/737f952790c96a09ad5e51689918b97ef9b29174.1731148254.git.christophe.leroy@csgroup.eu/ [2] https://lore.kernel.org/linux-modules/20241227072825.1288491-4-rppt@kernel.org/ -- Thanks, Petr