From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 B1AF017A31E for ; Tue, 7 Apr 2026 14:31:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775572318; cv=none; b=oYHUYXbejBLJephAVQVXxlCny1xID7jPLzgB1mUFmDY+p2Z8hZnAz+UrCEWUS0tvdqehYPnEWc4/dU2gMedeLIkeXBZ5veJicAIUyEte6tU8XiV3pLKrJmGxdc/xw7zx1IWiVn2xnJ5dKs+w1kImnsaS3jEgXAn41lA2GQ8p/gE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775572318; c=relaxed/simple; bh=Wb4V3cLg4or5JCb5jNtMVDYCezo2kn3VrJz29OeHktI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=a2VBVWt1Gv7BRQbs1fSLVei1Sxs6xMkB0Q/SdPV2J8SaOkx5Mt9vXXKTw1lc9JWCT503fgzSf9jUkH8yMQ9s+8IC2jbKjSKxKhIGkfq696bpShtmR7RuvCnn2mgKhyDt6JZgx+sQnIoOLp3jX0cr7PkSiOOUPEiFT56Q6L8CQS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gFpVSTRw; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gFpVSTRw" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2ab46931cf1so40389615ad.0 for ; Tue, 07 Apr 2026 07:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775572317; x=1776177117; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ABgqVLgM7qNtgzGuG2u8bFv72QSCAOPYsgYn7Ht6hJs=; b=gFpVSTRwNVkJvmeYnSwg4uukzsKWlAgUK547w7NR2+C4KqJL/8B3vJPc4dIsFaBU0c nDPnhOg8zGCLojke/52YWX/4jRl5U9hliTWkKZ1rKqv1qqTKQoFKHMQXfHdRB2fEri4V a9f0T7IPqbW3s9G28KFpGqqeSGYGynzOqnchSBCetfWkHeR0pdy4dDEtn2dN1dWEfQEf s8m0xWfdkiClcjTgpzVRar3syc2AMLUH7K+4SOBapHMcS6uvd3eGtCsj4a0/UduoDOpj rYaT63+OKsTKDulgY9gQk3la3ftBLdZ6WOxN77iaGFHwZP5sI9gOkKvMPXW48GgsYN8P x0TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775572317; x=1776177117; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ABgqVLgM7qNtgzGuG2u8bFv72QSCAOPYsgYn7Ht6hJs=; b=AIYB4OX7NHhuNtsw1jWMNKBVsNYSBsuZX0aVmR+S9kLTi3DPS+L2wsk/M8V8M6iyla MCSmrU+xzCfS4lflUnZu7ewO+gCj1o24Ar/B1cQTxJubLHbeaL0pU4ZrdLXT1thUo9z1 15oSlBJebRix+lVVyDuUH1VvGePRaVFLB9uQsjGDxvIq6S5PY2RKIJl/9gxN93AqhmNc LIRbq1RbLri+IAJc16+W3WkF0VXJITtRg5n2Oebfi2ro/5mxGN20BNTLnIj+1LNKFD5s ujeEyN7JDVw77LcBi2f8QoMIV6+y0OJHUp1mRjTxWDPmZo1nvrSj2j0r1CYhR62KEcg4 6+Sw== X-Forwarded-Encrypted: i=1; AJvYcCVnRyysaXpqOs8nCppAsdG/9ryPRDGEoml1XhqTsKyvN52XjTWZejgJTNUdJ9ePgknqMoD+gCXYKVYt2wU=@vger.kernel.org X-Gm-Message-State: AOJu0YxMKgPTfln3ivodwWpjUNs+8xAflgfWudmo8uQ1KvKT60ilWj4+ UqFrV+7LU/DR1B4iTByjZ+Sw4NO3ighbctXlCdzLsU7qJUktIru5Fn3a X-Gm-Gg: AeBDievhfXaPI/rt20a6nlgKapp7DWcCoycTrr3/TGrLg/m0PXQXrdm/5fUHKWY22HY PXwcvoBLzOWXbB962+udyZ9Q32DUlXPokJx0zO7fpROCgoM2AtIugGo4TybVgy4X5kSzIcgx4K1 Clp+VCLIT1zIFHX43Vq+nX07935W9NJeXAeD+m0Dfx4F+o89x5Vjq+jsE0BWho5urevu1QCYVZp DM/UmHLhdZuz75yrgc/bBPMR7FpJO041oXxI1H9/TrCOnPo/E7Zdm4u0Ea5JXfkVO0ZhX+E1XkC TKnuSqF68LsH/e00Mx9BK9AYnNGFelspdr2yIlLwdlZlq90XCHWjiP27Z8Pdjb9C+OPzI7iD+11 e5vSwZCER62n6nLqcY5eeCBePUiee9BKPzvIAnyPd/yy6iZK1vEp3fOb6DZvaYONI5Z1aolpXmk /0py789FXT3bFWsNa7EEYno+kv9nMM7D57m48AkglrmPfxO96xzg== X-Received: by 2002:a17:903:b8e:b0:2b0:5450:a910 with SMTP id d9443c01a7336-2b28219df6emr170162585ad.17.1775572317096; Tue, 07 Apr 2026 07:31:57 -0700 (PDT) Received: from Mac.localdomain.com ([49.205.216.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b2749cbc58sm181201525ad.78.2026.04.07.07.31.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 07 Apr 2026 07:31:56 -0700 (PDT) From: "Ritesh Harjani (IBM)" To: linuxppc-dev@lists.ozlabs.org, Haren Myneni Cc: Madhavan Srinivasan , Christophe Leroy , Venkat Rao Bagalkote , Nicholas Piggin , linux-kernel@vger.kernel.org, "Ritesh Harjani (IBM)" Subject: [RFC v1 0/6] pseries/papr-hvpipe: Fix and simplify papr-hvpipe Date: Tue, 7 Apr 2026 20:01:34 +0530 Message-ID: X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Haren reported a UAF / null ptr deref issue here [1]. While reviewing that and going over papr-hvpipe code, I found couple of more issues around the usage of copy_to_user() and few refactoring which simplifies the code. This patch series is an attempt to that. Note that this is only compile tested on pseries for now. Haren, I will kindly need your help in verifying this please. Let me know if we have a selftests or any other test framework for this, which I can utilize too. [1]: https://lore.kernel.org/linuxppc-dev/20260317040444.2785741-1-haren@linux.ibm.com/ Ritesh Harjani (IBM) (6): pseries/papr-hvpipe: Fix null ptr deref in papr_hvpipe_dev_create_handle pseries/papr-hvpipe: Fix the usage of copy_to_user() pseries/papr-hvpipe: Simplify spin_unlock() usage in papr_hvpipe_handle_release pseries/papr-hvpipe: Kill task_struct pointer from struct hvpipe_source_info pseries/papr-hvpipe: Refactor and simplify hvpipe_rtas_recv_msg() pseries/papr-hvpipe: Simplify error handling in papr_hvpipe_init() arch/powerpc/platforms/pseries/papr-hvpipe.c | 135 +++++++++---------- arch/powerpc/platforms/pseries/papr-hvpipe.h | 1 - 2 files changed, 66 insertions(+), 70 deletions(-) -- 2.39.5