From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 8B10249620 for ; Mon, 10 Aug 2026 07:38:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786347520; cv=none; b=beFsYfyTFHiv6wIrJKskaGfdzgPDQ9LlEFPDg0c9N2q2FRmVzjmT05pBsLhu6UYH6cgFT8ibyRNdkbnjhQIVRxlTC9xLmImeBzmskseH4XRO9W07Yt5W1xpoKAPMynOb6SlYWWmmsC9gxtpy6IwOnl9YMfoqpd4wtY2Gg5aKu0s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786347520; c=relaxed/simple; bh=oZY5D4XzE49SElnY7xdO5B8U/3uPIIg75iVIKY1quxA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CPtQMyH839Daa8V1pGpwYoo8Y0O1jMCLUkwmIzIYiIBpfnUMM/K3rzzdq0QTcsuVTVsXB3JICTNKLyV4O9KYl76R4NlqW7kleW1lF8yjklU7tETrbxFtl+HzYYUGNJWGgzpbbrtO81RonlBzsOpbNuoIlwFSmr4QjVzo6inyQc4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=NGh9BJoi; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="NGh9BJoi" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2caced6038eso15340215ad.0 for ; Mon, 10 Aug 2026 00:38:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1786347518; x=1786952318; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=GC8lWyUhrgPVECKopBUtXwhtZNqcfjR69tlJCzf0VbY=; b=NGh9BJoimC79lF2zYexKeec0w1BTBIevwBDtQxg6HQ2NMQOb9weGzP1RKwe52dc8iD dUZD0yomUQhWtbiTSPBVuxcuZr+4IEsbHir8Z/ceQtHq1uxRJuNQE4nQP+n8YJwxf4H7 oWR9VdVdRJU/JgoqdP2UMPF5CgtfFk1wJlibY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786347518; x=1786952318; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=GC8lWyUhrgPVECKopBUtXwhtZNqcfjR69tlJCzf0VbY=; b=XOG3J/l/U+hnq2ZJXHi9RnjqiPzMsoiT9EhbJj4s1DjfYom3OUmh5XEojtw4yFgQoJ feymFE8lVtbXFkGbn4fYyFD89dNPI8v/SbljWhPvD2jZsCQ5k4Ot6FYZs/wypcuyp/jH yEnbiNmrwZrI1/2I0pvwrzc/6l4xkYcspdJnoHMFKHXdl4dE5mWPjmKmGPbJ7VfmK7bg 5fp2AW5DVFD61S7/0vorVZflC3BFErNfakhd3PVmWL2mEyAHwQNYek1IynomGFMPhAPI DQs1gKGd75laARrfITDiI3SW6q7HXgRwTwanO4qvchefpFgkmm/8giAs+BFW3nV8wjbq NfxQ== X-Forwarded-Encrypted: i=1; AHgh+Rp/wPgLuI5c4Q91TGL+gT5V9xhxuBE+xhkE8uALsJ06gQh+QOtyfAlkhl3Xw0Z0VYOYMMT9JryoqDrsjNQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzGgXKZITjLla8tToce+DA5QSHPYEHfdZYefHYYIgaLTKsuEhxw PgEycEZFbmKFPL0RguA3pBiCYo4v1M7WimEQGLX2hT2iVfc+gRY65rh0CI5XEdcIqA== X-Gm-Gg: AR+sD10v38UAwkDRbGCPTi9tNMkQGD2T056uvLw5rdZawjcw1H8bWdwbNlm4ZhaYttN 6UMcpHlQ0ksc5i/QoZVecN5Y0OojTgj23TKZrvkfWaA0n624g9lr6HZjaR0zSTdIea7a//2ZmDI z9NsGvEtJenMKYGScVfmXGkpVVJ6X51iOQXWaSI0r3uzRXD6QSL7SWIMBSSN46zu+pnOUp9EYKG o4MZlhNHT+zXBwoLJ5GLk6cHTYWhNdcjWUzTAwxk60sbySEcbQah30b9fmvf7uKPArs8jtaqVCn n7/jY1Mx48ywQGxlrgkbn120JBz7G3wlar8ApzdueHXoIuI1wRdG96wVfFq9CWNWfLU6xdW1qQe 8T5aV3qQfyiQDRvDxEK6jH1IrGxAklmWMKskvSbdI+bsrAZh2YS93N9flRV1i16bFjJP2vMxdqD A9JJWSbwfxqKxY3qXorHu8DbSMbY4rocx7TEIdT5nI5jEdiZzn/6CclB+6Xj8/kGZY0+pDHGb/Y I7hAy04J4Vcpc3EQNI9szWmCGsrARsoXan2W2M= X-Received: by 2002:a17:902:c412:b0:2cf:70d2:da7c with SMTP id d9443c01a7336-2d2b2e8ccb2mr165171825ad.12.1786347517927; Mon, 10 Aug 2026 00:38:37 -0700 (PDT) Received: from google.com ([2a00:79e0:2031:6:ddfb:e755:8f7f:81af]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2d15ecf2c25sm30238985ad.59.2026.08.10.00.38.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 00:38:37 -0700 (PDT) Date: Mon, 10 Aug 2026 16:38:34 +0900 From: Sergey Senozhatsky To: Thomas Gleixner , Peter Zijlstra , "H. Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: x86: missing FRED #PF event data? Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On (26/08/10 15:49), Sergey Senozhatsky wrote: [..] > All the crashes are reported as NULL ptr derefs, however, I believe this > is not exactly the case. In all crashes CR2 is 0x1000 aligned (we always > crash accessing first byte of a page). It seems that csum_partial() calls > load_unaligned_zeropad() and we hit what load_unaligned_zeropad() comment > describes as very unlikely) case: "word being a page-crosser and the > next page not being mapped"). So instead of reading 4 remaining bytes > of the page and zeroes for trailing 4 bytes, we panic(). It appears that > FRED #PF is set to 0 while CR2 points to a correct page address. I added > a simple printk to exc_page_fault: > > address = cpu_feature_enabled(X86_FEATURE_FRED) ? fred_event_data(regs) : read_cr2(); > /* Fall back to CR2 if FRED event data was empty */ > if (unlikely(!address)) { > address = read_cr2(); > pr_err(":: fixed up address to %lx [[fred: %lx cr2: %lx]]\n", address, fred_event_data(regs), read_cr2()); > } > > and got the following while running my tests (and well, we don't crash > anymore): > > [ 254.040223] :: fixed up address to ffff9c4d64af4000 [[fred: 0 cr2: ffff9c4d64af4000]] > ... > [ 1821.904563] :: fixed up address to ffff9c4e9dd0a000 [[fred: 0 cr2: ffff9c4e9dd0a000]] > > Does any of this make sense to you? I think the explanation is some pKVM shenanigans. Sorry for the noise.