netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/24] use vmalloc_array and vcalloc
@ 2023-06-27 14:43 Julia Lawall
  2023-06-27 14:43 ` [PATCH v2 02/24] octeon_ep: " Julia Lawall
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Julia Lawall @ 2023-06-27 14:43 UTC (permalink / raw)
  To: linux-hyperv
  Cc: kernel-janitors, keescook, christophe.jaillet, kuba, kasan-dev,
	Andrey Konovalov, Dmitry Vyukov, iommu, linux-tegra, Robin Murphy,
	Krishna Reddy, virtualization, Xuan Zhuo, linux-scsi,
	linaro-mm-sig, linux-media, John Stultz, Brian Starkey,
	Laura Abbott, Liam Mark, Benjamin Gaignard, dri-devel,
	linux-kernel, netdev, Shailend Chand, linux-rdma, mhi,
	linux-arm-msm, linux-btrfs, intel-gvt-dev, intel-gfx, Dave Hansen,
	H. Peter Anvin, linux-sgx

The functions vmalloc_array and vcalloc were introduced in

commit a8749a35c399 ("mm: vmalloc: introduce array allocation functions")

but are not used much yet.  This series introduces uses of
these functions, to protect against multiplication overflows.

The changes were done using the following Coccinelle semantic
patch.

@initialize:ocaml@
@@

let rename alloc =
  match alloc with
    "vmalloc" -> "vmalloc_array"
  | "vzalloc" -> "vcalloc"
  | _ -> failwith "unknown"

@@
    size_t e1,e2;
    constant C1, C2;
    expression E1, E2, COUNT, x1, x2, x3;
    typedef u8;
    typedef __u8;
    type t = {u8,__u8,char,unsigned char};
    identifier alloc = {vmalloc,vzalloc};
    fresh identifier realloc = script:ocaml(alloc) { rename alloc };
@@

(
      alloc(x1*x2*x3)
|
      alloc(C1 * C2)
|
      alloc((sizeof(t)) * (COUNT), ...)
|
-     alloc((e1) * (e2))
+     realloc(e1, e2)
|
-     alloc((e1) * (COUNT))
+     realloc(COUNT, e1)
|
-     alloc((E1) * (E2))
+     realloc(E1, E2)
)

v2: This series uses vmalloc_array and vcalloc instead of
array_size.  It also leaves a multiplication of a constant by a
sizeof as is.  Two patches are thus dropped from the series.

---

 arch/x86/kernel/cpu/sgx/main.c                    |    2 +-
 drivers/accel/habanalabs/common/device.c          |    3 ++-
 drivers/accel/habanalabs/common/state_dump.c      |    7 ++++---
 drivers/bus/mhi/host/init.c                       |    2 +-
 drivers/comedi/comedi_buf.c                       |    4 ++--
 drivers/dma-buf/heaps/system_heap.c               |    2 +-
 drivers/gpu/drm/gud/gud_pipe.c                    |    2 +-
 drivers/gpu/drm/i915/gvt/gtt.c                    |    6 ++++--
 drivers/infiniband/hw/bnxt_re/qplib_res.c         |    4 ++--
 drivers/infiniband/hw/erdma/erdma_verbs.c         |    4 ++--
 drivers/infiniband/sw/siw/siw_qp.c                |    4 ++--
 drivers/infiniband/sw/siw/siw_verbs.c             |    6 +++---
 drivers/iommu/tegra-gart.c                        |    4 ++--
 drivers/net/ethernet/amd/pds_core/core.c          |    4 ++--
 drivers/net/ethernet/freescale/enetc/enetc.c      |    4 ++--
 drivers/net/ethernet/google/gve/gve_tx.c          |    2 +-
 drivers/net/ethernet/marvell/octeon_ep/octep_rx.c |    2 +-
 drivers/net/ethernet/microsoft/mana/hw_channel.c  |    2 +-
 drivers/net/ethernet/pensando/ionic/ionic_lif.c   |    4 ++--
 drivers/scsi/fnic/fnic_trace.c                    |    2 +-
 drivers/scsi/qla2xxx/qla_init.c                   |    4 ++--
 drivers/vdpa/vdpa_user/iova_domain.c              |    4 ++--
 drivers/virtio/virtio_mem.c                       |    6 +++---
 fs/btrfs/zoned.c                                  |    4 ++--
 kernel/kcov.c                                     |    2 +-
 lib/test_vmalloc.c                                |    9 +++++----
 26 files changed, 52 insertions(+), 47 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 02/24] octeon_ep: use vmalloc_array and vcalloc
  2023-06-27 14:43 [PATCH v2 00/24] use vmalloc_array and vcalloc Julia Lawall
@ 2023-06-27 14:43 ` Julia Lawall
  2023-06-27 14:43 ` [PATCH v2 04/24] gve: " Julia Lawall
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2023-06-27 14:43 UTC (permalink / raw)
  To: Veerasenareddy Burru
  Cc: kernel-janitors, keescook, christophe.jaillet, kuba,
	Abhijit Ayarekar, David S. Miller, Eric Dumazet, Paolo Abeni,
	netdev, linux-kernel

Use vmalloc_array and vcalloc to protect against
multiplication overflows.

The changes were done using the following Coccinelle
semantic patch:

// <smpl>
@initialize:ocaml@
@@

let rename alloc =
  match alloc with
    "vmalloc" -> "vmalloc_array"
  | "vzalloc" -> "vcalloc"
  | _ -> failwith "unknown"

@@
    size_t e1,e2;
    constant C1, C2;
    expression E1, E2, COUNT, x1, x2, x3;
    typedef u8;
    typedef __u8;
    type t = {u8,__u8,char,unsigned char};
    identifier alloc = {vmalloc,vzalloc};
    fresh identifier realloc = script:ocaml(alloc) { rename alloc };
@@

(
      alloc(x1*x2*x3)
|
      alloc(C1 * C2)
|
      alloc((sizeof(t)) * (COUNT), ...)
|
-     alloc((e1) * (e2))
+     realloc(e1, e2)
|
-     alloc((e1) * (COUNT))
+     realloc(COUNT, e1)
|
-     alloc((E1) * (E2))
+     realloc(E1, E2)
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
v2: Use vmalloc_array and vcalloc instead of array_size.
This also leaves a multiplication of a constant by a sizeof
as is.  Two patches are thus dropped from the series.

 drivers/net/ethernet/marvell/octeon_ep/octep_rx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/net/ethernet/marvell/octeon_ep/octep_rx.c b/drivers/net/ethernet/marvell/octeon_ep/octep_rx.c
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_rx.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_rx.c
@@ -158,7 +158,7 @@ static int octep_setup_oq(struct octep_d
 		goto desc_dma_alloc_err;
 	}
 
-	oq->buff_info = vzalloc(oq->max_count * OCTEP_OQ_RECVBUF_SIZE);
+	oq->buff_info = vcalloc(oq->max_count, OCTEP_OQ_RECVBUF_SIZE);
 	if (unlikely(!oq->buff_info)) {
 		dev_err(&oct->pdev->dev,
 			"Failed to allocate buffer info for OQ-%d\n", q_no);


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 04/24] gve: use vmalloc_array and vcalloc
  2023-06-27 14:43 [PATCH v2 00/24] use vmalloc_array and vcalloc Julia Lawall
  2023-06-27 14:43 ` [PATCH v2 02/24] octeon_ep: " Julia Lawall
@ 2023-06-27 14:43 ` Julia Lawall
  2023-06-27 14:43 ` [PATCH v2 09/24] pds_core: " Julia Lawall
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2023-06-27 14:43 UTC (permalink / raw)
  To: Jeroen de Borst
  Cc: kernel-janitors, keescook, christophe.jaillet, kuba,
	Praveen Kaligineedi, Shailend Chand, David S. Miller,
	Eric Dumazet, Paolo Abeni, netdev, linux-kernel

Use vmalloc_array and vcalloc to protect against
multiplication overflows.

The changes were done using the following Coccinelle
semantic patch:

// <smpl>
@initialize:ocaml@
@@

let rename alloc =
  match alloc with
    "vmalloc" -> "vmalloc_array"
  | "vzalloc" -> "vcalloc"
  | _ -> failwith "unknown"

@@
    size_t e1,e2;
    constant C1, C2;
    expression E1, E2, COUNT, x1, x2, x3;
    typedef u8;
    typedef __u8;
    type t = {u8,__u8,char,unsigned char};
    identifier alloc = {vmalloc,vzalloc};
    fresh identifier realloc = script:ocaml(alloc) { rename alloc };
@@

(
      alloc(x1*x2*x3)
|
      alloc(C1 * C2)
|
      alloc((sizeof(t)) * (COUNT), ...)
|
-     alloc((e1) * (e2))
+     realloc(e1, e2)
|
-     alloc((e1) * (COUNT))
+     realloc(COUNT, e1)
|
-     alloc((E1) * (E2))
+     realloc(E1, E2)
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
v2: Use vmalloc_array and vcalloc instead of array_size.
This also leaves a multiplication of a constant by a sizeof
as is.  Two patches are thus dropped from the series.

 drivers/net/ethernet/google/gve/gve_tx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/net/ethernet/google/gve/gve_tx.c b/drivers/net/ethernet/google/gve/gve_tx.c
--- a/drivers/net/ethernet/google/gve/gve_tx.c
+++ b/drivers/net/ethernet/google/gve/gve_tx.c
@@ -248,7 +248,7 @@ static int gve_tx_alloc_ring(struct gve_
 	tx->mask = slots - 1;
 
 	/* alloc metadata */
-	tx->info = vzalloc(sizeof(*tx->info) * slots);
+	tx->info = vcalloc(slots, sizeof(*tx->info));
 	if (!tx->info)
 		return -ENOMEM;
 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 09/24] pds_core: use vmalloc_array and vcalloc
  2023-06-27 14:43 [PATCH v2 00/24] use vmalloc_array and vcalloc Julia Lawall
  2023-06-27 14:43 ` [PATCH v2 02/24] octeon_ep: " Julia Lawall
  2023-06-27 14:43 ` [PATCH v2 04/24] gve: " Julia Lawall
@ 2023-06-27 14:43 ` Julia Lawall
  2023-06-27 14:43 ` [PATCH v2 11/24] ionic: " Julia Lawall
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2023-06-27 14:43 UTC (permalink / raw)
  To: Shannon Nelson
  Cc: kernel-janitors, keescook, christophe.jaillet, kuba,
	Brett Creeley, David S. Miller, Eric Dumazet, Paolo Abeni, netdev,
	linux-kernel

Use vmalloc_array and vcalloc to protect against
multiplication overflows.

The changes were done using the following Coccinelle
semantic patch:

// <smpl>
@initialize:ocaml@
@@

let rename alloc =
  match alloc with
    "vmalloc" -> "vmalloc_array"
  | "vzalloc" -> "vcalloc"
  | _ -> failwith "unknown"

@@
    size_t e1,e2;
    constant C1, C2;
    expression E1, E2, COUNT, x1, x2, x3;
    typedef u8;
    typedef __u8;
    type t = {u8,__u8,char,unsigned char};
    identifier alloc = {vmalloc,vzalloc};
    fresh identifier realloc = script:ocaml(alloc) { rename alloc };
@@

(
      alloc(x1*x2*x3)
|
      alloc(C1 * C2)
|
      alloc((sizeof(t)) * (COUNT), ...)
|
-     alloc((e1) * (e2))
+     realloc(e1, e2)
|
-     alloc((e1) * (COUNT))
+     realloc(COUNT, e1)
|
-     alloc((E1) * (E2))
+     realloc(E1, E2)
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
v2: Use vmalloc_array and vcalloc instead of array_size.
This also leaves a multiplication of a constant by a sizeof
as is.  Two patches are thus dropped from the series.

 drivers/net/ethernet/amd/pds_core/core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -u -p a/drivers/net/ethernet/amd/pds_core/core.c b/drivers/net/ethernet/amd/pds_core/core.c
--- a/drivers/net/ethernet/amd/pds_core/core.c
+++ b/drivers/net/ethernet/amd/pds_core/core.c
@@ -196,7 +196,7 @@ int pdsc_qcq_alloc(struct pdsc *pdsc, un
 	dma_addr_t q_base_pa;
 	int err;
 
-	qcq->q.info = vzalloc(num_descs * sizeof(*qcq->q.info));
+	qcq->q.info = vcalloc(num_descs, sizeof(*qcq->q.info));
 	if (!qcq->q.info) {
 		err = -ENOMEM;
 		goto err_out;
@@ -219,7 +219,7 @@ int pdsc_qcq_alloc(struct pdsc *pdsc, un
 	if (err)
 		goto err_out_free_q_info;
 
-	qcq->cq.info = vzalloc(num_descs * sizeof(*qcq->cq.info));
+	qcq->cq.info = vcalloc(num_descs, sizeof(*qcq->cq.info));
 	if (!qcq->cq.info) {
 		err = -ENOMEM;
 		goto err_out_free_irq;


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 11/24] ionic: use vmalloc_array and vcalloc
  2023-06-27 14:43 [PATCH v2 00/24] use vmalloc_array and vcalloc Julia Lawall
                   ` (2 preceding siblings ...)
  2023-06-27 14:43 ` [PATCH v2 09/24] pds_core: " Julia Lawall
@ 2023-06-27 14:43 ` Julia Lawall
  2023-06-27 14:43 ` [PATCH v2 18/24] net: enetc: " Julia Lawall
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2023-06-27 14:43 UTC (permalink / raw)
  To: Shannon Nelson
  Cc: kernel-janitors, keescook, christophe.jaillet, kuba,
	Brett Creeley, drivers, David S. Miller, Eric Dumazet,
	Paolo Abeni, netdev, linux-kernel

Use vmalloc_array and vcalloc to protect against
multiplication overflows.

The changes were done using the following Coccinelle
semantic patch:

// <smpl>
@initialize:ocaml@
@@

let rename alloc =
  match alloc with
    "vmalloc" -> "vmalloc_array"
  | "vzalloc" -> "vcalloc"
  | _ -> failwith "unknown"

@@
    size_t e1,e2;
    constant C1, C2;
    expression E1, E2, COUNT, x1, x2, x3;
    typedef u8;
    typedef __u8;
    type t = {u8,__u8,char,unsigned char};
    identifier alloc = {vmalloc,vzalloc};
    fresh identifier realloc = script:ocaml(alloc) { rename alloc };
@@

(
      alloc(x1*x2*x3)
|
      alloc(C1 * C2)
|
      alloc((sizeof(t)) * (COUNT), ...)
|
-     alloc((e1) * (e2))
+     realloc(e1, e2)
|
-     alloc((e1) * (COUNT))
+     realloc(COUNT, e1)
|
-     alloc((E1) * (E2))
+     realloc(E1, E2)
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
v2: Use vmalloc_array and vcalloc instead of array_size.
This also leaves a multiplication of a constant by a sizeof
as is.  Two patches are thus dropped from the series.

 drivers/net/ethernet/pensando/ionic/ionic_lif.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -u -p a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -561,7 +561,7 @@ static int ionic_qcq_alloc(struct ionic_
 	new->q.dev = dev;
 	new->flags = flags;
 
-	new->q.info = vzalloc(num_descs * sizeof(*new->q.info));
+	new->q.info = vcalloc(num_descs, sizeof(*new->q.info));
 	if (!new->q.info) {
 		netdev_err(lif->netdev, "Cannot allocate queue info\n");
 		err = -ENOMEM;
@@ -582,7 +582,7 @@ static int ionic_qcq_alloc(struct ionic_
 	if (err)
 		goto err_out;
 
-	new->cq.info = vzalloc(num_descs * sizeof(*new->cq.info));
+	new->cq.info = vcalloc(num_descs, sizeof(*new->cq.info));
 	if (!new->cq.info) {
 		netdev_err(lif->netdev, "Cannot allocate completion queue info\n");
 		err = -ENOMEM;


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 18/24] net: enetc: use vmalloc_array and vcalloc
  2023-06-27 14:43 [PATCH v2 00/24] use vmalloc_array and vcalloc Julia Lawall
                   ` (3 preceding siblings ...)
  2023-06-27 14:43 ` [PATCH v2 11/24] ionic: " Julia Lawall
@ 2023-06-27 14:43 ` Julia Lawall
  2023-06-27 14:43 ` [PATCH v2 22/24] net: mana: " Julia Lawall
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2023-06-27 14:43 UTC (permalink / raw)
  To: Claudiu Manoil
  Cc: kernel-janitors, keescook, christophe.jaillet, kuba,
	Vladimir Oltean, David S. Miller, Eric Dumazet, Paolo Abeni,
	netdev, linux-kernel

Use vmalloc_array and vcalloc to protect against
multiplication overflows.

The changes were done using the following Coccinelle
semantic patch:

// <smpl>
@initialize:ocaml@
@@

let rename alloc =
  match alloc with
    "vmalloc" -> "vmalloc_array"
  | "vzalloc" -> "vcalloc"
  | _ -> failwith "unknown"

@@
    size_t e1,e2;
    constant C1, C2;
    expression E1, E2, COUNT, x1, x2, x3;
    typedef u8;
    typedef __u8;
    type t = {u8,__u8,char,unsigned char};
    identifier alloc = {vmalloc,vzalloc};
    fresh identifier realloc = script:ocaml(alloc) { rename alloc };
@@

(
      alloc(x1*x2*x3)
|
      alloc(C1 * C2)
|
      alloc((sizeof(t)) * (COUNT), ...)
|
-     alloc((e1) * (e2))
+     realloc(e1, e2)
|
-     alloc((e1) * (COUNT))
+     realloc(COUNT, e1)
|
-     alloc((E1) * (E2))
+     realloc(E1, E2)
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
v2: Use vmalloc_array and vcalloc instead of array_size.
This also leaves a multiplication of a constant by a sizeof
as is.  Two patches are thus dropped from the series.

 drivers/net/ethernet/freescale/enetc/enetc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -u -p a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -1789,7 +1789,7 @@ static int enetc_alloc_tx_resource(struc
 	res->bd_count = bd_count;
 	res->bd_size = sizeof(union enetc_tx_bd);
 
-	res->tx_swbd = vzalloc(bd_count * sizeof(*res->tx_swbd));
+	res->tx_swbd = vcalloc(bd_count, sizeof(*res->tx_swbd));
 	if (!res->tx_swbd)
 		return -ENOMEM;
 
@@ -1877,7 +1877,7 @@ static int enetc_alloc_rx_resource(struc
 	if (extended)
 		res->bd_size *= 2;
 
-	res->rx_swbd = vzalloc(bd_count * sizeof(struct enetc_rx_swbd));
+	res->rx_swbd = vcalloc(bd_count, sizeof(struct enetc_rx_swbd));
 	if (!res->rx_swbd)
 		return -ENOMEM;
 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 22/24] net: mana: use vmalloc_array and vcalloc
  2023-06-27 14:43 [PATCH v2 00/24] use vmalloc_array and vcalloc Julia Lawall
                   ` (4 preceding siblings ...)
  2023-06-27 14:43 ` [PATCH v2 18/24] net: enetc: " Julia Lawall
@ 2023-06-27 14:43 ` Julia Lawall
  2023-06-27 16:40 ` [PATCH v2 00/24] " patchwork-bot+netdevbpf
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2023-06-27 14:43 UTC (permalink / raw)
  To: K. Y. Srinivasan
  Cc: kernel-janitors, keescook, christophe.jaillet, kuba,
	Haiyang Zhang, Wei Liu, Dexuan Cui, David S. Miller, Eric Dumazet,
	Paolo Abeni, linux-hyperv, netdev, linux-kernel

Use vmalloc_array and vcalloc to protect against
multiplication overflows.

The changes were done using the following Coccinelle
semantic patch:

// <smpl>
@initialize:ocaml@
@@

let rename alloc =
  match alloc with
    "vmalloc" -> "vmalloc_array"
  | "vzalloc" -> "vcalloc"
  | _ -> failwith "unknown"

@@
    size_t e1,e2;
    constant C1, C2;
    expression E1, E2, COUNT, x1, x2, x3;
    typedef u8;
    typedef __u8;
    type t = {u8,__u8,char,unsigned char};
    identifier alloc = {vmalloc,vzalloc};
    fresh identifier realloc = script:ocaml(alloc) { rename alloc };
@@

(
      alloc(x1*x2*x3)
|
      alloc(C1 * C2)
|
      alloc((sizeof(t)) * (COUNT), ...)
|
-     alloc((e1) * (e2))
+     realloc(e1, e2)
|
-     alloc((e1) * (COUNT))
+     realloc(COUNT, e1)
|
-     alloc((E1) * (E2))
+     realloc(E1, E2)
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
v2: Use vmalloc_array and vcalloc instead of array_size.
This also leaves a multiplication of a constant by a sizeof
as is.  Two patches are thus dropped from the series.

 drivers/net/ethernet/microsoft/mana/hw_channel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/net/ethernet/microsoft/mana/hw_channel.c b/drivers/net/ethernet/microsoft/mana/hw_channel.c
--- a/drivers/net/ethernet/microsoft/mana/hw_channel.c
+++ b/drivers/net/ethernet/microsoft/mana/hw_channel.c
@@ -627,7 +627,7 @@ static int mana_hwc_establish_channel(st
 	if (WARN_ON(cq->id >= gc->max_num_cqs))
 		return -EPROTO;
 
-	gc->cq_table = vzalloc(gc->max_num_cqs * sizeof(struct gdma_queue *));
+	gc->cq_table = vcalloc(gc->max_num_cqs, sizeof(struct gdma_queue *));
 	if (!gc->cq_table)
 		return -ENOMEM;
 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 00/24] use vmalloc_array and vcalloc
  2023-06-27 14:43 [PATCH v2 00/24] use vmalloc_array and vcalloc Julia Lawall
                   ` (5 preceding siblings ...)
  2023-06-27 14:43 ` [PATCH v2 22/24] net: mana: " Julia Lawall
@ 2023-06-27 16:40 ` patchwork-bot+netdevbpf
  2023-07-06  1:35 ` Martin K. Petersen
  2023-07-11 16:31 ` (subset) " Martin K. Petersen
  8 siblings, 0 replies; 10+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-27 16:40 UTC (permalink / raw)
  To: Julia Lawall
  Cc: linux-hyperv, kernel-janitors, keescook, christophe.jaillet, kuba,
	kasan-dev, andreyknvl, dvyukov, iommu, linux-tegra, robin.murphy,
	vdumpa, virtualization, xuanzhuo, linux-scsi, linaro-mm-sig,
	linux-media, jstultz, Brian.Starkey, labbott, lmark,
	benjamin.gaignard, dri-devel, linux-kernel, netdev, shailend,
	linux-rdma, mhi, linux-arm-msm, linux-btrfs, intel-gvt-dev,
	intel-gfx, dave.hansen, hpa, linux-sgx

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 27 Jun 2023 16:43:15 +0200 you wrote:
> The functions vmalloc_array and vcalloc were introduced in
> 
> commit a8749a35c399 ("mm: vmalloc: introduce array allocation functions")
> 
> but are not used much yet.  This series introduces uses of
> these functions, to protect against multiplication overflows.
> 
> [...]

Here is the summary with links:
  - [v2,02/24] octeon_ep: use vmalloc_array and vcalloc
    https://git.kernel.org/netdev/net-next/c/32d462a5c3e5
  - [v2,04/24] gve: use vmalloc_array and vcalloc
    https://git.kernel.org/netdev/net-next/c/a13de901e8d5
  - [v2,09/24] pds_core: use vmalloc_array and vcalloc
    https://git.kernel.org/netdev/net-next/c/906a76cc7645
  - [v2,11/24] ionic: use vmalloc_array and vcalloc
    https://git.kernel.org/netdev/net-next/c/f712c8297e0a
  - [v2,18/24] net: enetc: use vmalloc_array and vcalloc
    https://git.kernel.org/netdev/net-next/c/fa87c54693ae
  - [v2,22/24] net: mana: use vmalloc_array and vcalloc
    https://git.kernel.org/netdev/net-next/c/e9c74f8b8a31

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 00/24] use vmalloc_array and vcalloc
  2023-06-27 14:43 [PATCH v2 00/24] use vmalloc_array and vcalloc Julia Lawall
                   ` (6 preceding siblings ...)
  2023-06-27 16:40 ` [PATCH v2 00/24] " patchwork-bot+netdevbpf
@ 2023-07-06  1:35 ` Martin K. Petersen
  2023-07-11 16:31 ` (subset) " Martin K. Petersen
  8 siblings, 0 replies; 10+ messages in thread
From: Martin K. Petersen @ 2023-07-06  1:35 UTC (permalink / raw)
  To: Julia Lawall
  Cc: linux-hyperv, kernel-janitors, keescook, christophe.jaillet, kuba,
	kasan-dev, Andrey Konovalov, Dmitry Vyukov, iommu, linux-tegra,
	Robin Murphy, Krishna Reddy, virtualization, Xuan Zhuo,
	linux-scsi, linaro-mm-sig, linux-media, John Stultz,
	Brian Starkey, Laura Abbott, Liam Mark, Benjamin Gaignard,
	dri-devel, linux-kernel, netdev, Shailend Chand, linux-rdma, mhi,
	linux-arm-msm, linux-btrfs, intel-gvt-dev, intel-gfx, Dave Hansen,
	H. Peter Anvin, linux-sgx


Julia,

> The functions vmalloc_array and vcalloc were introduced in
>
> commit a8749a35c399 ("mm: vmalloc: introduce array allocation functions")
>
> but are not used much yet.  This series introduces uses of
> these functions, to protect against multiplication overflows.

Applied #7 and #24 to 6.5/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: (subset) [PATCH v2 00/24] use vmalloc_array and vcalloc
  2023-06-27 14:43 [PATCH v2 00/24] use vmalloc_array and vcalloc Julia Lawall
                   ` (7 preceding siblings ...)
  2023-07-06  1:35 ` Martin K. Petersen
@ 2023-07-11 16:31 ` Martin K. Petersen
  8 siblings, 0 replies; 10+ messages in thread
From: Martin K. Petersen @ 2023-07-11 16:31 UTC (permalink / raw)
  To: linux-hyperv, Julia Lawall
  Cc: Martin K . Petersen, kernel-janitors, keescook,
	christophe.jaillet, kuba, kasan-dev, Andrey Konovalov,
	Dmitry Vyukov, iommu, linux-tegra, Robin Murphy, Krishna Reddy,
	virtualization, Xuan Zhuo, linux-scsi, linaro-mm-sig, linux-media,
	John Stultz, Brian Starkey, Laura Abbott, Liam Mark,
	Benjamin Gaignard, dri-devel, linux-kernel, netdev,
	Shailend Chand, linux-rdma, mhi, linux-arm-msm, linux-btrfs,
	intel-gvt-dev, intel-gfx, Dave Hansen, H. Peter Anvin, linux-sgx

On Tue, 27 Jun 2023 16:43:15 +0200, Julia Lawall wrote:

> The functions vmalloc_array and vcalloc were introduced in
> 
> commit a8749a35c399 ("mm: vmalloc: introduce array allocation functions")
> 
> but are not used much yet.  This series introduces uses of
> these functions, to protect against multiplication overflows.
> 
> [...]

Applied to 6.5/scsi-fixes, thanks!

[07/24] scsi: fnic: use vmalloc_array and vcalloc
        https://git.kernel.org/mkp/scsi/c/b34c7dcaf311
[24/24] scsi: qla2xxx: use vmalloc_array and vcalloc
        https://git.kernel.org/mkp/scsi/c/04d91b783acf

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-11 16:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27 14:43 [PATCH v2 00/24] use vmalloc_array and vcalloc Julia Lawall
2023-06-27 14:43 ` [PATCH v2 02/24] octeon_ep: " Julia Lawall
2023-06-27 14:43 ` [PATCH v2 04/24] gve: " Julia Lawall
2023-06-27 14:43 ` [PATCH v2 09/24] pds_core: " Julia Lawall
2023-06-27 14:43 ` [PATCH v2 11/24] ionic: " Julia Lawall
2023-06-27 14:43 ` [PATCH v2 18/24] net: enetc: " Julia Lawall
2023-06-27 14:43 ` [PATCH v2 22/24] net: mana: " Julia Lawall
2023-06-27 16:40 ` [PATCH v2 00/24] " patchwork-bot+netdevbpf
2023-07-06  1:35 ` Martin K. Petersen
2023-07-11 16:31 ` (subset) " Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).