From nobody Fri Dec 19 17:16:38 2025 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (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 549F113775D for ; Thu, 11 Apr 2024 15:34:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849657; cv=none; b=bGuhpKiU1hYxPX4HWxK0QIZsDmLt7IjM5pi3NAGSLsXfhAZSNv9fVf1scCO5Y+b2++pi/wghQTC3lLT8zeFfk63DWLhotf2RdA978I3Khrbkvmy+u2WOfKmyeiNLPjSwI6b1SZOMNZ9f8tJ1LcxawrVMWIjZFdrYXuORfcaHfu0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849657; c=relaxed/simple; bh=IrOVJYKYkD/uixTWBJui+AZJOs9K49x8gTcXl9hNTdg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=epsZ6Oa0snQRedBNhpcpHpwFcscBjGLrKdB89vuQRi00sQ7JLF/VloL3n/PwlINTd9ihNg28GnW33RWXY42gC93qpm+wfuSvTWgNtlwWyNy31aRwkLgU2Q2Bn2ARQsYegbUzeUVuLsVU4w/qqOzaUHu19efOLXoKn5LnGlw0dGo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=lOJBrBRG; arc=none smtp.client-ip=209.85.166.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="lOJBrBRG" Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7d67d1073easo9752339f.0 for ; Thu, 11 Apr 2024 08:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712849655; x=1713454455; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ve5FDQCQGXd6KkbwdWDSWiHyt+M8i4Vx8XVycwHSjkM=; b=lOJBrBRGb+mY0T/ylfsuZGGKSEiFOIPyLip8/DU7FND+zrGjuDFzhjSTg/yf9qOrcf WIwPvowvPEpuwd6v72XC5HzkPL/vLyTc8f0bBWhd4O8Pf8M+1Rd4QglO41cwOESU7wAu IUWN+u9WedoNkCQDtilc4oXIyKGcRM+fEYPp09gBeOeGqdYF+ocM8Of8HND4OzHnBf4H P2qyBOzZWwYKVa6OXXyBSVP0yBaeIVLDMYzMnGRXPK8/eljTR+QW4KFpKL6Hcvwqx6lS gmqDNCOcDqZkbZWUU2M+BGUo8I2MQRtBxyvFP1WzTsd+2fLJXckM0loEtIKYWVaa+Rfv f8Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849655; x=1713454455; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ve5FDQCQGXd6KkbwdWDSWiHyt+M8i4Vx8XVycwHSjkM=; b=hnJCZwjACT5CQ/0tcWgv+J3aM0qmscj6zwXs+kLnONu4gQ7qO24OGS/0xxoI62WHSU EhLw4qROborAhd3sazEtFuYI0yGPQWNk81dnMvH/J3UJU4daVQV0p0YQSeAbgvhW5HQR 1trVYlFmkCXsKZ1NDlDSivScWZS4BbzwihpJ0UnxhNdAZ3/Xg0qextdlOJxZqc5x2Q6g 5LswpkWIoawBY+t0Zi50sUOD8MtLXUIbD3HECGmuN6QdkblVxp61hP+AWE5whiLaTc9X SDK5I9j82mYRk3h6AN1HgmYHz+MutHYe1xlH7ZVGuY1VV6PejP+8103GWN0NLJG2dObU Kz2g== X-Gm-Message-State: AOJu0Ywat1Ri+siimud3Z/ABhJ1TuDMbg0L9VkDYpAb9NGuTpTXTiq3g N1lKEHGw6Mq0etbx+vy/6SRSwbNYjmTEFpA3I86RnUggo3/y5K4lYPd1tcVd1DMjwwG6JpA9RJ9 i X-Google-Smtp-Source: AGHT+IH/MUvgNYYKrisZ+Ji8Fa7GnMX9eiOPSrfoI8cmqlvHL9B+2t656LZplSjVIl+mDY7eVjw1nA== X-Received: by 2002:a6b:7b05:0:b0:7d6:60dc:bc8e with SMTP id l5-20020a6b7b05000000b007d660dcbc8emr189079iop.1.1712849655188; Thu, 11 Apr 2024 08:34:15 -0700 (PDT) Received: from localhost.localdomain ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id jc25-20020a056638891900b0047f14b7f6c0sm457056jab.5.2024.04.11.08.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:34:13 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 090/437] landlock: convert to read/write iterators Date: Thu, 11 Apr 2024 09:13:50 -0600 Message-ID: <20240411153126.16201-91-axboe@kernel.dk> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240411153126.16201-1-axboe@kernel.dk> References: <20240411153126.16201-1-axboe@kernel.dk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Jens Axboe --- security/landlock/syscalls.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/security/landlock/syscalls.c b/security/landlock/syscalls.c index 6788e73b6681..9a79b90f4dc9 100644 --- a/security/landlock/syscalls.c +++ b/security/landlock/syscalls.c @@ -122,21 +122,12 @@ static int fop_ruleset_release(struct inode *const in= ode, return 0; } =20 -static ssize_t fop_dummy_read(struct file *const filp, char __user *const = buf, - const size_t size, loff_t *const ppos) +static ssize_t fop_dummy_iter(struct kiocb *iocb, struct iov_iter *iov) { /* Dummy handler to enable FMODE_CAN_READ. */ return -EINVAL; } =20 -static ssize_t fop_dummy_write(struct file *const filp, - const char __user *const buf, const size_t size, - loff_t *const ppos) -{ - /* Dummy handler to enable FMODE_CAN_WRITE. */ - return -EINVAL; -} - /* * A ruleset file descriptor enables to build a ruleset by adding (i.e. * writing) rule after rule, without relying on the task's context. This @@ -145,8 +136,8 @@ static ssize_t fop_dummy_write(struct file *const filp, */ static const struct file_operations ruleset_fops =3D { .release =3D fop_ruleset_release, - .read =3D fop_dummy_read, - .write =3D fop_dummy_write, + .read_iter =3D fop_dummy_iter, + .write_iter =3D fop_dummy_iter, }; =20 #define LANDLOCK_ABI_VERSION 4 --=20 2.43.0