From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f74.google.com (mail-ed1-f74.google.com [209.85.208.74]) (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 BEA152264C0 for ; Mon, 22 Jun 2026 22:59:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782169148; cv=none; b=LacDos0ezVkLAoiFgdCWUJ21li+4q0IWKG4TW7sqMJA0kSat492G83i8TzgFQ4sEBjOwmXpanzJstYD10P0BoPFia6iw7r3NOJFTnBIkwbBoYz5jFG5stB8bFCuCw3OUVBM0T+qISI2+jEN7E8GWLm05HyvwR9YiIcbqzweMIQg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782169148; c=relaxed/simple; bh=1KEV4PoPLKsrBHewXuJS0JpDjZhcvYwrvQRa5Ytf2wg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=EKTm9tKvX/AwYFOBNi8ecYiD2NLAKFJwS6bnASlOsI5j5N39oQD36moOs8dl7NZqwEeuDbreipfK16/XbTi0adbhtDyV19F8ntDoWQoUE124ehbHCiEvxQVwhQNcd6e5sQj/ZrGp+JYfOXkhXZ/FhPdho66CkfyXc/uj3dzK5EM= 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=fHPVCsG8; arc=none smtp.client-ip=209.85.208.74 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="fHPVCsG8" Received: by mail-ed1-f74.google.com with SMTP id 4fb4d7f45d1cf-695bbac451bso5350604a12.1 for ; Mon, 22 Jun 2026 15:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782169145; x=1782773945; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=AB8TF/nTTwkjJ2DauD9OsPoaeTkyxV0ScT5eapW1Gw0=; b=fHPVCsG8opOWFfhq5RJWuG0pAHLNTwZeP85nbh60qentys+MaODaBaCxIZrcXIq65C SdhPNT5uLahyJApNtdvwqvcRqCK1OLIqyScOEuKQ0pHUKJrbU+rOcIp+LQT0MnpMutnZ pbm4eTPf8CW8rlWwFcPcXNY4OurkcjHgKpfwwgvfVr6LMGXbpECTWarZpz0ek13tuN7R 5ndtgkWTKm8dZUcrt+O6HFtbavOMzRJrhxI/T5BId9QHpjehf7UqpTUVCJVwBtAtxVDv /esffW5amFArLgJqZUh6JjzZkAJ4rc89RgXNdOFbx/msjJgxZHzJwhlCVUgmdxefsAfi 4lGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782169145; x=1782773945; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AB8TF/nTTwkjJ2DauD9OsPoaeTkyxV0ScT5eapW1Gw0=; b=JyVhOdqffeFgmd8TJff7mb1reeTEpUVlyUbzcvMskYAb0ljAL92I+X/zfKvNJIaMqX rh32Hv2q9j9woRXSm3ltbxEBCBGHPenzl2Hvy7CFejfstIqjqgrlLKvTu56KUwzfJ8VY pUErbG5E4qwRhBKQX32027bnXYLTFj9t32wbwjkwmCmFK32mbyKrh700sCWPkqXe4Lw9 JqP6dEe18U5eIhfAHmdVKEN4g/CGMRka84Um6Mc6nT1fKGvlBz0IdN7GZ+rYRO4yVE9N /TcMm5q7+VBiyfpnRvJe+c/AsiYcvWnfImuU2iMWbUNO236BIgRe2YhAu7ZFohhDyuws V20Q== X-Forwarded-Encrypted: i=1; AFNElJ/doIF1rMFWGkPjrEKRocWy4xzj/iVlxYQqDsUoaCuf5WvL6awA40tO5axcHj+p6uN31aM1rsXkhyuqAuM=@vger.kernel.org X-Gm-Message-State: AOJu0Ywbzxw7K+7EiWywGculxBDqYc9fnZ50TQahXH4dHU8snUlsYDTy FEMfY+oVSihNclvedy/Za6iDXL+EFJireXEYQkzbA1CsUa5shom4vfA0M+IQaMoIFO7UNYarvDk OghY2jbELge8zPsRwGg== X-Received: from edud24.prod.google.com ([2002:a05:6402:18:b0:696:7fdb:ab3c]) (user=tarunsahu job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:4302:b0:697:769c:e381 with SMTP id 4fb4d7f45d1cf-697dba6ee52mr68191a12.8.1782169144805; Mon, 22 Jun 2026 15:59:04 -0700 (PDT) Date: Mon, 22 Jun 2026 22:59:04 +0000 In-Reply-To: <178215570871.91679.11260349768439750235.b4-review@b4> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260622111215.4157974-1-tarunsahu@google.com> <20260622111215.4157974-2-tarunsahu@google.com> <178215570871.91679.11260349768439750235.b4-review@b4> Message-ID: <9huzse6ew5af.fsf@tarunix.c.googlers.com> Subject: Re: [RESEND PATCH v3 1/2] kho: add KHOSER_COPY_TYPE(UN)SAFE for phys copy From: tarunsahu@google.com To: Mike Rapoport Cc: Andrew Morton , Pasha Tatashin , Alexander Graf , Pratyush Yadav , Mike Rapoport , linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Mike Rapoport writes: > On Mon, 22 Jun 2026 11:12:14 +0000, Tarun Sahu wrote: >> diff --git a/include/linux/kho/abi/kexec_handover.h b/include/linux/kho/abi/kexec_handover.h >> index 5e2eb8519bda..618408fbe9c9 100644 >> --- a/include/linux/kho/abi/kexec_handover.h >> +++ b/include/linux/kho/abi/kexec_handover.h >> @@ -139,6 +139,18 @@ >> (typeof((s).ptr))((s).phys ? phys_to_virt((s).phys) : NULL); \ >> }) >> >> +/* Copies one serializable pointer to another of same type. */ >> +#define KHOSER_COPY_TYPESAFE(dest, src) \ > > Maybe name if KHOSER_COPY_PTR? > >> + ({ \ >> + typecheck(typeof((dest).ptr), (src).ptr); \ > > And if we could replace the typecheck with some other magic to allow > void * we won't need the unsafe version. Done! Sent V4. Thanks for reviewing. ~Tarun > > -- > Sincerely yours, > Mike.