I Solicit Your Assist

2022-05-19 Thread Timothy Henkinson
Attention:

First I would like to  explain in detail, All issues relating to the project, I 
am Timothy  Henkinson, a Security personnel at the Raleigh-Durham International 
Airport, North Carolina, USA. During a recent routine check at all 
Security/Storage Units at the airport, a discovery was made about an abandoned 
shipment with no name coming from Belgium, which was on Transit to Panama but 
was intercepted by the Raleigh-Durham International Airport Security: for lack 
of proper clearance papers as the consignment was scanned and seen to be 
containing cash and other valuable, between US$35.5Million US Dollars in 
estimation that was not properly declared to the authorities. Since the tags on 
the consignment showed the item contains personal belongings/ family treasures, 
which is not in regulations to the delivery requirements by the Transportation 
Security Administration (TSA).

However, be informed that the reason I have taken it upon myself as a Security 
personnel, at the Raleigh-Durham International Airport to contact you 
personally about this abandoned shipment, is because I would not want to lose 
opportunity since the box has not yet been returned to the United states 
Treasury Department for further inspection after being abandoned by the shipper.

So immediately the confirmation is made, I will go ahead with all negotiations 
with the airport authorities for the release of the consignment box to you as 
the legal owner of the box will give you update and prepare some legal paper 
that will back you as the real owner of the box, then I be able to arrange for 
the delivery to your city with a private courier company.

Also I need us to invest the funds in a profitable business. I would like to 
involve you in this investment project because we anticipate that you should 
have a high level of professional credentials and appropriate investment 
managerial experience to qualify for this position. We look forward to a 
long-term consistent performance with a high point of investing in sectors that 
will yield great turn-around profits.

I request that you kindly forward a summary of your company’s activities or any 
company that you are related to and its previous involvement in handling huge 
investments and the areas in details, where you intend to invest funds once we 
are able to get it claim and deliver it to you, lastly to enable me confirm if 
you are ready to do business with me so that we can continue with next step 
which is preparing a legal paper work with your name as the rightful owner of 
the consignment box

so that it can be released and delivered to you like I said before by a private 
courier company. For confidentiality purposes, contact me through my private 
email for quick processing and response to you.


Timothy Henkinson
Security/Inspection Manager
Raleigh-Durham International Airport
2400 John Brantley Blvd, Morris-ville, NC 27560, United States
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Proposal

2022-05-19 Thread mohammedsaeed
Salam alaikum,

I am the investment officer of UAE based investment company who 
are ready to fund projects outside UAE, in the form of debt 
finance. We grant loan to both Corporate and private entities at 
a low interest rate of 2% ROI per annum. The terms are very 
flexible and interesting.Kindly revert back if you have projects 
that needs funding for further discussion and negotiation.

Thanks

investment officer.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Proposal

2022-05-19 Thread mohammedsaeed
Salam alaikum,

I am the investment officer of UAE based investment company who 
are ready to fund projects outside UAE, in the form of debt 
finance. We grant loan to both Corporate and private entities at 
a low interest rate of 2% ROI per annum. The terms are very 
flexible and interesting.Kindly revert back if you have projects 
that needs funding for further discussion and negotiation.

Thanks

investment officer.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3] Binder: add TF_UPDATE_TXN to replace outdated txn

2022-05-19 Thread Li Li
From: Li Li 

When the target process is busy, incoming oneway transactions are
queued in the async_todo list. If the clients continue sending extra
oneway transactions while the target process is frozen, this queue can
become too large to accommodate new transactions. That's why binder
driver introduced ONEWAY_SPAM_DETECTION to detect this situation. It's
helpful to debug the async binder buffer exhausting issue, but the
issue itself isn't solved directly.

In real cases applications are designed to send oneway transactions
repeatedly, delivering updated inforamtion to the target process.
Typical examples are Wi-Fi signal strength and some real time sensor
data. Even if the apps might only care about the lastet information,
all outdated oneway transactions are still accumulated there until the
frozen process is thawed later. For this kind of situations, there's
no existing method to skip those outdated transactions and deliver the
latest one only.

This patch introduces a new transaction flag TF_UPDATE_TXN. To use it,
use apps can set this new flag along with TF_ONE_WAY. When such an
oneway transaction is to be queued into the async_todo list of a frozen
process, binder driver will check if any previous pending transactions
can be superseded by comparing their code, flags and target node. If
such an outdated pending transaction is found, the latest transaction
will supersede that outdated one. This effectively prevents the async
binder buffer running out and saves unnecessary binder read workloads.

Signed-off-by: Li Li 
---
v3:
  - Add this changelog required by "The canonical patch format"
v2:
  - Fix alignment warnings reported by checkpatch --strict
  - Add descriptive summary in patch subject

 drivers/android/binder.c| 85 -
 drivers/android/binder_trace.h  |  4 ++
 include/uapi/linux/android/binder.h |  1 +
 3 files changed, 87 insertions(+), 3 deletions(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index f3b639e89dd8..bb968cf2f9ec 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2594,6 +2594,56 @@ static int binder_fixup_parent(struct list_head *pf_head,
return binder_add_fixup(pf_head, buffer_offset, bp->buffer, 0);
 }
 
+/**
+ * binder_can_update_transaction() - Can a txn be superseded by an updated one?
+ * @t1: the pending async txn in the frozen process
+ * @t2: the new async txn to supersede the outdated pending one
+ *
+ * Return:  true if t2 can supersede t1
+ *  false if t2 can not supersede t1
+ */
+static bool binder_can_update_transaction(struct binder_transaction *t1,
+ struct binder_transaction *t2)
+{
+   if ((t1->flags & t2->flags & (TF_ONE_WAY | TF_UPDATE_TXN)) !=
+   (TF_ONE_WAY | TF_UPDATE_TXN) || !t1->to_proc || !t2->to_proc)
+   return false;
+   if (t1->to_proc->tsk == t2->to_proc->tsk && t1->code == t2->code &&
+   t1->flags == t2->flags && t1->buffer->pid == t2->buffer->pid &&
+   t1->buffer->target_node->ptr == t2->buffer->target_node->ptr &&
+   t1->buffer->target_node->cookie == t2->buffer->target_node->cookie)
+   return true;
+   return false;
+}
+
+/**
+ * binder_find_outdated_transaction_ilocked() - Find the outdated transaction
+ * @t:  new async transaction
+ * @target_list: list to find outdated transaction
+ *
+ * Return: the outdated transaction if found
+ * NULL if no outdated transacton can be found
+ *
+ * Requires the proc->inner_lock to be held.
+ */
+static struct binder_transaction *
+binder_find_outdated_transaction_ilocked(struct binder_transaction *t,
+struct list_head *target_list)
+{
+   struct binder_work *w;
+
+   list_for_each_entry(w, target_list, entry) {
+   struct binder_transaction *t_queued;
+
+   if (w->type != BINDER_WORK_TRANSACTION)
+   continue;
+   t_queued = container_of(w, struct binder_transaction, work);
+   if (binder_can_update_transaction(t_queued, t))
+   return t_queued;
+   }
+   return NULL;
+}
+
 /**
  * binder_proc_transaction() - sends a transaction to a process and wakes it up
  * @t: transaction to send
@@ -2619,6 +2669,7 @@ static int binder_proc_transaction(struct 
binder_transaction *t,
struct binder_node *node = t->buffer->target_node;
bool oneway = !!(t->flags & TF_ONE_WAY);
bool pending_async = false;
+   struct binder_transaction *t_outdated = NULL;
 
BUG_ON(!node);
binder_node_lock(node);
@@ -2646,12 +2697,24 @@ static int binder_proc_transaction(struct 
binder_transaction *t,
if (!thread && !pending_async)
thread = binder_select_thread_ilocked(proc);
 
-   if (thread)
+   if (thread) {
binder_enqueue_thread_work_ilocked(thread, >work);
-   

Re: [PATCH v2] Binder: add TF_UPDATE_TXN to replace outdated txn

2022-05-19 Thread Greg KH
On Thu, May 19, 2022 at 11:34:54AM -0700, Li Li wrote:
> From: Li Li 
> 
> When the target process is busy, incoming oneway transactions are
> queued in the async_todo list. If the clients continue sending extra
> oneway transactions while the target process is frozen, this queue can
> become too large to accommodate new transactions. That's why binder
> driver introduced ONEWAY_SPAM_DETECTION to detect this situation. It's
> helpful to debug the async binder buffer exhausting issue, but the
> issue itself isn't solved directly.
> 
> In real cases applications are designed to send oneway transactions
> repeatedly, delivering updated inforamtion to the target process.
> Typical examples are Wi-Fi signal strength and some real time sensor
> data. Even if the apps might only care about the lastet information,
> all outdated oneway transactions are still accumulated there until the
> frozen process is thawed later. For this kind of situations, there's
> no existing method to skip those outdated transactions and deliver the
> latest one only.
> 
> This patch introduces a new transaction flag TF_UPDATE_TXN. To use it,
> use apps can set this new flag along with TF_ONE_WAY. When such an
> oneway transaction is to be queued into the async_todo list of a frozen
> process, binder driver will check if any previous pending transactions
> can be superseded by comparing their code, flags and target node. If
> such an outdated pending transaction is found, the latest transaction
> will supersede that outdated one. This effectively prevents the async
> binder buffer running out and saves unnecessary binder read workloads.
> 
> Signed-off-by: Li Li 
> ---
>  drivers/android/binder.c| 85 -
>  drivers/android/binder_trace.h  |  4 ++
>  include/uapi/linux/android/binder.h |  1 +
>  3 files changed, 87 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index f3b639e89dd8..bb968cf2f9ec 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -2594,6 +2594,56 @@ static int binder_fixup_parent(struct list_head 
> *pf_head,
>   return binder_add_fixup(pf_head, buffer_offset, bp->buffer, 0);
>  }
>  
> +/**
> + * binder_can_update_transaction() - Can a txn be superseded by an updated 
> one?
> + * @t1: the pending async txn in the frozen process
> + * @t2: the new async txn to supersede the outdated pending one
> + *
> + * Return:  true if t2 can supersede t1
> + *  false if t2 can not supersede t1
> + */
> +static bool binder_can_update_transaction(struct binder_transaction *t1,
> +   struct binder_transaction *t2)
> +{
> + if ((t1->flags & t2->flags & (TF_ONE_WAY | TF_UPDATE_TXN)) !=
> + (TF_ONE_WAY | TF_UPDATE_TXN) || !t1->to_proc || !t2->to_proc)
> + return false;
> + if (t1->to_proc->tsk == t2->to_proc->tsk && t1->code == t2->code &&
> + t1->flags == t2->flags && t1->buffer->pid == t2->buffer->pid &&
> + t1->buffer->target_node->ptr == t2->buffer->target_node->ptr &&
> + t1->buffer->target_node->cookie == t2->buffer->target_node->cookie)
> + return true;
> + return false;
> +}
> +
> +/**
> + * binder_find_outdated_transaction_ilocked() - Find the outdated transaction
> + * @t:new async transaction
> + * @target_list: list to find outdated transaction
> + *
> + * Return: the outdated transaction if found
> + * NULL if no outdated transacton can be found
> + *
> + * Requires the proc->inner_lock to be held.
> + */
> +static struct binder_transaction *
> +binder_find_outdated_transaction_ilocked(struct binder_transaction *t,
> +  struct list_head *target_list)
> +{
> + struct binder_work *w;
> +
> + list_for_each_entry(w, target_list, entry) {
> + struct binder_transaction *t_queued;
> +
> + if (w->type != BINDER_WORK_TRANSACTION)
> + continue;
> + t_queued = container_of(w, struct binder_transaction, work);
> + if (binder_can_update_transaction(t_queued, t))
> + return t_queued;
> + }
> + return NULL;
> +}
> +
>  /**
>   * binder_proc_transaction() - sends a transaction to a process and wakes it 
> up
>   * @t:   transaction to send
> @@ -2619,6 +2669,7 @@ static int binder_proc_transaction(struct 
> binder_transaction *t,
>   struct binder_node *node = t->buffer->target_node;
>   bool oneway = !!(t->flags & TF_ONE_WAY);
>   bool pending_async = false;
> + struct binder_transaction *t_outdated = NULL;
>  
>   BUG_ON(!node);
>   binder_node_lock(node);
> @@ -2646,12 +2697,24 @@ static int binder_proc_transaction(struct 
> binder_transaction *t,
>   if (!thread && !pending_async)
>   thread = binder_select_thread_ilocked(proc);
>  
> - if (thread)
> + if (thread) {
>   

[PATCH v2] Binder: add TF_UPDATE_TXN to replace outdated txn

2022-05-19 Thread Li Li
From: Li Li 

When the target process is busy, incoming oneway transactions are
queued in the async_todo list. If the clients continue sending extra
oneway transactions while the target process is frozen, this queue can
become too large to accommodate new transactions. That's why binder
driver introduced ONEWAY_SPAM_DETECTION to detect this situation. It's
helpful to debug the async binder buffer exhausting issue, but the
issue itself isn't solved directly.

In real cases applications are designed to send oneway transactions
repeatedly, delivering updated inforamtion to the target process.
Typical examples are Wi-Fi signal strength and some real time sensor
data. Even if the apps might only care about the lastet information,
all outdated oneway transactions are still accumulated there until the
frozen process is thawed later. For this kind of situations, there's
no existing method to skip those outdated transactions and deliver the
latest one only.

This patch introduces a new transaction flag TF_UPDATE_TXN. To use it,
use apps can set this new flag along with TF_ONE_WAY. When such an
oneway transaction is to be queued into the async_todo list of a frozen
process, binder driver will check if any previous pending transactions
can be superseded by comparing their code, flags and target node. If
such an outdated pending transaction is found, the latest transaction
will supersede that outdated one. This effectively prevents the async
binder buffer running out and saves unnecessary binder read workloads.

Signed-off-by: Li Li 
---
 drivers/android/binder.c| 85 -
 drivers/android/binder_trace.h  |  4 ++
 include/uapi/linux/android/binder.h |  1 +
 3 files changed, 87 insertions(+), 3 deletions(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index f3b639e89dd8..bb968cf2f9ec 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2594,6 +2594,56 @@ static int binder_fixup_parent(struct list_head *pf_head,
return binder_add_fixup(pf_head, buffer_offset, bp->buffer, 0);
 }
 
+/**
+ * binder_can_update_transaction() - Can a txn be superseded by an updated one?
+ * @t1: the pending async txn in the frozen process
+ * @t2: the new async txn to supersede the outdated pending one
+ *
+ * Return:  true if t2 can supersede t1
+ *  false if t2 can not supersede t1
+ */
+static bool binder_can_update_transaction(struct binder_transaction *t1,
+ struct binder_transaction *t2)
+{
+   if ((t1->flags & t2->flags & (TF_ONE_WAY | TF_UPDATE_TXN)) !=
+   (TF_ONE_WAY | TF_UPDATE_TXN) || !t1->to_proc || !t2->to_proc)
+   return false;
+   if (t1->to_proc->tsk == t2->to_proc->tsk && t1->code == t2->code &&
+   t1->flags == t2->flags && t1->buffer->pid == t2->buffer->pid &&
+   t1->buffer->target_node->ptr == t2->buffer->target_node->ptr &&
+   t1->buffer->target_node->cookie == t2->buffer->target_node->cookie)
+   return true;
+   return false;
+}
+
+/**
+ * binder_find_outdated_transaction_ilocked() - Find the outdated transaction
+ * @t:  new async transaction
+ * @target_list: list to find outdated transaction
+ *
+ * Return: the outdated transaction if found
+ * NULL if no outdated transacton can be found
+ *
+ * Requires the proc->inner_lock to be held.
+ */
+static struct binder_transaction *
+binder_find_outdated_transaction_ilocked(struct binder_transaction *t,
+struct list_head *target_list)
+{
+   struct binder_work *w;
+
+   list_for_each_entry(w, target_list, entry) {
+   struct binder_transaction *t_queued;
+
+   if (w->type != BINDER_WORK_TRANSACTION)
+   continue;
+   t_queued = container_of(w, struct binder_transaction, work);
+   if (binder_can_update_transaction(t_queued, t))
+   return t_queued;
+   }
+   return NULL;
+}
+
 /**
  * binder_proc_transaction() - sends a transaction to a process and wakes it up
  * @t: transaction to send
@@ -2619,6 +2669,7 @@ static int binder_proc_transaction(struct 
binder_transaction *t,
struct binder_node *node = t->buffer->target_node;
bool oneway = !!(t->flags & TF_ONE_WAY);
bool pending_async = false;
+   struct binder_transaction *t_outdated = NULL;
 
BUG_ON(!node);
binder_node_lock(node);
@@ -2646,12 +2697,24 @@ static int binder_proc_transaction(struct 
binder_transaction *t,
if (!thread && !pending_async)
thread = binder_select_thread_ilocked(proc);
 
-   if (thread)
+   if (thread) {
binder_enqueue_thread_work_ilocked(thread, >work);
-   else if (!pending_async)
+   } else if (!pending_async) {
binder_enqueue_work_ilocked(>work, >todo);
-   else
+   } else {
+   if 

Hello dear good friend, Please be safe, urgent reply needed

2022-05-19 Thread Aleksandr Kovalenko
How are you today? I Hope you are staying safe,
 
I am  Mr Aleksandr Kovalenko from Ukraine, and I am an investor and real estate 
developer. I am looking for a possible tie-up with a business or individual in 
your country so that I can do some investments there as my country's economy 
has been ravaged by the Russian invasion which no one knows when it will come 
to an end.
 
I have Ten Million five Hundred Thousand Dollars.($10,500,000.00) to invest in 
any good business in your country.
 
My family Wife and Daughter have crossed to Poland for refugee, I am still in 
my country Ukraine as they do not allow men to cross the border, we were asked 
to stay back and defend my country,
 
I have move the funds to Poland through a help of a Security Company from 
Ukraine, please I will like you to receive this Fund and invest it in a good 
business and thereafter you take my Wife and Daughter out from Poland to your 
country and take good care of them as am in a war zone which I don't know when 
this war will end, most importantly I want you to take good care of my family.
 
There are no economic activities going on again in Ukraine since the Russian 
invasion started. Looking forward to your sincere reply.
 
Best Regard,
Mr Aleksandr Kovalenko
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v1] Binder: add TF_UPDATE_TXN

2022-05-19 Thread Li Li
On Thu, May 19, 2022 at 8:50 AM Greg KH  wrote:
>
> On Wed, May 18, 2022 at 05:06:23PM -0700, Li Li wrote:
> > From: Li Li 
>
> Note, your subject does not say what TF_UPDATE_TXN is, so it's a bit
> hard to determine what is happening here.  Can you clean that up a bit
> and sumarize what this new addition does?

Sure, I'll add a brief summary there.

>
> >
> > When the target process is busy, incoming oneway transactions are
> > queued in the async_todo list. If the clients continue sending extra
> > oneway transactions while the target process is frozen, this queue can
> > become too large to accommodate new transactions. That's why binder
> > driver introduced ONEWAY_SPAM_DETECTION to detect this situation. It's
> > helpful to debug the async binder buffer exhausting issue, but the
> > issue itself isn't solved directly.
> >
> > In real cases applications are designed to send oneway transactions
> > repeatedly, delivering updated inforamtion to the target process.
> > Typical examples are Wi-Fi signal strength and some real time sensor
> > data. Even if the apps might only care about the lastet information,
> > all outdated oneway transactions are still accumulated there until the
> > frozen process is thawed later. For this kind of situations, there's
> > no existing method to skip those outdated transactions and deliver the
> > latest one only.
> >
> > This patch introduces a new transaction flag TF_UPDATE_TXN. To use it,
> > use apps can set this new flag along with TF_ONE_WAY. When such an
> > oneway transaction is to be queued into the async_todo list of a frozen
> > process, binder driver will check if any previous pending transactions
> > can be superseded by comparing their code, flags and target node. If
> > such an outdated pending transaction is found, the latest transaction
> > will supersede that outdated one. This effectively prevents the async
> > binder buffer running out and saves unnecessary binder read workloads.
> >
> > Signed-off-by: Li Li 
> > ---
> >  drivers/android/binder.c| 90 -
> >  drivers/android/binder_trace.h  |  4 ++
> >  include/uapi/linux/android/binder.h |  1 +
>
> How was this tested?

Old kernel: without this TF_UPDATE_TXN patch
New kernel: with this TF_UPDATE_TXN patch
Old apps: without setting TF_UPDATE_TXN
New apps: if (flags & TF_ONE_WAY) flags |= TF_UPDATE_TXN;

1. Compatibility: New kernel + Old apps, to verify the original
behavior doesn't change;

2. Compatibility: Old kernel + New apps, to verify the original
behavior doesn't change;

3. Unit test: New kernel + New apps, to verify the outdated oneway
binder transaction is actually superseded by the latest one (by
enabling BINDER_DEBUG logs);

4. Stress test: New kernel + New apps sending oneway binder
transactions repeatedly, to verify the size of the available async
binder buffer over time, and if the transactions fail as before
(due to async buffer running out).

>
> >  3 files changed, 92 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> > index f3b639e89dd8..153486a32d69 100644
> > --- a/drivers/android/binder.c
> > +++ b/drivers/android/binder.c
> > @@ -2594,6 +2594,60 @@ static int binder_fixup_parent(struct list_head 
> > *pf_head,
> >   return binder_add_fixup(pf_head, buffer_offset, bp->buffer, 0);
> >  }
> >
> > +/**
> > + * binder_can_update_transaction() - Can a txn be superseded by an updated 
> > one?
> > + * @t1: the pending async txn in the frozen process
> > + * @t2: the new async txn to supersede the outdated pending one
> > + *
> > + * Return:  true if t2 can supersede t1
> > + *  false if t2 can not supersede t1
> > + */
> > +static bool binder_can_update_transaction(struct binder_transaction *t1,
> > +   struct binder_transaction *t2)
> > +{
> > + if ((t1->flags & t2->flags & (TF_ONE_WAY | TF_UPDATE_TXN))
> > + != (TF_ONE_WAY | TF_UPDATE_TXN)
> > + || t1->to_proc == NULL || t2->to_proc == NULL)
> > + return false;
> > + if (t1->to_proc->tsk == t2->to_proc->tsk && t1->code == t2->code
> > + && t1->flags == t2->flags
> > + && t1->buffer->pid == t2->buffer->pid
> > + && t1->buffer->target_node->ptr
> > + == t2->buffer->target_node->ptr
> > + && t1->buffer->target_node->cookie
> > + == t2->buffer->target_node->cookie)
>
> Did checkpatch pass this?  Please always use --strict and fix up all the
> issues that it reports as this is not a normal kernel coding style,
> sorry.

It passed checkpatch but --strict does suggest I adjust the logical ops.
I'll update it in v2. Thanks for reminding me about using --strict.

Thanks,
Li
___
devel mailing list
de...@linuxdriverproject.org

Re: [PATCH v1] Binder: add TF_UPDATE_TXN

2022-05-19 Thread Greg KH
On Wed, May 18, 2022 at 05:06:23PM -0700, Li Li wrote:
> From: Li Li 

Note, your subject does not say what TF_UPDATE_TXN is, so it's a bit
hard to determine what is happening here.  Can you clean that up a bit
and sumarize what this new addition does?

> 
> When the target process is busy, incoming oneway transactions are
> queued in the async_todo list. If the clients continue sending extra
> oneway transactions while the target process is frozen, this queue can
> become too large to accommodate new transactions. That's why binder
> driver introduced ONEWAY_SPAM_DETECTION to detect this situation. It's
> helpful to debug the async binder buffer exhausting issue, but the
> issue itself isn't solved directly.
> 
> In real cases applications are designed to send oneway transactions
> repeatedly, delivering updated inforamtion to the target process.
> Typical examples are Wi-Fi signal strength and some real time sensor
> data. Even if the apps might only care about the lastet information,
> all outdated oneway transactions are still accumulated there until the
> frozen process is thawed later. For this kind of situations, there's
> no existing method to skip those outdated transactions and deliver the
> latest one only.
> 
> This patch introduces a new transaction flag TF_UPDATE_TXN. To use it,
> use apps can set this new flag along with TF_ONE_WAY. When such an
> oneway transaction is to be queued into the async_todo list of a frozen
> process, binder driver will check if any previous pending transactions
> can be superseded by comparing their code, flags and target node. If
> such an outdated pending transaction is found, the latest transaction
> will supersede that outdated one. This effectively prevents the async
> binder buffer running out and saves unnecessary binder read workloads.
> 
> Signed-off-by: Li Li 
> ---
>  drivers/android/binder.c| 90 -
>  drivers/android/binder_trace.h  |  4 ++
>  include/uapi/linux/android/binder.h |  1 +

How was this tested? 

>  3 files changed, 92 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index f3b639e89dd8..153486a32d69 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -2594,6 +2594,60 @@ static int binder_fixup_parent(struct list_head 
> *pf_head,
>   return binder_add_fixup(pf_head, buffer_offset, bp->buffer, 0);
>  }
>  
> +/**
> + * binder_can_update_transaction() - Can a txn be superseded by an updated 
> one?
> + * @t1: the pending async txn in the frozen process
> + * @t2: the new async txn to supersede the outdated pending one
> + *
> + * Return:  true if t2 can supersede t1
> + *  false if t2 can not supersede t1
> + */
> +static bool binder_can_update_transaction(struct binder_transaction *t1,
> +   struct binder_transaction *t2)
> +{
> + if ((t1->flags & t2->flags & (TF_ONE_WAY | TF_UPDATE_TXN))
> + != (TF_ONE_WAY | TF_UPDATE_TXN)
> + || t1->to_proc == NULL || t2->to_proc == NULL)
> + return false;
> + if (t1->to_proc->tsk == t2->to_proc->tsk && t1->code == t2->code
> + && t1->flags == t2->flags
> + && t1->buffer->pid == t2->buffer->pid
> + && t1->buffer->target_node->ptr
> + == t2->buffer->target_node->ptr
> + && t1->buffer->target_node->cookie
> + == t2->buffer->target_node->cookie)

Did checkpatch pass this?  Please always use --strict and fix up all the
issues that it reports as this is not a normal kernel coding style,
sorry.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Proposal

2022-05-19 Thread mohammedsaeed
Salam alaikum,

I am the investment officer of UAE based investment company who 
are ready to fund projects outside UAE, in the form of debt 
finance. We grant loan to both Corporate and private entities at 
a low interest rate of 2% ROI per annum. The terms are very 
flexible and interesting.Kindly revert back if you have projects 
that needs funding for further discussion and negotiation.

Thanks

investment officer.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel