NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/60082 CVS commit: src/sys/uvm



The following reply was made to PR kern/60082; it has been noted by GNATS.

From: "YAMAMOTO Takashi" <yamt%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/60082 CVS commit: src/sys/uvm
Date: Fri, 27 Mar 2026 07:14:46 +0000

 Module Name:	src
 Committed By:	yamt
 Date:		Fri Mar 27 07:14:46 UTC 2026
 
 Modified Files:
 	src/sys/uvm: uvm_pager.c uvm_swap.c uvm_swap.h
 
 Log Message:
 fix swap encryption data corruption issue
 
 when paging out, uvm_swap_io encrypts the page contents in-place
 and then issues write requests to swapdev. if the write fails
 for some reason, the pageout will be cancelled. but it leaves
 the data in the pages encrypted. ie. data corruption. note that
 this doesn't necessarily involve broken swap devices. as we are
 in the pagedaemon context, some kind of transient errors are
 rather normal. for example, ffs VOP_BMAP has special cases for
 the pagedaemon to return ENOMEM.
 
 this commit fixes the issue by simply reverting the encryption
 on error.
 
 PR/60082
 https://gnats.netbsd.org/60082
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.134 -r1.135 src/sys/uvm/uvm_pager.c
 cvs rdiff -u -r1.221 -r1.222 src/sys/uvm/uvm_swap.c
 cvs rdiff -u -r1.29 -r1.30 src/sys/uvm/uvm_swap.h
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 



Home | Main Index | Thread Index | Old Index