Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16a567b6 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge branch 'android11-5.4' into branch 'android11-5.4-lts'



Merge in the latest changes from 'android11-5.4' into the LTS branch so
we have those changes in here as well.  This includes the following
commits:

* b0b1d6d1 UPSTREAM: net: tls, update curr on splice as well
* 78f2cf25 Reapply "perf: Fix perf_event_validate_size()"
* 087b4792 UPSTREAM: ida: Fix crash in ida_free when the bitmap is empty
* 73bfa95e UPSTREAM: netfilter: nf_tables: Reject tables of unsupported family
* a34cc1dc Reapply "perf: Disallow mis-matched inherited group reads"
* aea71020 UPSTREAM: ath10k: Get rid of "per_ce_irq" hw param
* 89945968 UPSTREAM: ath10k: Keep track of which interrupts fired, don't poll them
* d9f1b99f UPSTREAM: ath10k: Add interrupt summary based CE processing
* 0226ac13 UPSTREAM: ath10k: Wait until copy complete is actually done before completing
* a7a2a20f FROMGIT: clk: qcom: gcc-sdm845: Add soft dependency on rpmhpd
* 80118b74 Merge tag 'android11-5.4.265_r00' into branch 'android11-5.4'
* 70db018a UPSTREAM: ipv4: igmp: fix refcnt uaf issue when receiving igmp query packet
* 5ae6be03 ANDROID: Snapshot Mainline's version of checkpatch.pl
* f5180407 UPSTREAM: nvmet-tcp: Fix a possible UAF in queue intialization setup
* 0581932d UPSTREAM: nvmet-tcp: move send/recv error handling in the send/recv methods instead of call-sites
* 81334f26 UPSTREAM: netfilter: nf_tables: remove busy mark and gc batch API
* bdb31e6e UPSTREAM: netfilter: nft_set_hash: mark set element as dead when deleting from packet path
* a65e87c1 UPSTREAM: netfilter: nf_tables: adapt set backend to use GC transaction API
* adc9cb06 UPSTREAM: netfilter: nf_tables: GC transaction API to avoid race with control plane
* 4ce6a733 UPSTREAM: netfilter: nft_set_rbtree: fix overlap expiration walk
* 1b7330db UPSTREAM: netfilter: nft_set_rbtree: fix null deref on element insertion
* f896aebc UPSTREAM: netfilter: nft_set_rbtree: Switch to node list walk for overlap detection
* 3a298023 UPSTREAM: netfilter: nf_tables: drop map element references from preparation phase
* 28ca0533 UPSTREAM: netfilter: nftables: rename set element data activation/deactivation functions
* e85a3e2c ANDROID: ABI: Update allowed list for QCOM
* 42ae17e6 BACKPORT: ALSA: compress: Allow pause and resume during draining
* a8427cae UPSTREAM: netfilter: nf_tables: pass context to nft_set_destroy()
* 1ab45006 UPSTREAM: netfilter: nf_tables: don't skip expired elements during walk
* 30cf530f ANDROID: GKI: db845c: Update symbols list and ABI on rpmsg_register_device_override
* eb1843e8 ANDROID: Use GKI Dr. No OWNERS file
* bbbaa681 ANDROID: Remove android/OWNERs file
* b7ba0d93 FROMGIT: Input: uinput - allow injecting event times

Change-Id: I147a09fc7cf8a55fb05e4ecec26028e59c8802ea
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parents b70f9975 b0b1d6d1
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
# include OWNERS from the authoritative android-mainline branch
include kernel/common:android-mainline:/OWNERS
set noparent

# GKI Dr. No Enforcement is active on this branch. Approval of one of the Dr.
# No reviewers is required following a regular CodeReview+2 vote of a code
# reviewer.
#
# See the GKI release documentation (go/gki-dr-no) for further details.
#
# The expanded list of reviewers can be found at:
# https://android.googlesource.com/kernel/common/+/android-mainline/OWNERS_DrNo

include kernel/common:android-mainline:/OWNERS_DrNo

android/OWNERS

deleted100644 → 0
+0 −12
Original line number Diff line number Diff line
# If we ever add another OWNERS above this directory, it's likely to be
# more permissive, so don't inherit from it
set noparent
adelva@google.com
maennich@google.com
saravanak@google.com
sspatil@google.com
tkjos@google.com
willmcvicker@google.com
# Downstream boards maintained directly in this manifest branch
per-file abi_gki_aarch64_cuttlefish = adelva@google.com, rammuthiah@google.com
per-file abi_gki_aarch64_goldfish = rkir@google.com
+102602 −106055

File changed.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -2251,6 +2251,7 @@
  snd_card_free_when_closed
  snd_card_new
  snd_card_register
  snd_compr_use_pause_in_draining
  snd_ctl_add
  snd_ctl_boolean_mono_info
  snd_ctl_enum_info
+34 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#define UINPUT_NAME		"uinput"
#define UINPUT_BUFFER_SIZE	16
#define UINPUT_NUM_REQUESTS	16
#define UINPUT_TIMESTAMP_ALLOWED_OFFSET_SECS 10

enum uinput_state { UIST_NEW_DEVICE, UIST_SETUP_COMPLETE, UIST_CREATED };

@@ -569,11 +570,40 @@ static int uinput_setup_device_legacy(struct uinput_device *udev,
	return retval;
}

/*
 * Returns true if the given timestamp is valid (i.e., if all the following
 * conditions are satisfied), false otherwise.
 * 1) given timestamp is positive
 * 2) it's within the allowed offset before the current time
 * 3) it's not in the future
 */
static bool is_valid_timestamp(const ktime_t timestamp)
{
	ktime_t zero_time;
	ktime_t current_time;
	ktime_t min_time;
	ktime_t offset;

	zero_time = ktime_set(0, 0);
	if (ktime_compare(zero_time, timestamp) >= 0)
		return false;

	current_time = ktime_get();
	offset = ktime_set(UINPUT_TIMESTAMP_ALLOWED_OFFSET_SECS, 0);
	min_time = ktime_sub(current_time, offset);

	if (ktime_after(min_time, timestamp) || ktime_after(timestamp, current_time))
		return false;

	return true;
}

static ssize_t uinput_inject_events(struct uinput_device *udev,
				    const char __user *buffer, size_t count)
{
	struct input_event ev;
	size_t bytes = 0;
	ktime_t timestamp;

	if (count != 0 && count < input_event_size())
		return -EINVAL;
@@ -588,6 +618,10 @@ static ssize_t uinput_inject_events(struct uinput_device *udev,
		if (input_event_from_user(buffer + bytes, &ev))
			return -EFAULT;

		timestamp = ktime_set(ev.input_event_sec, ev.input_event_usec * NSEC_PER_USEC);
		if (is_valid_timestamp(timestamp))
			input_set_timestamp(udev->dev, timestamp);

		input_event(udev->dev, ev.type, ev.code, ev.value);
		bytes += input_event_size();
		cond_resched();
Loading