From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 81AF21D9595 for ; Mon, 6 Jan 2025 14:01:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736172104; cv=none; b=BPDXDNSG/nPmft3SFSkcB2xNy65OuADRyExPlnV69uuj1aaNdRqoQJM/xj1FdDOoa78fJJxRi6dEMxfj3mRlG1EnMQQSEn+Jb9M55ZvqQD4bEpGjB1gklqhibrkwXcncGrgo5q6XkQxU9vlitQiwQQgDYtfxDmv9JoFgNVRTFB0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736172104; c=relaxed/simple; bh=6o1p7bSAyUdFOyTYgPnXNPCjcv+NuR5a8rCEuH6SKjY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ARr8Gq8E8PWwM0h79NpVPUZvU8bi6/KxxrcSbtk22Sj8FK97xRN5/I94jlwrXyCJNdNsAuaecRGtWxtrYf558EGyMYXmwv+SeOlJaYuF1YOrHhj8n5vPcbTttz8XCW+7LDiuGMrgWfE/SD4DnVzetAawskTh5aJjbyIOfjj9PLc= 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=cs4vs+nH; arc=none smtp.client-ip=209.85.221.50 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="cs4vs+nH" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-385ef8b64b3so11282919f8f.0 for ; Mon, 06 Jan 2025 06:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1736172097; x=1736776897; 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=4G6xfD8m9Su4PolHZXeeunbkFOaPtopwcrcak99j7Xw=; b=cs4vs+nHxTnegrvdbb42ZzoS2D50ypdkLJJ23yGC47n+jRdBTpjyfOJiBAkc3877tn 83rVuq6+S8NVhV0YRYhGqUJMmGRA8+Jv8iT94/d4vlhB0cHiRJIoo43rpDaUw7nRIia6 +8KUHS/usIJskby0ujF/AnrFBUBaIbWhqUqN7xDmQpQgSkslpAzyLzTIXmQih7KM1YGY uw0unmSWYtziJgGULj5L3g26H3XZHzDeo5g4gUhMQRjQbGF6/ogD4dJ30ElYwcS5zHeP 2VZ/K6+l4yPiRqjtX23UD85a1OMN6w1Y7FSe74HQLVklOy3AbEqumV1JjSINoxYTf62F +OVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736172097; x=1736776897; 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=4G6xfD8m9Su4PolHZXeeunbkFOaPtopwcrcak99j7Xw=; b=qzQnkwqmd2jUCYZOshz+nbHRB6TnKCc1ZtwN6cAL1aH8QMtXgpvnpKfJjjfGaJFQ0G 0RDchjMfIAtArYt6ITehLNMzfiVzKCYSWHKxPjOYVOthJcnmhvHj3VdOgp/oYK+6J6Ut RLILUck2hm73TAAe9VsfIEhoUSuzx5dZFCxYZJ02p79VJk/v1MXb6yUxm3DHt6dvX410 k0idErUoNoqi7c6nkLisEUo9ACRj8+pH8AGiJjLZbRenZQLpQnnQoZWN61eswx9DF6/u EhuZM+sPQ+YCIsdehT17636AOAXcx4ZjWkttETgD0u4Obv+2wSGuucoS7s02XEWq2icj ENrA== X-Forwarded-Encrypted: i=1; AJvYcCVXFhyNZcamB0TMaYULjXHU8AOu3WeMQancrH9aOPObihXkEMvC4E5r+2ZJhXoqn4h7VsqAIpfP67peQWk=@vger.kernel.org X-Gm-Message-State: AOJu0Yx0pfdhMTR5zQIHcueQUceKJN22ztPHXk89gzsIoMOO4haJMsyi Wh003EQWBHMqOry+V5MPwfMw5gGPAeOh5IutdfDymvQfp7rwIFLnuNHxObq2aLY= X-Gm-Gg: ASbGncujJe0K1M0iRTbxI2/lrM1+LoVXSFSDCBFKL/VKANWiZx1PKC7xaDA0r6TDTwk GL8paxC+eKJyFYfQNVS8ksi+Q/8TCKxSU2MDiOVYZdZZLFdtBmspI81wI7149NKNNq0pHRbl28w 0MqMhZ/+ICkIk/0avODjFuEjc+Pem2zkBGpRQ5skAgxLeaJamgKgDBZnzZTfk4L5RhPphFnMvwl 9rzhvbwv3UphDefdHqnzJKEaNSgc2wN1vxvBOVAoi0XYkbiUlgBkdk1EFqK X-Google-Smtp-Source: AGHT+IE1VfGt12mWAlo4CGUZChw1sowXE1RhqjYG8FuFMUXwqDN36gT8iWfPxbGKriztKErymwxFCg== X-Received: by 2002:a5d:5847:0:b0:385:f6de:6266 with SMTP id ffacd0b85a97d-38a221fd10cmr46011063f8f.24.1736172096914; Mon, 06 Jan 2025 06:01:36 -0800 (PST) Received: from [10.100.51.161] ([193.86.92.181]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c89e375sm48757272f8f.73.2025.01.06.06.01.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jan 2025 06:01:36 -0800 (PST) Message-ID: Date: Mon, 6 Jan 2025 15:01:35 +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: <3a961c7a-d793-4319-ab78-af11f46587ff@csgroup.eu> Content-Language: en-US From: Petr Pavlu In-Reply-To: <3a961c7a-d793-4319-ab78-af11f46587ff@csgroup.eu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 1/4/25 08:39, Christophe Leroy wrote: > Le 03/01/2025 à 17:13, Petr Pavlu a écrit : >> 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? > > Indeed, if the large pages are restored when bringing back the > ro_after_init to RW, it defeats the purpose of patch 3. > > So I agree, let's first apply patches 1 and 2 in order to fix the actual > bug then see how we can improve as a second step. I've now queued the first two patches on modules-next. -- Thanks, Petr