This is the 4.19.152 stable release

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl+Kp6UACgkQONu9yGCS
 aT7aQxAAgsJSnontvgETbOzYuZl46DJlJtp+Ao9ex9zP/ptTH0SytDVL2zum+FBT
 MMwrrDKHaDzHXqfLChGGswo48XqDwAjGhPWmcYWw99PjcCHk4xYlilw3kC6CSRZq
 7k1c8DBX1zBkheBbz3GJYQ+U1B4bASVrpBKLxccXwf4if5gDj/36zkZs/YxEwR/l
 6PQa57klYPXs269E5n28vMZCVs+sZ2DLZ5odnf1AaGZBYYYi54mNTAtQ/RoAKtcN
 bDfmvq+4eVDl34feLwEZLQzWcYi51h6rXvdju4CVih99JDHv42gz2BHDXcp4C86Z
 kYI0BzCIiww6/QcVGL4sb/VdVFo+NwSqbHhyIFWRKej2N4l6djdba1RJ4m1tUb6o
 Ta0tARqlSGmk1SIWVfgIKhvXX8TMp6pYtNsTSsn7EHsztGIYtuY6yU2Ql/YGg7rM
 fJ0tZa8rswRgD2sl9JTTlNmgTRQhv9/3h6xKaMzpYl7m85fvrXKXnJ7NyxLr2iUK
 /h7jPh4QXY9BaNus4qKKLPRcX0FC0X+QOFexTuqAdnR5iD4wrIpgICSxRqL5ScAY
 kB9kjmB8fNLwyolbkTXd7TYQHECsjQ56tCAiXl4zhgjDyr5Ae6gfU7HN8bC1y74d
 IZM2V4Jbb2o7JpF267KfHUhGqEr9DLZSLini8u5DiEPtE+grpR0=
 =zOUG
 -----END PGP SIGNATURE-----

Merge 4.19.152 into android-4.19-stable

Changes in 4.19.152
	perf cs-etm: Move definition of 'traceid_list' global variable from header file
	ARM: 8858/1: vdso: use $(LD) instead of $(CC) to link VDSO
	ARM: 8939/1: kbuild: use correct nm executable
	ARM: 8867/1: vdso: pass --be8 to linker if necessary
	Bluetooth: A2MP: Fix not initializing all members
	Bluetooth: L2CAP: Fix calling sk_filter on non-socket based channel
	Bluetooth: MGMT: Fix not checking if BT_HS is enabled
	Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
	Bluetooth: Fix update of connection state in `hci_encrypt_cfm`
	Bluetooth: Disconnect if E0 is used for Level 4
	media: usbtv: Fix refcounting mixup
	USB: serial: option: add Cellient MPL200 card
	USB: serial: option: Add Telit FT980-KS composition
	staging: comedi: check validity of wMaxPacketSize of usb endpoints found
	USB: serial: pl2303: add device-id for HP GC device
	USB: serial: ftdi_sio: add support for FreeCalypso JTAG+UART adapters
	reiserfs: Initialize inode keys properly
	reiserfs: Fix oops during mount
	drivers/net/ethernet/marvell/mvmdio.c: Fix non OF case
	crypto: bcm - Verify GCM/CCM key length in setkey
	crypto: qat - check cipher length for aead AES-CBC-HMAC-SHA
	Linux 4.19.152

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I220620fba6634de064782836b2738a9651edd299
This commit is contained in:
Greg Kroah-Hartman 2020-10-17 10:26:40 +02:00
commit 13abe23636
25 changed files with 185 additions and 81 deletions

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
VERSION = 4 VERSION = 4
PATCHLEVEL = 19 PATCHLEVEL = 19
SUBLEVEL = 151 SUBLEVEL = 152
EXTRAVERSION = EXTRAVERSION =
NAME = "People's Front" NAME = "People's Front"

View file

@ -120,7 +120,7 @@ ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin -I$(obj)
asflags-y := -DZIMAGE asflags-y := -DZIMAGE
# Supply kernel BSS size to the decompressor via a linker symbol. # Supply kernel BSS size to the decompressor via a linker symbol.
KBSS_SZ = $(shell echo $$(($$($(CROSS_COMPILE)nm $(obj)/../../../../vmlinux | \ KBSS_SZ = $(shell echo $$(($$($(NM) $(obj)/../../../../vmlinux | \
sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \ sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \
-e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) ) -e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) )
LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ) LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
@ -166,7 +166,7 @@ $(obj)/bswapsdi2.S: $(srctree)/arch/$(SRCARCH)/lib/bswapsdi2.S
# The .data section is already discarded by the linker script so no need # The .data section is already discarded by the linker script so no need
# to bother about it here. # to bother about it here.
check_for_bad_syms = \ check_for_bad_syms = \
bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \ bad_syms=$$($(NM) $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
[ -z "$$bad_syms" ] || \ [ -z "$$bad_syms" ] || \
( echo "following symbols must have non local/private scope:" >&2; \ ( echo "following symbols must have non local/private scope:" >&2; \
echo "$$bad_syms" >&2; rm -f $@; false ) echo "$$bad_syms" >&2; rm -f $@; false )

View file

@ -10,12 +10,13 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
ccflags-y += -DDISABLE_BRANCH_PROFILING ccflags-y += -DDISABLE_BRANCH_PROFILING
VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1 ldflags-$(CONFIG_CPU_ENDIAN_BE8) := --be8
VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
VDSO_LDFLAGS += -nostdlib -shared -z max-page-size=4096 -z common-page-size=4096 \
VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) -nostdlib -shared $(ldflags-y) \
VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id) $(call ld-option, --hash-style=sysv) \
VDSO_LDFLAGS += $(call cc-ldoption, -fuse-ld=bfd) $(call ld-option, --build-id) \
-T
obj-$(CONFIG_VDSO) += vdso.o obj-$(CONFIG_VDSO) += vdso.o
extra-$(CONFIG_VDSO) += vdso.lds extra-$(CONFIG_VDSO) += vdso.lds
@ -37,8 +38,8 @@ KCOV_INSTRUMENT := n
$(obj)/vdso.o : $(obj)/vdso.so $(obj)/vdso.o : $(obj)/vdso.so
# Link rule for the .so file # Link rule for the .so file
$(obj)/vdso.so.raw: $(src)/vdso.lds $(obj-vdso) FORCE $(obj)/vdso.so.raw: $(obj)/vdso.lds $(obj-vdso) FORCE
$(call if_changed,vdsold) $(call if_changed,ld)
$(obj)/vdso.so.dbg: $(obj)/vdso.so.raw $(obj)/vdsomunge FORCE $(obj)/vdso.so.dbg: $(obj)/vdso.so.raw $(obj)/vdsomunge FORCE
$(call if_changed,vdsomunge) $(call if_changed,vdsomunge)
@ -48,11 +49,6 @@ $(obj)/%.so: OBJCOPYFLAGS := -S
$(obj)/%.so: $(obj)/%.so.dbg FORCE $(obj)/%.so: $(obj)/%.so.dbg FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
# Actual build commands
quiet_cmd_vdsold = VDSO $@
cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \
-Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@
quiet_cmd_vdsomunge = MUNGE $@ quiet_cmd_vdsomunge = MUNGE $@
cmd_vdsomunge = $(objtree)/$(obj)/vdsomunge $< $@ cmd_vdsomunge = $(objtree)/$(obj)/vdsomunge $< $@

View file

@ -2980,7 +2980,6 @@ static int aead_gcm_ccm_setkey(struct crypto_aead *cipher,
ctx->enckeylen = keylen; ctx->enckeylen = keylen;
ctx->authkeylen = 0; ctx->authkeylen = 0;
memcpy(ctx->enckey, key, ctx->enckeylen);
switch (ctx->enckeylen) { switch (ctx->enckeylen) {
case AES_KEYSIZE_128: case AES_KEYSIZE_128:
@ -2996,6 +2995,8 @@ static int aead_gcm_ccm_setkey(struct crypto_aead *cipher,
goto badkey; goto badkey;
} }
memcpy(ctx->enckey, key, ctx->enckeylen);
flow_log(" enckeylen:%u authkeylen:%u\n", ctx->enckeylen, flow_log(" enckeylen:%u authkeylen:%u\n", ctx->enckeylen,
ctx->authkeylen); ctx->authkeylen);
flow_dump(" enc: ", ctx->enckey, ctx->enckeylen); flow_dump(" enc: ", ctx->enckey, ctx->enckeylen);
@ -3056,6 +3057,10 @@ static int aead_gcm_esp_setkey(struct crypto_aead *cipher,
struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher); struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher);
flow_log("%s\n", __func__); flow_log("%s\n", __func__);
if (keylen < GCM_ESP_SALT_SIZE)
return -EINVAL;
ctx->salt_len = GCM_ESP_SALT_SIZE; ctx->salt_len = GCM_ESP_SALT_SIZE;
ctx->salt_offset = GCM_ESP_SALT_OFFSET; ctx->salt_offset = GCM_ESP_SALT_OFFSET;
memcpy(ctx->salt, key + keylen - GCM_ESP_SALT_SIZE, GCM_ESP_SALT_SIZE); memcpy(ctx->salt, key + keylen - GCM_ESP_SALT_SIZE, GCM_ESP_SALT_SIZE);
@ -3084,6 +3089,10 @@ static int rfc4543_gcm_esp_setkey(struct crypto_aead *cipher,
struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher); struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher);
flow_log("%s\n", __func__); flow_log("%s\n", __func__);
if (keylen < GCM_ESP_SALT_SIZE)
return -EINVAL;
ctx->salt_len = GCM_ESP_SALT_SIZE; ctx->salt_len = GCM_ESP_SALT_SIZE;
ctx->salt_offset = GCM_ESP_SALT_OFFSET; ctx->salt_offset = GCM_ESP_SALT_OFFSET;
memcpy(ctx->salt, key + keylen - GCM_ESP_SALT_SIZE, GCM_ESP_SALT_SIZE); memcpy(ctx->salt, key + keylen - GCM_ESP_SALT_SIZE, GCM_ESP_SALT_SIZE);
@ -3113,6 +3122,10 @@ static int aead_ccm_esp_setkey(struct crypto_aead *cipher,
struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher); struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher);
flow_log("%s\n", __func__); flow_log("%s\n", __func__);
if (keylen < CCM_ESP_SALT_SIZE)
return -EINVAL;
ctx->salt_len = CCM_ESP_SALT_SIZE; ctx->salt_len = CCM_ESP_SALT_SIZE;
ctx->salt_offset = CCM_ESP_SALT_OFFSET; ctx->salt_offset = CCM_ESP_SALT_OFFSET;
memcpy(ctx->salt, key + keylen - CCM_ESP_SALT_SIZE, CCM_ESP_SALT_SIZE); memcpy(ctx->salt, key + keylen - CCM_ESP_SALT_SIZE, CCM_ESP_SALT_SIZE);

View file

@ -828,6 +828,11 @@ static int qat_alg_aead_dec(struct aead_request *areq)
struct icp_qat_fw_la_bulk_req *msg; struct icp_qat_fw_la_bulk_req *msg;
int digst_size = crypto_aead_authsize(aead_tfm); int digst_size = crypto_aead_authsize(aead_tfm);
int ret, ctr = 0; int ret, ctr = 0;
u32 cipher_len;
cipher_len = areq->cryptlen - digst_size;
if (cipher_len % AES_BLOCK_SIZE != 0)
return -EINVAL;
ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req); ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req);
if (unlikely(ret)) if (unlikely(ret))
@ -842,7 +847,7 @@ static int qat_alg_aead_dec(struct aead_request *areq)
qat_req->req.comn_mid.src_data_addr = qat_req->buf.blp; qat_req->req.comn_mid.src_data_addr = qat_req->buf.blp;
qat_req->req.comn_mid.dest_data_addr = qat_req->buf.bloutp; qat_req->req.comn_mid.dest_data_addr = qat_req->buf.bloutp;
cipher_param = (void *)&qat_req->req.serv_specif_rqpars; cipher_param = (void *)&qat_req->req.serv_specif_rqpars;
cipher_param->cipher_length = areq->cryptlen - digst_size; cipher_param->cipher_length = cipher_len;
cipher_param->cipher_offset = areq->assoclen; cipher_param->cipher_offset = areq->assoclen;
memcpy(cipher_param->u.cipher_IV_array, areq->iv, AES_BLOCK_SIZE); memcpy(cipher_param->u.cipher_IV_array, areq->iv, AES_BLOCK_SIZE);
auth_param = (void *)((uint8_t *)cipher_param + sizeof(*cipher_param)); auth_param = (void *)((uint8_t *)cipher_param + sizeof(*cipher_param));
@ -871,6 +876,9 @@ static int qat_alg_aead_enc(struct aead_request *areq)
uint8_t *iv = areq->iv; uint8_t *iv = areq->iv;
int ret, ctr = 0; int ret, ctr = 0;
if (areq->cryptlen % AES_BLOCK_SIZE != 0)
return -EINVAL;
ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req); ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req);
if (unlikely(ret)) if (unlikely(ret))
return ret; return ret;

View file

@ -113,7 +113,8 @@ static int usbtv_probe(struct usb_interface *intf,
usbtv_audio_fail: usbtv_audio_fail:
/* we must not free at this point */ /* we must not free at this point */
usb_get_dev(usbtv->udev); v4l2_device_get(&usbtv->v4l2_dev);
/* this will undo the v4l2_device_get() */
usbtv_video_free(usbtv); usbtv_video_free(usbtv);
usbtv_video_fail: usbtv_video_fail:

View file

@ -319,15 +319,25 @@ static int orion_mdio_probe(struct platform_device *pdev)
init_waitqueue_head(&dev->smi_busy_wait); init_waitqueue_head(&dev->smi_busy_wait);
for (i = 0; i < ARRAY_SIZE(dev->clk); i++) { if (pdev->dev.of_node) {
dev->clk[i] = of_clk_get(pdev->dev.of_node, i); for (i = 0; i < ARRAY_SIZE(dev->clk); i++) {
if (PTR_ERR(dev->clk[i]) == -EPROBE_DEFER) { dev->clk[i] = of_clk_get(pdev->dev.of_node, i);
if (PTR_ERR(dev->clk[i]) == -EPROBE_DEFER) {
ret = -EPROBE_DEFER;
goto out_clk;
}
if (IS_ERR(dev->clk[i]))
break;
clk_prepare_enable(dev->clk[i]);
}
} else {
dev->clk[0] = clk_get(&pdev->dev, NULL);
if (PTR_ERR(dev->clk[0]) == -EPROBE_DEFER) {
ret = -EPROBE_DEFER; ret = -EPROBE_DEFER;
goto out_clk; goto out_clk;
} }
if (IS_ERR(dev->clk[i])) if (!IS_ERR(dev->clk[0]))
break; clk_prepare_enable(dev->clk[0]);
clk_prepare_enable(dev->clk[i]);
} }
dev->err_interrupt = platform_get_irq(pdev, 0); dev->err_interrupt = platform_get_irq(pdev, 0);

View file

@ -667,6 +667,9 @@ static int vmk80xx_find_usb_endpoints(struct comedi_device *dev)
if (!devpriv->ep_rx || !devpriv->ep_tx) if (!devpriv->ep_rx || !devpriv->ep_tx)
return -ENODEV; return -ENODEV;
if (!usb_endpoint_maxp(devpriv->ep_rx) || !usb_endpoint_maxp(devpriv->ep_tx))
return -EINVAL;
return 0; return 0;
} }

View file

@ -1027,6 +1027,11 @@ static const struct usb_device_id id_table_combined[] = {
/* U-Blox devices */ /* U-Blox devices */
{ USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) }, { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) },
{ USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) }, { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) },
/* FreeCalypso USB adapters */
{ USB_DEVICE(FTDI_VID, FTDI_FALCONIA_JTAG_BUF_PID),
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
{ USB_DEVICE(FTDI_VID, FTDI_FALCONIA_JTAG_UNBUF_PID),
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };

View file

@ -39,6 +39,13 @@
#define FTDI_LUMEL_PD12_PID 0x6002 #define FTDI_LUMEL_PD12_PID 0x6002
/*
* Custom USB adapters made by Falconia Partners LLC
* for FreeCalypso project, ID codes allocated to Falconia by FTDI.
*/
#define FTDI_FALCONIA_JTAG_BUF_PID 0x7150
#define FTDI_FALCONIA_JTAG_UNBUF_PID 0x7151
/* Sienna Serial Interface by Secyourit GmbH */ /* Sienna Serial Interface by Secyourit GmbH */
#define FTDI_SIENNA_PID 0x8348 #define FTDI_SIENNA_PID 0x8348

View file

@ -528,6 +528,7 @@ static void option_instat_callback(struct urb *urb);
/* Cellient products */ /* Cellient products */
#define CELLIENT_VENDOR_ID 0x2692 #define CELLIENT_VENDOR_ID 0x2692
#define CELLIENT_PRODUCT_MEN200 0x9005 #define CELLIENT_PRODUCT_MEN200 0x9005
#define CELLIENT_PRODUCT_MPL200 0x9025
/* Hyundai Petatel Inc. products */ /* Hyundai Petatel Inc. products */
#define PETATEL_VENDOR_ID 0x1ff4 #define PETATEL_VENDOR_ID 0x1ff4
@ -1186,6 +1187,8 @@ static const struct usb_device_id option_ids[] = {
.driver_info = NCTRL(2) | RSVD(3) }, .driver_info = NCTRL(2) | RSVD(3) },
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1053, 0xff), /* Telit FN980 (ECM) */ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1053, 0xff), /* Telit FN980 (ECM) */
.driver_info = NCTRL(0) | RSVD(1) }, .driver_info = NCTRL(0) | RSVD(1) },
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1054, 0xff), /* Telit FT980-KS */
.driver_info = NCTRL(2) | RSVD(3) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
.driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM), { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
@ -1982,6 +1985,8 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) }, { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) },
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) }, { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) },
{ USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
{ USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MPL200),
.driver_info = RSVD(1) | RSVD(4) },
{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) }, { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) },
{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) }, { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) },
{ USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, TPLINK_PRODUCT_LTE, 0xff, 0x00, 0x00) }, /* TP-Link LTE Module */ { USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, TPLINK_PRODUCT_LTE, 0xff, 0x00, 0x00) }, /* TP-Link LTE Module */

View file

@ -94,6 +94,7 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_LD220TA_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220TA_PRODUCT_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_LD381_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD381_PRODUCT_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_LD381GC_PRODUCT_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_LD960_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD960_PRODUCT_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_LD960TA_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD960TA_PRODUCT_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) },

View file

@ -121,6 +121,7 @@
/* Hewlett-Packard POS Pole Displays */ /* Hewlett-Packard POS Pole Displays */
#define HP_VENDOR_ID 0x03f0 #define HP_VENDOR_ID 0x03f0
#define HP_LD381GC_PRODUCT_ID 0x0183
#define HP_LM920_PRODUCT_ID 0x026b #define HP_LM920_PRODUCT_ID 0x026b
#define HP_TD620_PRODUCT_ID 0x0956 #define HP_TD620_PRODUCT_ID 0x0956
#define HP_LD960_PRODUCT_ID 0x0b39 #define HP_LD960_PRODUCT_ID 0x0b39

View file

@ -1553,11 +1553,7 @@ void reiserfs_read_locked_inode(struct inode *inode,
* set version 1, version 2 could be used too, because stat data * set version 1, version 2 could be used too, because stat data
* key is the same in both versions * key is the same in both versions
*/ */
key.version = KEY_FORMAT_3_5; _make_cpu_key(&key, KEY_FORMAT_3_5, dirino, inode->i_ino, 0, 0, 3);
key.on_disk_key.k_dir_id = dirino;
key.on_disk_key.k_objectid = inode->i_ino;
key.on_disk_key.k_offset = 0;
key.on_disk_key.k_type = 0;
/* look for the object's stat data */ /* look for the object's stat data */
retval = search_item(inode->i_sb, &key, &path_to_sd); retval = search_item(inode->i_sb, &key, &path_to_sd);

View file

@ -665,6 +665,13 @@ reiserfs_xattr_get(struct inode *inode, const char *name, void *buffer,
if (get_inode_sd_version(inode) == STAT_DATA_V1) if (get_inode_sd_version(inode) == STAT_DATA_V1)
return -EOPNOTSUPP; return -EOPNOTSUPP;
/*
* priv_root needn't be initialized during mount so allow initial
* lookups to succeed.
*/
if (!REISERFS_SB(inode->i_sb)->priv_root)
return 0;
dentry = xattr_lookup(inode, name, XATTR_REPLACE); dentry = xattr_lookup(inode, name, XATTR_REPLACE);
if (IS_ERR(dentry)) { if (IS_ERR(dentry)) {
err = PTR_ERR(dentry); err = PTR_ERR(dentry);

View file

@ -1287,16 +1287,34 @@ static inline void hci_auth_cfm(struct hci_conn *conn, __u8 status)
conn->security_cfm_cb(conn, status); conn->security_cfm_cb(conn, status);
} }
static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status)
__u8 encrypt)
{ {
struct hci_cb *cb; struct hci_cb *cb;
__u8 encrypt;
if (conn->sec_level == BT_SECURITY_SDP) if (conn->state == BT_CONFIG) {
conn->sec_level = BT_SECURITY_LOW; if (!status)
conn->state = BT_CONNECTED;
if (conn->pending_sec_level > conn->sec_level) hci_connect_cfm(conn, status);
conn->sec_level = conn->pending_sec_level; hci_conn_drop(conn);
return;
}
if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
encrypt = 0x00;
else if (test_bit(HCI_CONN_AES_CCM, &conn->flags))
encrypt = 0x02;
else
encrypt = 0x01;
if (!status) {
if (conn->sec_level == BT_SECURITY_SDP)
conn->sec_level = BT_SECURITY_LOW;
if (conn->pending_sec_level > conn->sec_level)
conn->sec_level = conn->pending_sec_level;
}
mutex_lock(&hci_cb_list_lock); mutex_lock(&hci_cb_list_lock);
list_for_each_entry(cb, &hci_cb_list, list) { list_for_each_entry(cb, &hci_cb_list, list) {

View file

@ -619,6 +619,8 @@ struct l2cap_ops {
struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan, struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan,
unsigned long hdr_len, unsigned long hdr_len,
unsigned long len, int nb); unsigned long len, int nb);
int (*filter) (struct l2cap_chan * chan,
struct sk_buff *skb);
}; };
struct l2cap_conn { struct l2cap_conn {

View file

@ -233,6 +233,9 @@ static int a2mp_discover_rsp(struct amp_mgr *mgr, struct sk_buff *skb,
struct a2mp_info_req req; struct a2mp_info_req req;
found = true; found = true;
memset(&req, 0, sizeof(req));
req.id = cl->id; req.id = cl->id;
a2mp_send(mgr, A2MP_GETINFO_REQ, __next_ident(mgr), a2mp_send(mgr, A2MP_GETINFO_REQ, __next_ident(mgr),
sizeof(req), &req); sizeof(req), &req);
@ -312,6 +315,8 @@ static int a2mp_getinfo_req(struct amp_mgr *mgr, struct sk_buff *skb,
if (!hdev || hdev->dev_type != HCI_AMP) { if (!hdev || hdev->dev_type != HCI_AMP) {
struct a2mp_info_rsp rsp; struct a2mp_info_rsp rsp;
memset(&rsp, 0, sizeof(rsp));
rsp.id = req->id; rsp.id = req->id;
rsp.status = A2MP_STATUS_INVALID_CTRL_ID; rsp.status = A2MP_STATUS_INVALID_CTRL_ID;
@ -355,6 +360,8 @@ static int a2mp_getinfo_rsp(struct amp_mgr *mgr, struct sk_buff *skb,
if (!ctrl) if (!ctrl)
return -ENOMEM; return -ENOMEM;
memset(&req, 0, sizeof(req));
req.id = rsp->id; req.id = rsp->id;
a2mp_send(mgr, A2MP_GETAMPASSOC_REQ, __next_ident(mgr), sizeof(req), a2mp_send(mgr, A2MP_GETAMPASSOC_REQ, __next_ident(mgr), sizeof(req),
&req); &req);
@ -383,6 +390,8 @@ static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb,
struct a2mp_amp_assoc_rsp rsp; struct a2mp_amp_assoc_rsp rsp;
rsp.id = req->id; rsp.id = req->id;
memset(&rsp, 0, sizeof(rsp));
if (tmp) { if (tmp) {
rsp.status = A2MP_STATUS_COLLISION_OCCURED; rsp.status = A2MP_STATUS_COLLISION_OCCURED;
amp_mgr_put(tmp); amp_mgr_put(tmp);
@ -471,7 +480,6 @@ static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb,
struct a2mp_cmd *hdr) struct a2mp_cmd *hdr)
{ {
struct a2mp_physlink_req *req = (void *) skb->data; struct a2mp_physlink_req *req = (void *) skb->data;
struct a2mp_physlink_rsp rsp; struct a2mp_physlink_rsp rsp;
struct hci_dev *hdev; struct hci_dev *hdev;
struct hci_conn *hcon; struct hci_conn *hcon;
@ -482,6 +490,8 @@ static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb,
BT_DBG("local_id %d, remote_id %d", req->local_id, req->remote_id); BT_DBG("local_id %d, remote_id %d", req->local_id, req->remote_id);
memset(&rsp, 0, sizeof(rsp));
rsp.local_id = req->remote_id; rsp.local_id = req->remote_id;
rsp.remote_id = req->local_id; rsp.remote_id = req->local_id;
@ -560,6 +570,8 @@ static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb,
BT_DBG("local_id %d remote_id %d", req->local_id, req->remote_id); BT_DBG("local_id %d remote_id %d", req->local_id, req->remote_id);
memset(&rsp, 0, sizeof(rsp));
rsp.local_id = req->remote_id; rsp.local_id = req->remote_id;
rsp.remote_id = req->local_id; rsp.remote_id = req->local_id;
rsp.status = A2MP_STATUS_SUCCESS; rsp.status = A2MP_STATUS_SUCCESS;
@ -682,6 +694,8 @@ static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
if (err) { if (err) {
struct a2mp_cmd_rej rej; struct a2mp_cmd_rej rej;
memset(&rej, 0, sizeof(rej));
rej.reason = cpu_to_le16(0); rej.reason = cpu_to_le16(0);
hdr = (void *) skb->data; hdr = (void *) skb->data;
@ -905,6 +919,8 @@ void a2mp_send_getinfo_rsp(struct hci_dev *hdev)
BT_DBG("%s mgr %p", hdev->name, mgr); BT_DBG("%s mgr %p", hdev->name, mgr);
memset(&rsp, 0, sizeof(rsp));
rsp.id = hdev->id; rsp.id = hdev->id;
rsp.status = A2MP_STATUS_INVALID_CTRL_ID; rsp.status = A2MP_STATUS_INVALID_CTRL_ID;
@ -1002,6 +1018,8 @@ void a2mp_send_create_phy_link_rsp(struct hci_dev *hdev, u8 status)
if (!mgr) if (!mgr)
return; return;
memset(&rsp, 0, sizeof(rsp));
hs_hcon = hci_conn_hash_lookup_state(hdev, AMP_LINK, BT_CONNECT); hs_hcon = hci_conn_hash_lookup_state(hdev, AMP_LINK, BT_CONNECT);
if (!hs_hcon) { if (!hs_hcon) {
rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION;
@ -1034,6 +1052,8 @@ void a2mp_discover_amp(struct l2cap_chan *chan)
mgr->bredr_chan = chan; mgr->bredr_chan = chan;
memset(&req, 0, sizeof(req));
req.mtu = cpu_to_le16(L2CAP_A2MP_DEFAULT_MTU); req.mtu = cpu_to_le16(L2CAP_A2MP_DEFAULT_MTU);
req.ext_feat = 0; req.ext_feat = 0;
a2mp_send(mgr, A2MP_DISCOVER_REQ, 1, sizeof(req), &req); a2mp_send(mgr, A2MP_DISCOVER_REQ, 1, sizeof(req), &req);

View file

@ -1282,6 +1282,23 @@ int hci_conn_check_link_mode(struct hci_conn *conn)
return 0; return 0;
} }
/* AES encryption is required for Level 4:
*
* BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C
* page 1319:
*
* 128-bit equivalent strength for link and encryption keys
* required using FIPS approved algorithms (E0 not allowed,
* SAFER+ not allowed, and P-192 not allowed; encryption key
* not shortened)
*/
if (conn->sec_level == BT_SECURITY_FIPS &&
!test_bit(HCI_CONN_AES_CCM, &conn->flags)) {
bt_dev_err(conn->hdev,
"Invalid security: Missing AES-CCM usage");
return 0;
}
if (hci_conn_ssp_enabled(conn) && if (hci_conn_ssp_enabled(conn) &&
!test_bit(HCI_CONN_ENCRYPT, &conn->flags)) !test_bit(HCI_CONN_ENCRYPT, &conn->flags))
return 0; return 0;

View file

@ -2756,7 +2756,7 @@ static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
&cp); &cp);
} else { } else {
clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags); clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags);
hci_encrypt_cfm(conn, ev->status, 0x00); hci_encrypt_cfm(conn, ev->status);
} }
} }
@ -2841,22 +2841,7 @@ static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status,
conn->enc_key_size = rp->key_size; conn->enc_key_size = rp->key_size;
} }
if (conn->state == BT_CONFIG) { hci_encrypt_cfm(conn, 0);
conn->state = BT_CONNECTED;
hci_connect_cfm(conn, 0);
hci_conn_drop(conn);
} else {
u8 encrypt;
if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
encrypt = 0x00;
else if (test_bit(HCI_CONN_AES_CCM, &conn->flags))
encrypt = 0x02;
else
encrypt = 0x01;
hci_encrypt_cfm(conn, 0, encrypt);
}
unlock: unlock:
hci_dev_unlock(hdev); hci_dev_unlock(hdev);
@ -2905,27 +2890,23 @@ static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb)
clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags); clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags);
/* Check link security requirements are met */
if (!hci_conn_check_link_mode(conn))
ev->status = HCI_ERROR_AUTH_FAILURE;
if (ev->status && conn->state == BT_CONNECTED) { if (ev->status && conn->state == BT_CONNECTED) {
if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING)
set_bit(HCI_CONN_AUTH_FAILURE, &conn->flags); set_bit(HCI_CONN_AUTH_FAILURE, &conn->flags);
/* Notify upper layers so they can cleanup before
* disconnecting.
*/
hci_encrypt_cfm(conn, ev->status);
hci_disconnect(conn, HCI_ERROR_AUTH_FAILURE); hci_disconnect(conn, HCI_ERROR_AUTH_FAILURE);
hci_conn_drop(conn); hci_conn_drop(conn);
goto unlock; goto unlock;
} }
/* In Secure Connections Only mode, do not allow any connections
* that are not encrypted with AES-CCM using a P-256 authenticated
* combination key.
*/
if (hci_dev_test_flag(hdev, HCI_SC_ONLY) &&
(!test_bit(HCI_CONN_AES_CCM, &conn->flags) ||
conn->key_type != HCI_LK_AUTH_COMBINATION_P256)) {
hci_connect_cfm(conn, HCI_ERROR_AUTH_FAILURE);
hci_conn_drop(conn);
goto unlock;
}
/* Try reading the encryption key size for encrypted ACL links */ /* Try reading the encryption key size for encrypted ACL links */
if (!ev->status && ev->encrypt && conn->type == ACL_LINK) { if (!ev->status && ev->encrypt && conn->type == ACL_LINK) {
struct hci_cp_read_enc_key_size cp; struct hci_cp_read_enc_key_size cp;
@ -2955,14 +2936,7 @@ static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb)
} }
notify: notify:
if (conn->state == BT_CONFIG) { hci_encrypt_cfm(conn, ev->status);
if (!ev->status)
conn->state = BT_CONNECTED;
hci_connect_cfm(conn, ev->status);
hci_conn_drop(conn);
} else
hci_encrypt_cfm(conn, ev->status, ev->encrypt);
unlock: unlock:
hci_dev_unlock(hdev); hci_dev_unlock(hdev);

View file

@ -6683,9 +6683,10 @@ static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)
goto drop; goto drop;
} }
if ((chan->mode == L2CAP_MODE_ERTM || if (chan->ops->filter) {
chan->mode == L2CAP_MODE_STREAMING) && sk_filter(chan->data, skb)) if (chan->ops->filter(chan, skb))
goto drop; goto drop;
}
if (!control->sframe) { if (!control->sframe) {
int err; int err;

View file

@ -1476,6 +1476,19 @@ static void l2cap_sock_suspend_cb(struct l2cap_chan *chan)
sk->sk_state_change(sk); sk->sk_state_change(sk);
} }
static int l2cap_sock_filter(struct l2cap_chan *chan, struct sk_buff *skb)
{
struct sock *sk = chan->data;
switch (chan->mode) {
case L2CAP_MODE_ERTM:
case L2CAP_MODE_STREAMING:
return sk_filter(sk, skb);
}
return 0;
}
static const struct l2cap_ops l2cap_chan_ops = { static const struct l2cap_ops l2cap_chan_ops = {
.name = "L2CAP Socket Interface", .name = "L2CAP Socket Interface",
.new_connection = l2cap_sock_new_connection_cb, .new_connection = l2cap_sock_new_connection_cb,
@ -1490,6 +1503,7 @@ static const struct l2cap_ops l2cap_chan_ops = {
.set_shutdown = l2cap_sock_set_shutdown_cb, .set_shutdown = l2cap_sock_set_shutdown_cb,
.get_sndtimeo = l2cap_sock_get_sndtimeo_cb, .get_sndtimeo = l2cap_sock_get_sndtimeo_cb,
.alloc_skb = l2cap_sock_alloc_skb_cb, .alloc_skb = l2cap_sock_alloc_skb_cb,
.filter = l2cap_sock_filter,
}; };
static void l2cap_sock_destruct(struct sock *sk) static void l2cap_sock_destruct(struct sock *sk)

View file

@ -756,7 +756,8 @@ static u32 get_supported_settings(struct hci_dev *hdev)
if (lmp_ssp_capable(hdev)) { if (lmp_ssp_capable(hdev)) {
settings |= MGMT_SETTING_SSP; settings |= MGMT_SETTING_SSP;
settings |= MGMT_SETTING_HS; if (IS_ENABLED(CONFIG_BT_HS))
settings |= MGMT_SETTING_HS;
} }
if (lmp_sc_capable(hdev)) if (lmp_sc_capable(hdev))
@ -1771,6 +1772,10 @@ static int set_hs(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
BT_DBG("request for %s", hdev->name); BT_DBG("request for %s", hdev->name);
if (!IS_ENABLED(CONFIG_BT_HS))
return mgmt_cmd_status(sk, hdev->id, MGMT_OP_SET_HS,
MGMT_STATUS_NOT_SUPPORTED);
status = mgmt_bredr_support(hdev); status = mgmt_bredr_support(hdev);
if (status) if (status)
return mgmt_cmd_status(sk, hdev->id, MGMT_OP_SET_HS, status); return mgmt_cmd_status(sk, hdev->id, MGMT_OP_SET_HS, status);

View file

@ -87,6 +87,9 @@ struct cs_etm_queue {
struct cs_etm_packet *packet; struct cs_etm_packet *packet;
}; };
/* RB tree for quick conversion between traceID and metadata pointers */
static struct intlist *traceid_list;
static int cs_etm__update_queues(struct cs_etm_auxtrace *etm); static int cs_etm__update_queues(struct cs_etm_auxtrace *etm);
static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm, static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
pid_t tid, u64 time_); pid_t tid, u64 time_);

View file

@ -53,9 +53,6 @@ enum {
CS_ETMV4_PRIV_MAX, CS_ETMV4_PRIV_MAX,
}; };
/* RB tree for quick conversion between traceID and CPUs */
struct intlist *traceid_list;
#define KiB(x) ((x) * 1024) #define KiB(x) ((x) * 1024)
#define MiB(x) ((x) * 1024 * 1024) #define MiB(x) ((x) * 1024 * 1024)