All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Elena Reshetova
	<elena.reshetova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-hams-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-ppp-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ganeshgr-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org,
	nbd-p3rKhJxN3npAfugRpC6u6w@public.gmane.org,
	blogic-p3rKhJxN3npAfugRpC6u6w@public.gmane.org,
	matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	ajk-iz34hMvxm2Hmj42eshorlhS11BummzK+@public.gmane.org,
	paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org, j@w1.fi,
	peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
	keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	Hans Liljestrand
	<ishkamiel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	David Windsor <dwindsor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 15/16] drivers, net, intersil: convert hostap_cmd_queue.usecnt from atomic_t to refcount_t
Date: Mon, 03 Apr 2017 14:38:49 +0300	[thread overview]
Message-ID: <874ly5oh4m.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1490691403-4016-16-git-send-email-elena.reshetova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> (Elena Reshetova's message of "Tue, 28 Mar 2017 11:56:42 +0300")

Elena Reshetova <elena.reshetova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> writes:

> refcount_t type and corresponding API should be
> used instead of atomic_t when the variable is used as
> a reference counter. This allows to avoid accidental
> refcounter overflows that might lead to use-after-free
> situations.
>
> Signed-off-by: Elena Reshetova <elena.reshetova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Hans Liljestrand <ishkamiel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> Signed-off-by: David Windsor <dwindsor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/net/wireless/intersil/hostap/hostap_hw.c   | 12 ++++++------
>  drivers/net/wireless/intersil/hostap/hostap_wlan.h |  3 ++-
>  2 files changed, 8 insertions(+), 7 deletions(-)

The prefix should be "hostap:", I'll fix that.

-- 
Kalle Valo

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@codeaurora.org>
To: Elena Reshetova
	<elena.reshetova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-hams-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-ppp-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ganeshgr-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org,
	nbd-p3rKhJxN3npAfugRpC6u6w@public.gmane.org,
	blogic-p3rKhJxN3npAfugRpC6u6w@public.gmane.org,
	matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	ajk-iz34hMvxm2Hmj42eshorlhS11BummzK+@public.gmane.org,
	paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org, j@w1.fi,
	peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
	keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	Hans Liljestrand
	<ishkamiel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	David Windsor <dwindsor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 15/16] drivers, net, intersil: convert hostap_cmd_queue.usecnt from atomic_t to refcount_
Date: Mon, 03 Apr 2017 11:38:49 +0000	[thread overview]
Message-ID: <874ly5oh4m.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1490691403-4016-16-git-send-email-elena.reshetova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> (Elena Reshetova's message of "Tue, 28 Mar 2017 11:56:42 +0300")

Elena Reshetova <elena.reshetova@intel.com> writes:

> refcount_t type and corresponding API should be
> used instead of atomic_t when the variable is used as
> a reference counter. This allows to avoid accidental
> refcounter overflows that might lead to use-after-free
> situations.
>
> Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
> Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: David Windsor <dwindsor@gmail.com>
> ---
>  drivers/net/wireless/intersil/hostap/hostap_hw.c   | 12 ++++++------
>  drivers/net/wireless/intersil/hostap/hostap_wlan.h |  3 ++-
>  2 files changed, 8 insertions(+), 7 deletions(-)

The prefix should be "hostap:", I'll fix that.

-- 
Kalle Valo

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@codeaurora.org>
To: Elena Reshetova <elena.reshetova@intel.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-rdma@vger.kernel.org,
	linux-hams@vger.kernel.org, linux-ppp@vger.kernel.org,
	linux-wireless@vger.kernel.org, ganeshgr@chelsio.com,
	nbd@openwrt.org, blogic@openwrt.org, matthias.bgg@gmail.com,
	yishaih@mellanox.com, saeedm@mellanox.com, matanb@mellanox.com,
	leonro@mellanox.com, ajk@comnets.uni-bremen.de, paulus@samba.org,
	j@w1.fi, peterz@infradead.org, keescook@chromium.org,
	gregkh@linuxfoundation.org,
	Hans Liljestrand <ishkamiel@gmail.com>,
	David Windsor <dwindsor@gmail.com>
Subject: Re: [PATCH 15/16] drivers, net, intersil: convert hostap_cmd_queue.usecnt from atomic_t to refcount_t
Date: Mon, 03 Apr 2017 14:38:49 +0300	[thread overview]
Message-ID: <874ly5oh4m.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1490691403-4016-16-git-send-email-elena.reshetova@intel.com> (Elena Reshetova's message of "Tue, 28 Mar 2017 11:56:42 +0300")

Elena Reshetova <elena.reshetova@intel.com> writes:

> refcount_t type and corresponding API should be
> used instead of atomic_t when the variable is used as
> a reference counter. This allows to avoid accidental
> refcounter overflows that might lead to use-after-free
> situations.
>
> Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
> Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: David Windsor <dwindsor@gmail.com>
> ---
>  drivers/net/wireless/intersil/hostap/hostap_hw.c   | 12 ++++++------
>  drivers/net/wireless/intersil/hostap/hostap_wlan.h |  3 ++-
>  2 files changed, 8 insertions(+), 7 deletions(-)

The prefix should be "hostap:", I'll fix that.

-- 
Kalle Valo

WARNING: multiple messages have this Message-ID (diff)
From: kvalo@codeaurora.org (Kalle Valo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 15/16] drivers, net, intersil: convert hostap_cmd_queue.usecnt from atomic_t to refcount_t
Date: Mon, 03 Apr 2017 14:38:49 +0300	[thread overview]
Message-ID: <874ly5oh4m.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1490691403-4016-16-git-send-email-elena.reshetova@intel.com> (Elena Reshetova's message of "Tue, 28 Mar 2017 11:56:42 +0300")

Elena Reshetova <elena.reshetova@intel.com> writes:

> refcount_t type and corresponding API should be
> used instead of atomic_t when the variable is used as
> a reference counter. This allows to avoid accidental
> refcounter overflows that might lead to use-after-free
> situations.
>
> Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
> Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: David Windsor <dwindsor@gmail.com>
> ---
>  drivers/net/wireless/intersil/hostap/hostap_hw.c   | 12 ++++++------
>  drivers/net/wireless/intersil/hostap/hostap_wlan.h |  3 ++-
>  2 files changed, 8 insertions(+), 7 deletions(-)

The prefix should be "hostap:", I'll fix that.

-- 
Kalle Valo

  parent reply	other threads:[~2017-04-03 11:38 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28  8:56 [PATCH 00/16] Networking drivers refcount conversions Elena Reshetova
2017-03-28  8:56 ` Elena Reshetova
2017-03-28  8:56 ` Elena Reshetova
2017-03-28  8:56 ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 01/16] drivers, net, ethernet: convert clip_entry.refcnt from atomic_t to refcount_t Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 02/16] drivers, net, ethernet: convert mtk_eth.dma_refcnt " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 03/16] drivers, net, mlx4: convert mlx4_cq.refcount " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 04/16] drivers, net, mlx4: convert mlx4_qp.refcount " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 05/16] drivers, net, mlx4: convert mlx4_srq.refcount " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 06/16] drivers, net, mlx5: convert mlx5_cq.refcount " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  9:33   ` David Laight
2017-03-28  9:33     ` David Laight
2017-03-28  9:33     ` David Laight
2017-03-28  9:33     ` David Laight
2017-03-28  9:33     ` David Laight
2017-03-28 14:00     ` Reshetova, Elena
2017-03-28 14:00       ` Reshetova, Elena
2017-03-28 14:00       ` Reshetova, Elena
2017-03-28 14:00       ` Reshetova, Elena
     [not found] ` <1490691403-4016-1-git-send-email-elena.reshetova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-28  8:56   ` [PATCH 07/16] drivers, net, mlx5: convert fs_node.refcount " Elena Reshetova
2017-03-28  8:56     ` Elena Reshetova
2017-03-28  8:56     ` Elena Reshetova
2017-03-28  8:56     ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 08/16] drivers, net, hamradio: convert sixpack.refcnt " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 09/16] drivers, net: convert masces_rx_sa.refcnt " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 10/16] drivers, net: convert masces_rx_sc.refcnt " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 11/16] drivers, net: convert masces_tx_sa.refcnt " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 12/16] drivers, net, ppp: convert asyncppp.refcnt " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 13/16] drivers, net, ppp: convert ppp_file.refcnt " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 14/16] drivers, net, ppp: convert syncppp.refcnt " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56 ` [PATCH 15/16] drivers, net, intersil: convert hostap_cmd_queue.usecnt " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-05-22 15:24   ` [15/16] hostap: " Kalle Valo
2017-05-22 15:24     ` Kalle Valo
2017-05-22 15:24     ` Kalle Valo
     [not found]   ` <1490691403-4016-16-git-send-email-elena.reshetova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-04-03 11:38     ` Kalle Valo [this message]
2017-04-03 11:38       ` [PATCH 15/16] drivers, net, intersil: " Kalle Valo
2017-04-03 11:38       ` Kalle Valo
2017-04-03 11:38       ` [PATCH 15/16] drivers, net, intersil: convert hostap_cmd_queue.usecnt from atomic_t to refcount_ Kalle Valo
2017-05-22 15:24     ` [15/16] hostap: convert hostap_cmd_queue.usecnt from atomic_t to refcount_t Kalle Valo
2017-05-22 15:24       ` Kalle Valo
2017-05-22 15:24       ` Kalle Valo
2017-05-22 15:24       ` Kalle Valo
2017-03-28  8:56 ` [PATCH 16/16] drivers, net, intersil: convert request_context.refcount " Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-03-28  8:56   ` Elena Reshetova
2017-04-03 11:41   ` Kalle Valo
2017-04-03 11:41     ` Kalle Valo
2017-04-03 11:41     ` [PATCH 16/16] drivers, net, intersil: convert request_context.refcount from atomic_t to refcount Kalle Valo
2017-04-04 10:07     ` [PATCH 16/16] drivers, net, intersil: convert request_context.refcount from atomic_t to refcount_t Reshetova, Elena
2017-04-04 10:07       ` Reshetova, Elena
2017-04-04 10:07       ` Reshetova, Elena
2017-04-04 10:07       ` Reshetova, Elena
2017-04-04 10:07       ` [PATCH 16/16] drivers, net, intersil: convert request_context.refcount from atomic_t to refcount Reshetova, Elena
2017-04-05 10:33       ` [PATCH 16/16] drivers, net, intersil: convert request_context.refcount from atomic_t to refcount_t Kalle Valo
2017-04-05 10:33         ` Kalle Valo
2017-04-05 10:33         ` Kalle Valo
2017-04-05 10:33         ` Kalle Valo
2017-04-05 10:33         ` [PATCH 16/16] drivers, net, intersil: convert request_context.refcount from atomic_t to refcount Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ly5oh4m.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=ajk-iz34hMvxm2Hmj42eshorlhS11BummzK+@public.gmane.org \
    --cc=blogic-p3rKhJxN3npAfugRpC6u6w@public.gmane.org \
    --cc=dwindsor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=elena.reshetova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=ganeshgr-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=ishkamiel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=j@w1.fi \
    --cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-hams-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-ppp-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=nbd-p3rKhJxN3npAfugRpC6u6w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    --cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.