Merge 4.9.69 into android-4.9
Changes in 4.9.69 usb: gadget: udc: renesas_usb3: fix number of the pipes can: ti_hecc: Fix napi poll return value for repoll can: kvaser_usb: free buf in error paths can: kvaser_usb: Fix comparison bug in kvaser_usb_read_bulk_callback() can: kvaser_usb: ratelimit errors if incomplete messages are received can: kvaser_usb: cancel urb on -EPIPE and -EPROTO can: ems_usb: cancel urb on -EPIPE and -EPROTO can: esd_usb2: cancel urb on -EPIPE and -EPROTO can: usb_8dev: cancel urb on -EPIPE and -EPROTO virtio: release virtio index when fail to device_register hv: kvp: Avoid reading past allocated blocks from KVP file isa: Prevent NULL dereference in isa_bus driver callbacks scsi: dma-mapping: always provide dma_get_cache_alignment scsi: use dma_get_cache_alignment() as minimum DMA alignment scsi: libsas: align sata_device's rps_resp on a cacheline efi: Move some sysfs files to be read-only by root efi/esrt: Use memunmap() instead of kfree() to free the remapping ASN.1: fix out-of-bounds read when parsing indefinite length item ASN.1: check for error from ASN1_OP_END__ACT actions KEYS: add missing permission check for request_key() destination X.509: reject invalid BIT STRING for subjectPublicKey X.509: fix comparisons of ->pkey_algo x86/PCI: Make broadcom_postcore_init() check acpi_disabled KVM: x86: fix APIC page invalidation btrfs: fix missing error return in btrfs_drop_snapshot ALSA: pcm: prevent UAF in snd_pcm_info ALSA: seq: Remove spurious WARN_ON() at timer check ALSA: usb-audio: Fix out-of-bound error ALSA: usb-audio: Add check return value for usb_string() iommu/vt-d: Fix scatterlist offset handling smp/hotplug: Move step CPUHP_AP_SMPCFD_DYING to the correct place s390: fix compat system call table KVM: s390: Fix skey emulation permission check powerpc/64s: Initialize ISAv3 MMU registers before setting partition table brcmfmac: change driver unbind order of the sdio function devices kdb: Fix handling of kallsyms_symbol_next() return value drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU media: dvb: i2c transfers over usb cannot be done from stack arm64: KVM: fix VTTBR_BADDR_MASK BUG_ON off-by-one arm: KVM: Fix VTTBR_BADDR_MASK BUG_ON off-by-one KVM: VMX: remove I/O port 0x80 bypass on Intel hosts KVM: arm/arm64: Fix broken GICH_ELRSR big endian conversion KVM: arm/arm64: vgic-irqfd: Fix MSI entry allocation KVM: arm/arm64: vgic-its: Check result of allocation before use arm64: fpsimd: Prevent registers leaking from dead tasks bus: arm-cci: Fix use of smp_processor_id() in preemptible context bus: arm-ccn: Check memory allocation failure bus: arm-ccn: Fix use of smp_processor_id() in preemptible context bus: arm-ccn: fix module unloading Error: Removing state 147 which has instances left. crypto: talitos - fix AEAD test failures crypto: talitos - fix memory corruption on SEC2 crypto: talitos - fix setkey to check key weakness crypto: talitos - fix AEAD for sha224 on non sha224 capable chips crypto: talitos - fix use of sg_link_tbl_len crypto: talitos - fix ctr-aes-talitos usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT ARM: BUG if jumping to usermode address in kernel mode ARM: avoid faulting on qemu thp: reduce indentation level in change_huge_pmd() thp: fix MADV_DONTNEED vs. numa balancing race mm: drop unused pmdp_huge_get_and_clear_notify() Revert "drm/armada: Fix compile fail" Revert "spi: SPI_FSL_DSPI should depend on HAS_DMA" ARM: 8657/1: uaccess: consistently check object sizes vti6: Don't report path MTU below IPV6_MIN_MTU. ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure x86/selftests: Add clobbers for int80 on x86_64 x86/platform/uv/BAU: Fix HUB errors by remove initial write to sw-ack register sched/fair: Make select_idle_cpu() more aggressive x86/hpet: Prevent might sleep splat on resume powerpc/64: Invalidate process table caching after setting process table selftest/powerpc: Fix false failures for skipped tests powerpc: Fix compiling a BE kernel with a powerpc64le toolchain lirc: fix dead lock between open and wakeup_filter module: set __jump_table alignment to 8 powerpc/64: Fix checksum folding in csum_add() ARM: OMAP2+: Fix device node reference counts ARM: OMAP2+: Release device node after it is no longer needed. ASoC: rcar: avoid SSI_MODEx settings for SSI8 gpio: altera: Use handle_level_irq when configured as a level_high HID: chicony: Add support for another ASUS Zen AiO keyboard usb: gadget: configs: plug memory leak USB: gadgetfs: Fix a potential memory leak in 'dev_config()' usb: dwc3: gadget: Fix system suspend/resume on TI platforms usb: gadget: pxa27x: Test for a valid argument pointer usb: gadget: udc: net2280: Fix tmp reusage in net2280 driver kvm: nVMX: VMCLEAR should not cause the vCPU to shut down libata: drop WARN from protocol error in ata_sff_qc_issue() workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq scsi: qla2xxx: Fix ql_dump_buffer scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters irqchip/crossbar: Fix incorrect type of register size KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset arm: KVM: Survive unknown traps from guests arm64: KVM: Survive unknown traps from guests KVM: arm/arm64: VGIC: Fix command handling while ITS being disabled spi_ks8995: fix "BUG: key accdaa28 not in .data!" spi_ks8995: regs_size incorrect for some devices bnx2x: prevent crash when accessing PTP with interface down bnx2x: fix possible overrun of VFPF multicast addresses array bnx2x: fix detection of VLAN filtering feature for VF bnx2x: do not rollback VF MAC/VLAN filters we did not configure rds: tcp: Sequence teardown of listen and acceptor sockets to avoid races ibmvnic: Fix overflowing firmware/hardware TX queue ibmvnic: Allocate number of rx/tx buffers agreed on by firmware ipv6: reorder icmpv6_init() and ip6_mr_init() crypto: s5p-sss - Fix completing crypto request in IRQ handler i2c: riic: fix restart condition blk-mq: initialize mq kobjects in blk_mq_init_allocated_queue() zram: set physical queue limits to avoid array out of bounds accesses netfilter: don't track fragmented packets axonram: Fix gendisk handling drm/amd/amdgpu: fix console deadlock if late init failed powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro EDAC, i5000, i5400: Fix definition of NRECMEMB register kbuild: pkg: use --transform option to prefix paths in tar coccinelle: fix parallel build with CHECK=scripts/coccicheck x86/mpx/selftests: Fix up weird arrays mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl() gre6: use log_ecn_error module parameter in ip6_tnl_rcv() route: also update fnhe_genid when updating a route cache route: update fnhe_expires for redirect when the fnhe exists drivers/rapidio/devices/rio_mport_cdev.c: fix resource leak in error handling path in 'rio_dma_transfer()' lib/genalloc.c: make the avail variable an atomic_long_t dynamic-debug-howto: fix optional/omitted ending line number to be LARGE instead of 0 NFS: Fix a typo in nfs_rename() sunrpc: Fix rpc_task_begin trace point xfs: fix forgotten rcu read unlock when skipping inode reclaim dt-bindings: usb: fix reg-property port-number range block: wake up all tasks blocked in get_request() sparc64/mm: set fields in deferred pages zsmalloc: calling zs_map_object() from irq is a bug sctp: do not free asoc when it is already dead in sctp_sendmsg sctp: use the right sk after waking up from wait_buf sleep bpf: fix lockdep splat clk: uniphier: fix DAPLL2 clock rate of Pro5 atm: horizon: Fix irq release error jump_label: Invoke jump_label_test() via early_initcall() xfrm: Copy policy family in clone_policy IB/mlx4: Increase maximal message size under UD QP IB/mlx5: Assign send CQ and recv CQ of UMR QP afs: Connect up the CB.ProbeUuid Linux 4.9.69 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
+14
-56
@@ -193,11 +193,14 @@ static void kvp_update_mem_state(int pool)
|
||||
for (;;) {
|
||||
readp = &record[records_read];
|
||||
records_read += fread(readp, sizeof(struct kvp_record),
|
||||
ENTRIES_PER_BLOCK * num_blocks,
|
||||
filep);
|
||||
ENTRIES_PER_BLOCK * num_blocks - records_read,
|
||||
filep);
|
||||
|
||||
if (ferror(filep)) {
|
||||
syslog(LOG_ERR, "Failed to read file, pool: %d", pool);
|
||||
syslog(LOG_ERR,
|
||||
"Failed to read file, pool: %d; error: %d %s",
|
||||
pool, errno, strerror(errno));
|
||||
kvp_release_lock(pool);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -210,6 +213,7 @@ static void kvp_update_mem_state(int pool)
|
||||
|
||||
if (record == NULL) {
|
||||
syslog(LOG_ERR, "malloc failed");
|
||||
kvp_release_lock(pool);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
continue;
|
||||
@@ -224,15 +228,11 @@ static void kvp_update_mem_state(int pool)
|
||||
fclose(filep);
|
||||
kvp_release_lock(pool);
|
||||
}
|
||||
|
||||
static int kvp_file_init(void)
|
||||
{
|
||||
int fd;
|
||||
FILE *filep;
|
||||
size_t records_read;
|
||||
char *fname;
|
||||
struct kvp_record *record;
|
||||
struct kvp_record *readp;
|
||||
int num_blocks;
|
||||
int i;
|
||||
int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK;
|
||||
|
||||
@@ -246,61 +246,19 @@ static int kvp_file_init(void)
|
||||
|
||||
for (i = 0; i < KVP_POOL_COUNT; i++) {
|
||||
fname = kvp_file_info[i].fname;
|
||||
records_read = 0;
|
||||
num_blocks = 1;
|
||||
sprintf(fname, "%s/.kvp_pool_%d", KVP_CONFIG_LOC, i);
|
||||
fd = open(fname, O_RDWR | O_CREAT | O_CLOEXEC, 0644 /* rw-r--r-- */);
|
||||
|
||||
if (fd == -1)
|
||||
return 1;
|
||||
|
||||
|
||||
filep = fopen(fname, "re");
|
||||
if (!filep) {
|
||||
close(fd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
record = malloc(alloc_unit * num_blocks);
|
||||
if (record == NULL) {
|
||||
fclose(filep);
|
||||
close(fd);
|
||||
return 1;
|
||||
}
|
||||
for (;;) {
|
||||
readp = &record[records_read];
|
||||
records_read += fread(readp, sizeof(struct kvp_record),
|
||||
ENTRIES_PER_BLOCK,
|
||||
filep);
|
||||
|
||||
if (ferror(filep)) {
|
||||
syslog(LOG_ERR, "Failed to read file, pool: %d",
|
||||
i);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!feof(filep)) {
|
||||
/*
|
||||
* We have more data to read.
|
||||
*/
|
||||
num_blocks++;
|
||||
record = realloc(record, alloc_unit *
|
||||
num_blocks);
|
||||
if (record == NULL) {
|
||||
fclose(filep);
|
||||
close(fd);
|
||||
return 1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
kvp_file_info[i].fd = fd;
|
||||
kvp_file_info[i].num_blocks = num_blocks;
|
||||
kvp_file_info[i].records = record;
|
||||
kvp_file_info[i].num_records = records_read;
|
||||
fclose(filep);
|
||||
|
||||
kvp_file_info[i].num_blocks = 1;
|
||||
kvp_file_info[i].records = malloc(alloc_unit);
|
||||
if (kvp_file_info[i].records == NULL)
|
||||
return 1;
|
||||
kvp_file_info[i].num_records = 0;
|
||||
kvp_update_mem_state(i);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -114,9 +114,11 @@ int test_harness(int (test_function)(void), char *name)
|
||||
|
||||
rc = run_test(test_function, name);
|
||||
|
||||
if (rc == MAGIC_SKIP_RETURN_VALUE)
|
||||
if (rc == MAGIC_SKIP_RETURN_VALUE) {
|
||||
test_skip(name);
|
||||
else
|
||||
/* so that skipped test is not marked as failed */
|
||||
rc = 0;
|
||||
} else
|
||||
test_finish(name, rc);
|
||||
|
||||
return rc;
|
||||
|
||||
@@ -245,7 +245,7 @@ void do_unexpected_base(void)
|
||||
long ret;
|
||||
asm volatile ("int $0x80"
|
||||
: "=a" (ret) : "a" (243), "b" (low_desc)
|
||||
: "flags");
|
||||
: "r8", "r9", "r10", "r11");
|
||||
memcpy(&desc, low_desc, sizeof(desc));
|
||||
munmap(low_desc, sizeof(desc));
|
||||
|
||||
|
||||
@@ -45,6 +45,12 @@
|
||||
#define AR_DB (1 << 22)
|
||||
#define AR_G (1 << 23)
|
||||
|
||||
#ifdef __x86_64__
|
||||
# define INT80_CLOBBERS "r8", "r9", "r10", "r11"
|
||||
#else
|
||||
# define INT80_CLOBBERS
|
||||
#endif
|
||||
|
||||
static int nerrs;
|
||||
|
||||
/* Points to an array of 1024 ints, each holding its own index. */
|
||||
@@ -649,7 +655,7 @@ static int invoke_set_thread_area(void)
|
||||
asm volatile ("int $0x80"
|
||||
: "=a" (ret), "+m" (low_user_desc) :
|
||||
"a" (243), "b" (low_user_desc)
|
||||
: "flags");
|
||||
: INT80_CLOBBERS);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -718,7 +724,7 @@ static void test_gdt_invalidation(void)
|
||||
"+a" (eax)
|
||||
: "m" (low_user_desc_clear),
|
||||
[arg1] "r" ((unsigned int)(unsigned long)low_user_desc_clear)
|
||||
: "flags");
|
||||
: INT80_CLOBBERS);
|
||||
|
||||
if (sel != 0) {
|
||||
result = "FAIL";
|
||||
@@ -749,7 +755,7 @@ static void test_gdt_invalidation(void)
|
||||
"+a" (eax)
|
||||
: "m" (low_user_desc_clear),
|
||||
[arg1] "r" ((unsigned int)(unsigned long)low_user_desc_clear)
|
||||
: "flags");
|
||||
: INT80_CLOBBERS);
|
||||
|
||||
if (sel != 0) {
|
||||
result = "FAIL";
|
||||
@@ -782,7 +788,7 @@ static void test_gdt_invalidation(void)
|
||||
"+a" (eax)
|
||||
: "m" (low_user_desc_clear),
|
||||
[arg1] "r" ((unsigned int)(unsigned long)low_user_desc_clear)
|
||||
: "flags");
|
||||
: INT80_CLOBBERS);
|
||||
|
||||
#ifdef __x86_64__
|
||||
syscall(SYS_arch_prctl, ARCH_GET_FS, &new_base);
|
||||
@@ -835,7 +841,7 @@ static void test_gdt_invalidation(void)
|
||||
"+a" (eax)
|
||||
: "m" (low_user_desc_clear),
|
||||
[arg1] "r" ((unsigned int)(unsigned long)low_user_desc_clear)
|
||||
: "flags");
|
||||
: INT80_CLOBBERS);
|
||||
|
||||
#ifdef __x86_64__
|
||||
syscall(SYS_arch_prctl, ARCH_GET_GS, &new_base);
|
||||
|
||||
@@ -51,14 +51,14 @@
|
||||
struct mpx_bd_entry {
|
||||
union {
|
||||
char x[MPX_BOUNDS_DIR_ENTRY_SIZE_BYTES];
|
||||
void *contents[1];
|
||||
void *contents[0];
|
||||
};
|
||||
} __attribute__((packed));
|
||||
|
||||
struct mpx_bt_entry {
|
||||
union {
|
||||
char x[MPX_BOUNDS_TABLE_ENTRY_SIZE_BYTES];
|
||||
unsigned long contents[1];
|
||||
unsigned long contents[0];
|
||||
};
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@ static void do_full_int80(struct syscall_args32 *args)
|
||||
asm volatile ("int $0x80"
|
||||
: "+a" (args->nr),
|
||||
"+b" (args->arg0), "+c" (args->arg1), "+d" (args->arg2),
|
||||
"+S" (args->arg3), "+D" (args->arg4), "+r" (bp));
|
||||
"+S" (args->arg3), "+D" (args->arg4), "+r" (bp)
|
||||
: : "r8", "r9", "r10", "r11");
|
||||
args->arg5 = bp;
|
||||
#else
|
||||
sys32_helper(args, int80_and_ret);
|
||||
|
||||
@@ -56,9 +56,11 @@ static volatile sig_atomic_t sig_traps;
|
||||
#ifdef __x86_64__
|
||||
# define REG_IP REG_RIP
|
||||
# define WIDTH "q"
|
||||
# define INT80_CLOBBERS "r8", "r9", "r10", "r11"
|
||||
#else
|
||||
# define REG_IP REG_EIP
|
||||
# define WIDTH "l"
|
||||
# define INT80_CLOBBERS
|
||||
#endif
|
||||
|
||||
static unsigned long get_eflags(void)
|
||||
@@ -140,7 +142,8 @@ int main()
|
||||
|
||||
printf("[RUN]\tSet TF and check int80\n");
|
||||
set_eflags(get_eflags() | X86_EFLAGS_TF);
|
||||
asm volatile ("int $0x80" : "=a" (tmp) : "a" (SYS_getpid));
|
||||
asm volatile ("int $0x80" : "=a" (tmp) : "a" (SYS_getpid)
|
||||
: INT80_CLOBBERS);
|
||||
check_result();
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user