Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp567784rdb; Thu, 22 Feb 2024 12:10:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUwTNZ05x9RrC2z8RZ/u/2NQLpI+d4biGf9IzpfYyy1ET3Wf4myCuTJUZS/vw+lVXG3kY7uE/kbbPDWOeQMI8vdw3EgabrsYSLpnE1vcw== X-Google-Smtp-Source: AGHT+IHe76gi4XVtu+Bjuq9K0WNMEj/bKdNwvFWKa/lxfQh//efq3oNF35thMHgDhP86bxJYPLDg X-Received: by 2002:a05:6a21:2d8f:b0:19c:9eea:e731 with SMTP id ty15-20020a056a212d8f00b0019c9eeae731mr20500183pzb.40.1708632657957; Thu, 22 Feb 2024 12:10:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708632657; cv=pass; d=google.com; s=arc-20160816; b=Ig2fKwiPvnMjbJo3qiOESO0HkpMtLQALWA7cA/zrd4UsZUUbAgU6CMXaCNLzcAuF1G nf6cuERD9aRXRWf2sNCn4Fn6fjqXQj4Lz7SdHhDZwflDdXva7gl33zq/pVSf875mQhTz rCaKVyY6GeEPmvmMTTuANdOb4upQ/J7vaVpqwKe4mgjmKl0ZFg4iw065Jmknw3IfL4J1 KuOSubhc+PrmOYszenadZnAZY2hEmjpGMaOv7Dg/24wu534Y1xEktLedaWfuxzLTewK2 xoZYbPMBLkechDNIopS7K2PAGP1bWoYoDi5lz5tSGoDZMj4LAu5AnEpf1BXvRp4UAd0v vHug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=mI57a/fFX3uiYjIsw96ouRhYjWUvg53pK3eC7aGFRcg=; fh=R4f8gbzf8Rn3lMSRccFOdkmvpQ47UC8MXi0pxCVwqVY=; b=X3wxE/qzmE5jCw466/23WQSPN5oaqUTNbPOTC3pJJBosL0B+jF6xMEv3ZLaaj0aEUD YW4ID1OQzFgLgmZKe/Q8xr25gmhZwaLbD1VbzuL+KytFMY0uXm667pdVEKhe6j2my1Qj XnNfTFrbnHTV24Q3uArNhBj89GEQzNIJIRw3Z757TRZcLJdQbJvlLNE6WsUZcVzUqg+E GfHrSEAX8dOsLUmpIzaJRvJrVyJQJNC7G3+XW0wZ3BXFfUgmevOmhIJ6k6UCltG+9pB2 gMHDTaIonHvLyAebJYZeQb1izTyjk3EyNrusq1VecUjw1ruFc1xqs/QNHbYGayXwb0kJ UuiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-77226-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id le22-20020a056a004fd600b006e4d39b653fsi1187946pfb.243.2024.02.22.12.10.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 12:10:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77226-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-77226-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1B24EB2565D for ; Thu, 22 Feb 2024 19:11:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BBA9F54904; Thu, 22 Feb 2024 19:09:38 +0000 (UTC) Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) (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 C3DAE2575B; Thu, 22 Feb 2024 19:09:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708628978; cv=none; b=EiAFsjMTjmH5dAN/pJq4hJrspHOfZWdnXYEMf+h5dEHq6zmz0KLaCIdYkObhQaJJcq9ay4QT+vLYGY8rBitzcK5sOINawwMPx/bjDIVrPeFi1f9xLyHyZ/2tv9eGUDotq7fOZTi2Ao1EoicfintQGx1dFCheGGALUDtSh792KEA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708628978; c=relaxed/simple; bh=mI57a/fFX3uiYjIsw96ouRhYjWUvg53pK3eC7aGFRcg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=s7KEzDbGNB2Uu9xdChu8v8LD3K0lXSM0A3WgDwNH17UjXoVwdRV2NaID9md+iIfNZtprZvl4wfaNeyVJM5kcuaHYt0nrPOSGWlAr2ZeJZF37uWzyNQZtFSTZmAdu8waIWCdiu4M4O19cXrE2NwQKkWubz+Mh9+Y6nOTR5prEpZ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.161.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-59f9045d18dso14793eaf.0; Thu, 22 Feb 2024 11:09:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708628976; x=1709233776; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mI57a/fFX3uiYjIsw96ouRhYjWUvg53pK3eC7aGFRcg=; b=Yu8cqUnOH8S0eKYiO25FkdhUE62rBjCey3P7ZKuJL8nguRT8IlpC+mP9HWEvruK62p oLNbcG5QcvOlFyVNGd2IqTcBcQI5/KSJdfuwTvHu0/k1Pgna7VfkqctkGac9It8QyIlh hAjEnGJ3tWOOM7rMupm6yBCrQJflXhpp4iPiLEib6D6kRhUU0JM/32CRNCLzAmAFFs5k on4VTQMY9h61c379v4wZAYoChvUc/L1W3kPK3uDHZPhPLkJvwlqXWuKwFrqDVEQixAbn /XsExkyGF6QeXl6YHFSZlOV9eIYGPu2LATN2PEuce+V9EAOTmC9SgTPjYSrQY41fPjz2 TZqw== X-Forwarded-Encrypted: i=1; AJvYcCVuAvg7A0ybsNkgFO7qdH109PQyM1Nsp0gpJJJK4wWnbg/tAhwykmZplZSostlHuH9WDaoa8qQIudVg+y1Ja4l8i+DGgEOFzTcCE0yeD0MpsymtOgFw9JH6xeV4faO/qwnaplPF0BIgj06l6magRabEDm/lv483bEP9VMkzbtmP9A99oYMgkj8= X-Gm-Message-State: AOJu0YzYppUEhoR8pd+VGtOzZ3gMSD4sIoOLT4MkCm12lJ2hpK/BRR6f MboJ3RyNwxrJ1eGrm0QCWckyZ/0cYyImoPKPyVmDbZxVm1z8q6xlKG+ni8rBb3fYHH3gI8mQsJ1 +vxI1XRzDMlc9O8xj7iEYdgqLqeo= X-Received: by 2002:a05:6820:305:b0:5a0:1c1e:a8c2 with SMTP id l5-20020a056820030500b005a01c1ea8c2mr4929393ooe.0.1708628975933; Thu, 22 Feb 2024 11:09:35 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <202402180106.25E08136F5@keescook> In-Reply-To: <202402180106.25E08136F5@keescook> From: "Rafael J. Wysocki" Date: Thu, 22 Feb 2024 20:09:24 +0100 Message-ID: Subject: Re: [PATCH] PM: hibernate: Don't ignore return from set_memory_ro() To: Kees Cook , Christophe Leroy Cc: Len Brown , Pavel Machek , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, "linux-hardening @ vger . kernel . org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Feb 18, 2024 at 10:07=E2=80=AFAM Kees Cook = wrote: > > On Sun, Feb 18, 2024 at 09:40:58AM +0100, Christophe Leroy wrote: > > set_memory_ro() and set_memory_rw() can fail, leaving memory > > unprotected. > > > > Take the returned value into account and abort in case of > > failure. > > > > Signed-off-by: Christophe Leroy > > More set_memory* consumers! :) Error paths look good to me. > > Reviewed-by: Kees Cook Applied as 6.9 material, thanks!