From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) (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 5655A2264C0 for ; Mon, 22 Jun 2026 22:57:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782169061; cv=none; b=JNOIZTXRBhnOXontEqO84OBvkcszFPVP+ZJG0THutu3/cL8XXWuJjYY01xtoKJOANyKD3MJa6fExw/w5n2+jC04rQnXfrfV8UgWGSnLZ1kD60FQh7YMZbbnVHk5F7DyRSKNNrQHZTJ+tnOs9Cgm3l79m0dIPeSdGREXAlV3t9Hs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782169061; c=relaxed/simple; bh=EA+T9MR8nVjSDi2f4VjzFWzRnLh5ODf+9xRZEIj1R94=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=Nd17FiHKKi6+ZQ/TZzzaRne9fIiU/yao5aDeolTZPPlt1/zod77bdDqOSfENcXEWmHoAXs7X2wMPotw8U6ha5uOmU9KByeyepFQHr5Bi0H4eNQJOWwiyARAhMIas3OWEQh7vq3BJp/9wzmnhiBP8iGjS1mqTz9SJJmeEoMmhQu8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--tarunsahu.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=mIvNYRXg; arc=none smtp.client-ip=209.85.208.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--tarunsahu.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mIvNYRXg" Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-695796f97aeso5054376a12.0 for ; Mon, 22 Jun 2026 15:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782169059; x=1782773859; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=GuqegTQ8Dp22axBp2zLQ2UPTz2GcEz8o9NQNs3L+qeQ=; b=mIvNYRXgdrVHdQi+QhUAnn8Rv2RZ0H1kw2LKGIOKIbk0hnfhAJ8IIev/g6skP3AMTZ 75TKoXVOniCpVE6Jq3K9kYcpjT5Ramt1RK7kmmwKDJjZmFkgKELicLWO7XtVuYAPK+74 UrjnINVavIFWF+fa7Docy/VR9lu++BX2PNBxxCpSVLSw6a5ji9oL4JoxL7IpSoBYA6em O+U4Vv6mRBgi4lJoelU0GC57YGmUyELDDfvArwVEJIeKqH4YXZFgpBacuRWgXYhreHuY eodFgYmb+AuRsfmVIAg+qMmmfGF1iqpTQFTy3cfUJY5JzEXuapHa1EAo5BGu69pQ4hhI ILEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782169059; x=1782773859; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GuqegTQ8Dp22axBp2zLQ2UPTz2GcEz8o9NQNs3L+qeQ=; b=lU/Er51Pikw36ifmhVVNREXJXEu96CECIwBQ7u/XnV68WrERvQptxNW1ueYhfC6MdA GJPrJP/SdHaIMY337uWcXdiI+OcBwPkYWmu5A+0L1T1PH/o8WIY2MAczryngHXWC4gNu 6xqAUTH82wj6S6aBi7Y0MztDGCnYAeckXeBpd9Irc0FZOOaIF9By45uCEKR58KrirG7E W0988Jf2y54QOIEJe+d+RYeqttf9IYi3qXma8oioolqeXr2NILQGhAfKWH7A28l+Dbx/ h/KbSYhMepl65XsNRVe4kkV20X0nR4dQvI+QPqtnR8lV2VxWOD6SNGNta/L+4S+BPC/X mptQ== X-Forwarded-Encrypted: i=1; AFNElJ9reWdwm0uTCpk3AqEosZJjCdzdwCm7qAbtftgbd2fBZqC0COWvgNdSKhMZnxr9QyWRwAEi4zpo+Yz9h6Y=@vger.kernel.org X-Gm-Message-State: AOJu0YzLriYH4MRzEoRfFIDPxVIEmzs/V94dTZ4+kdy9M+sVBwZGcQ+Y cqliBr39/UMW8sMoqDrGcN1bAtr6kPtUR+D1pPPJD76N2j/V4JDwEMGw2hP06aRzMFThDfVf9g+ lbHSe2Eu3ANieY0/zQw== X-Received: from edpg19.prod.google.com ([2002:aa7:d1d3:0:b0:695:4008:2b79]) (user=tarunsahu job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:2345:b0:697:5124:15c6 with SMTP id 4fb4d7f45d1cf-697dbad0f06mr66279a12.3.1782169058595; Mon, 22 Jun 2026 15:57:38 -0700 (PDT) Date: Mon, 22 Jun 2026 22:57:34 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.55.0.rc0.786.g65d90a0328-goog Message-ID: <20260622225736.2961438-1-tarunsahu@google.com> Subject: [PATCH v4 0/2] luo: convert serialized ptr to KHOSER_PTR From: Tarun Sahu To: Pasha Tatashin , Mike Rapoport , Pratyush Yadav , Alexander Graf , Andrew Morton Cc: linux-mm@kvack.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Tarun Sahu Content-Type: text/plain; charset="UTF-8" Convert raw serialized_data to KHO serializeable pointer (KHOSER_PTR). This series also takes care of resolving the bug with memfd of using phys_to_virt before checking the args->serialized_data value. v4 <- RESEND V3 use only KHOSER_COPY_PTR and have compiler time check for type excluding void * types. Remove TYPE(UN)SAFE variants. RESEND V3: Sent incorrect thread format earlier, this one is with correct one. v3 <- v2 Rebased on top of liveupdate/next v2 <- v1 Use KHOSER_PTR across liveupdate files instead of only memfd_luo Tarun Sahu (2): kho: add KHOSER_COPY_TYPE(UN)SAFE for phys copy luo: Update serialized data to use KHOSER_PTR include/linux/kho/abi/kexec_handover.h | 11 +++++++++++ include/linux/kho/abi/luo.h | 5 +++-- include/linux/liveupdate.h | 4 ++-- kernel/liveupdate/luo_file.c | 24 ++++++++++++------------ mm/memfd_luo.c | 18 +++++++++--------- 5 files changed, 37 insertions(+), 25 deletions(-) base-commit: e98a9c61721c14bcd29f11f4802e52e908701f7a -- 2.55.0.rc0.786.g65d90a0328-goog