4.18.13-stable review
Subsystems (8)
Greg Kroah-Hartman
maintainerPATCH 155/168 smb2: fix missing files in root share directory listing
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aurelien Aptel <[email protected]>
commit 0595751f267994c3c7027377058e4185b3a28e75 upstream.
When mounting a Windows share that is the root of a drive (eg. C$) the server does not return . and .. directory entries. This results in the smb2 code path erroneously skipping the 2 first entries.
Pseudo-code of the readdir() code path:
cifs_readdir(struct file, struct dir_context)
initiate_cifs_search <-- if no reponse cached yet
server->ops->query_dir_first
dir_emit_dots
dir_emit <-- adds "." and ".." if we're at pos=0
find_cifs_entry
initiate_cifs_search <-- if pos < start of current response
(restart search)
server->ops->query_dir_next <-- if pos > end of current response
(fetch next search res)
for(...) <-- loops over cur response entries
starting at pos
cifs_filldir <-- skip . and .., emit entry
cifs_fill_dirent
dir_emit
pos++
A) dir_emit_dots() always adds . & ..
and sets the current dir pos to 2 (0 and 1 are done).
Therefore we always want the index_to_find to be 2 regardless of if the response has . and ..
B) smb1 code initializes index_of_last_entry with a +2 offset
in cifssmb.c CIFSFindFirst():
psrch_inf->index_of_last_entry = 2 /* skip . and .. */ + psrch_inf->entries_in_buffer;
Later in find_cifs_entry() we want to find the next dir entry at pos=2 as a result of (A)
first_entry_in_buffer = cfile->srch_inf.index_of_last_entry - cfile->srch_inf.entries_in_buffer;
This var is the dir pos that the first entry in the buffer will have therefore it must be 2 in the first call.
If we don't offset index_of_last_entry by 2 (like in (B)), first_entry_in_buffer=0 but we were instructed to get pos=2 so this code in find_cifs_entry() skips the 2 first which is ok for non-root shares, as it skips . and .. from the response but is not ok for root shares where the 2 first are actual files
pos_in_buf = index_to_find - first_entry_in_buffer;
// pos_in_buf=2
// we skip 2 first response entries :(
for (i = 0; (i < (pos_in_buf)) && (cur_ent != NULL); i++) {
/* go entry by entry figuring out which is first */
cur_ent = nxt_dir_entry(cur_ent, end_of_smb,
cfile->srch_inf.info_level);
}C) cifs_filldir() skips . and .. so we can safely ignore them for now.
Sample program:
int main(int argc, char **argv)
{
const char *path = argc >= 2 ? argv[1] : ".";
DIR *dh;
struct dirent *de;
printf("listing path <%s>\n", path);
dh = opendir(path);
if (!dh) {
printf("opendir error %d\n", errno);
return 1;
}
while (1) {
de = readdir(dh);
if (!de) {
if (errno) {
printf("readdir error %d\n", errno);
return 1;
}
printf("end of listing\n");
break;
}
printf("off=%lu <%s>\n", de->d_off, de->d_name);
}
return 0;
}Before the fix with SMB1 on root shares:
<.> off=1
<..> off=2
<$Recycle.Bin> off=3
<bootmgr> off=4
and on non-root shares:
<.> off=1
<..> off=4 <-- after adding .., the offsets jumps to +2 because
<2536> off=5 we skipped . and .. from response buffer (C)
<411> off=6 but still incremented pos
<file> off=7
<fsx> off=8
Therefore the fix for smb2 is to mimic smb1 behaviour and offset the index_of_last_entry by 2.
Test results comparing smb1 and smb2 before/after the fix on root share, non-root shares and on large directories (ie. multi-response dir listing):
PRE FIX
=======
pre-1-root VS pre-2-root:
ERR pre-2-root is missing [bootmgr, $Recycle.Bin]
pre-1-nonroot VS pre-2-nonroot:
OK~ same files, same order, different offsets
pre-1-nonroot-large VS pre-2-nonroot-large:
OK~ same files, same order, different offsets
POST FIX
========
post-1-root VS post-2-root:
OK same files, same order, same offsets
post-1-nonroot VS post-2-nonroot:
OK same files, same order, same offsets
post-1-nonroot-large VS post-2-nonroot-large:
OK same files, same order, same offsets
REGRESSION?
===========
pre-1-root VS post-1-root:
OK same files, same order, same offsets
pre-1-nonroot VS post-1-nonroot:
OK same files, same order, same offsets
--- fs/cifs/smb2ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/smb2ops.c +1 -1
@@ -1484,7 +1484,7 @@ smb2_query_dir_first(const unsigned int } srch_inf->entries_in_buffer =0 ; - srch_inf->index_of_last_entry =0 ; + srch_inf->index_of_last_entry =2 ; rc =SMB2_query_directory (xid, tcon, fid->persistent_fid, fid->volatile_fid,0 , srch_inf);
Greg Kroah-Hartman
maintainerPATCH 156/168 iommu/amd: Clear memory encryption mask from physical address
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Singh, Brijesh <[email protected]>
commit b3e9b515b08e407ab3a026dc2e4d935c48d05f69 upstream.
Boris Ostrovsky reported a memory leak with device passthrough when SME is active.
The VFIO driver uses iommu_iova_to_phys() to get the physical address for an iova. This physical address is later passed into vfio_unmap_unpin() to unpin the memory. The vfio_unmap_unpin() uses pfn_valid() before unpinning the memory. The pfn_valid() check was failing because encryption mask was part of the physical address returned. This resulted in the memory not being unpinned and therefore leaked after the guest terminates.
The memory encryption mask must be cleared from the physical address in iommu_iova_to_phys().
--- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd_iommu.c +1 -1
@@ -3073,7 +3073,7 @@ static phys_addr_t amd_iommu_iova_to_phyreturn 0 ; offset_mask = pte_pgsize -1 ; - __pte = *pte &PM_ADDR_MASK ; + __pte =__sme_clr (*pte &PM_ADDR_MASK );return (__pte & ~offset_mask) | (iova & offset_mask); }
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Greg Kroah-Hartman
maintainerPATCH 157/168 ALSA: hda/realtek - Cannot adjust speakers volume on Dell XPS 27 7760
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kai-Heng Feng <[email protected]>
commit 709ae62e8e6d9ac4df7dadb3b8ae432675c45ef9 upstream.
The issue is the same as commit dd9aa335c880 ("ALSA: hda/realtek - Can't adjust speaker's volume on a Dell AIO"), the output requires to connect to a node with Amp-out capability.
Applying the same fixup ALC298_FIXUP_SPK_VOLUME can fix the issue.
--- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -6455,6 +6455,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1028 ,0x0706 ,"Dell Inspiron 7559" ,ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER ),SND_PCI_QUIRK (0x1028 ,0x0725 ,"Dell Inspiron 3162" ,ALC255_FIXUP_DELL_SPK_NOISE ),SND_PCI_QUIRK (0x1028 ,0x075b ,"Dell XPS 13 9360" ,ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE ), +SND_PCI_QUIRK (0x1028 ,0x075c ,"Dell XPS 27 7760" ,ALC298_FIXUP_SPK_VOLUME ),SND_PCI_QUIRK (0x1028 ,0x075d ,"Dell AIO" ,ALC298_FIXUP_SPK_VOLUME ),SND_PCI_QUIRK (0x1028 ,0x07b0 ,"Dell Precision 7520" ,ALC295_FIXUP_DISABLE_DAC3 ), SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
Greg Kroah-Hartman
maintainerPATCH 158/168 crypto: qat - Fix KASAN stack-out-of-bounds bug in adf_probe()
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Waiman Long <[email protected]>
commit ba439a6cbfa2936a6713f64cb499de7943673fe3 upstream.
The following KASAN warning was printed when booting a 64-bit kernel on some systems with Intel CPUs:
[ 44.512826] ================================================================== [ 44.520165] BUG: KASAN: stack-out-of-bounds in find_first_bit+0xb0/0xc0 [ 44.526786] Read of size 8 at addr ffff88041e02fc50 by task kworker/0:2/124
[ 44.535253] CPU: 0 PID: 124 Comm: kworker/0:2 Tainted: G X --------- --- 4.18.0-12.el8.x86_64+debug #1 [ 44.545858] Hardware name: Intel Corporation PURLEY/PURLEY, BIOS BKVDTRL1.86B.0005.D08.1712070559 12/07/2017 [ 44.555682] Workqueue: events work_for_cpu_fn [ 44.560043] Call Trace: [ 44.562502] dump_stack+0x9a/0xe9 [ 44.565832] print_address_description+0x65/0x22e [ 44.570683] ? find_first_bit+0xb0/0xc0 [ 44.570689] kasan_report.cold.6+0x92/0x19f [ 44.578726] find_first_bit+0xb0/0xc0 [ 44.578737] adf_probe+0x9eb/0x19a0 [qat_c62x] [ 44.578751] ? adf_remove+0x110/0x110 [qat_c62x] [ 44.591490] ? mark_held_locks+0xc8/0x140 [ 44.591498] ? _raw_spin_unlock+0x30/0x30 [ 44.591505] ? trace_hardirqs_on_caller+0x381/0x570 [ 44.604418] ? adf_remove+0x110/0x110 [qat_c62x] [ 44.604427] local_pci_probe+0xd4/0x180 [ 44.604432] ? pci_device_shutdown+0x110/0x110 [ 44.617386] work_for_cpu_fn+0x51/0xa0 [ 44.621145] process_one_work+0x8fe/0x16e0 [ 44.625263] ? pwq_dec_nr_in_flight+0x2d0/0x2d0 [ 44.629799] ? lock_acquire+0x14c/0x400 [ 44.633645] ? move_linked_works+0x12e/0x2a0 [ 44.637928] worker_thread+0x536/0xb50 [ 44.641690] ? __kthread_parkme+0xb6/0x180 [ 44.645796] ? process_one_work+0x16e0/0x16e0 [ 44.650160] kthread+0x30c/0x3d0 [ 44.653400] ? kthread_create_worker_on_cpu+0xc0/0xc0 [ 44.658457] ret_from_fork+0x3a/0x50
[ 44.663557] The buggy address belongs to the page: [ 44.668350] page:ffffea0010780bc0 count:0 mapcount:0 mapping:0000000000000000 index:0x0 [ 44.676356] flags: 0x17ffffc0000000() [ 44.680023] raw: 0017ffffc0000000 ffffea0010780bc8 ffffea0010780bc8 0000000000000000 [ 44.687769] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 [ 44.695510] page dumped because: kasan: bad access detected
[ 44.702578] Memory state around the buggy address: [ 44.707372] ffff88041e02fb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 44.714593] ffff88041e02fb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 44.721810] >ffff88041e02fc00: 00 00 00 00 00 00 f1 f1 f1 f1 04 f2 f2 f2 f2 f2 [ 44.729028] ^ [ 44.734864] ffff88041e02fc80: f2 f2 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00 00 [ 44.742082] ffff88041e02fd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 44.749299] ==================================================================
Looking into the code:
int ret, bar_mask;
:for_each_set_bit(bar_nr, (const unsigned long *)&bar_mask,
It is casting a 32-bit integer pointer to a 64-bit unsigned long pointer. There are two problems here. First, the 32-bit pointer address may not be 64-bit aligned. Secondly, it is accessing an extra 4 bytes.
This is fixed by changing the bar_mask type to unsigned long.
--- drivers/crypto/qat/qat_c3xxx/adf_drv.c | 6 +++--- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 6 +++--- drivers/crypto/qat/qat_c62x/adf_drv.c | 6 +++--- drivers/crypto/qat/qat_c62xvf/adf_drv.c | 6 +++--- drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 6 +++--- drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-)
drivers/crypto/qat/qat_c3xxx/adf_drv.c +3 -3
@@ -123,7 +123,8 @@ static int adf_probe(struct pci_dev *pdestruct adf_hw_device_data *hw_data;char name[ADF_DEVICE_NAME_LENGTH ];unsigned int i, bar_nr; -int ret, bar_mask; +unsigned long bar_mask; +int ret;switch (ent->device) {case ADF_C3XXX_PCI_DEVICE_ID :
@@ -235,8 +236,7 @@ static int adf_probe(struct pci_dev *pde/* Find and map all the device's BARS */ i =0 ; bar_mask =pci_select_bars (pdev,IORESOURCE_MEM ); -for_each_set_bit (bar_nr, (const unsigned long *)&bar_mask, -ADF_PCI_MAX_BARS *2 ) { +for_each_set_bit (bar_nr, &bar_mask,ADF_PCI_MAX_BARS *2 ) {struct adf_bar *bar = &accel_pci_dev->pci_bars[i++]; bar->base_addr =pci_resource_start (pdev, bar_nr);
drivers/crypto/qat/qat_c3xxxvf/adf_drv.c +3 -3
@@ -125,7 +125,8 @@ static int adf_probe(struct pci_dev *pdestruct adf_hw_device_data *hw_data;char name[ADF_DEVICE_NAME_LENGTH ];unsigned int i, bar_nr; -int ret, bar_mask; +unsigned long bar_mask; +int ret;switch (ent->device) {case ADF_C3XXXIOV_PCI_DEVICE_ID :
@@ -215,8 +216,7 @@ static int adf_probe(struct pci_dev *pde/* Find and map all the device's BARS */ i =0 ; bar_mask =pci_select_bars (pdev,IORESOURCE_MEM ); -for_each_set_bit (bar_nr, (const unsigned long *)&bar_mask, -ADF_PCI_MAX_BARS *2 ) { +for_each_set_bit (bar_nr, &bar_mask,ADF_PCI_MAX_BARS *2 ) {struct adf_bar *bar = &accel_pci_dev->pci_bars[i++]; bar->base_addr =pci_resource_start (pdev, bar_nr);
drivers/crypto/qat/qat_c62x/adf_drv.c +3 -3
@@ -123,7 +123,8 @@ static int adf_probe(struct pci_dev *pdestruct adf_hw_device_data *hw_data;char name[ADF_DEVICE_NAME_LENGTH ];unsigned int i, bar_nr; -int ret, bar_mask; +unsigned long bar_mask; +int ret;switch (ent->device) {case ADF_C62X_PCI_DEVICE_ID :
@@ -235,8 +236,7 @@ static int adf_probe(struct pci_dev *pde/* Find and map all the device's BARS */ i = (hw_data->fuses &ADF_DEVICE_FUSECTL_MASK ) ?1 :0 ; bar_mask =pci_select_bars (pdev,IORESOURCE_MEM ); -for_each_set_bit (bar_nr, (const unsigned long *)&bar_mask, -ADF_PCI_MAX_BARS *2 ) { +for_each_set_bit (bar_nr, &bar_mask,ADF_PCI_MAX_BARS *2 ) {struct adf_bar *bar = &accel_pci_dev->pci_bars[i++]; bar->base_addr =pci_resource_start (pdev, bar_nr);
drivers/crypto/qat/qat_c62xvf/adf_drv.c +3 -3
@@ -125,7 +125,8 @@ static int adf_probe(struct pci_dev *pdestruct adf_hw_device_data *hw_data;char name[ADF_DEVICE_NAME_LENGTH ];unsigned int i, bar_nr; -int ret, bar_mask; +unsigned long bar_mask; +int ret;switch (ent->device) {case ADF_C62XIOV_PCI_DEVICE_ID :
@@ -215,8 +216,7 @@ static int adf_probe(struct pci_dev *pde/* Find and map all the device's BARS */ i =0 ; bar_mask =pci_select_bars (pdev,IORESOURCE_MEM ); -for_each_set_bit (bar_nr, (const unsigned long *)&bar_mask, -ADF_PCI_MAX_BARS *2 ) { +for_each_set_bit (bar_nr, &bar_mask,ADF_PCI_MAX_BARS *2 ) {struct adf_bar *bar = &accel_pci_dev->pci_bars[i++]; bar->base_addr =pci_resource_start (pdev, bar_nr);
drivers/crypto/qat/qat_dh895xcc/adf_drv.c +3 -3
@@ -123,7 +123,8 @@ static int adf_probe(struct pci_dev *pdestruct adf_hw_device_data *hw_data;char name[ADF_DEVICE_NAME_LENGTH ];unsigned int i, bar_nr; -int ret, bar_mask; +unsigned long bar_mask; +int ret;switch (ent->device) {case ADF_DH895XCC_PCI_DEVICE_ID :
@@ -237,8 +238,7 @@ static int adf_probe(struct pci_dev *pde/* Find and map all the device's BARS */ i =0 ; bar_mask =pci_select_bars (pdev,IORESOURCE_MEM ); -for_each_set_bit (bar_nr, (const unsigned long *)&bar_mask, -ADF_PCI_MAX_BARS *2 ) { +for_each_set_bit (bar_nr, &bar_mask,ADF_PCI_MAX_BARS *2 ) {struct adf_bar *bar = &accel_pci_dev->pci_bars[i++]; bar->base_addr =pci_resource_start (pdev, bar_nr);
drivers/crypto/qat/qat_dh895xccvf/adf_drv.c +3 -3
@@ -125,7 +125,8 @@ static int adf_probe(struct pci_dev *pdestruct adf_hw_device_data *hw_data;char name[ADF_DEVICE_NAME_LENGTH ];unsigned int i, bar_nr; -int ret, bar_mask; +unsigned long bar_mask; +int ret;switch (ent->device) {case ADF_DH895XCCIOV_PCI_DEVICE_ID :
@@ -215,8 +216,7 @@ static int adf_probe(struct pci_dev *pde/* Find and map all the device's BARS */ i =0 ; bar_mask =pci_select_bars (pdev,IORESOURCE_MEM ); -for_each_set_bit (bar_nr, (const unsigned long *)&bar_mask, -ADF_PCI_MAX_BARS *2 ) { +for_each_set_bit (bar_nr, &bar_mask,ADF_PCI_MAX_BARS *2 ) {struct adf_bar *bar = &accel_pci_dev->pci_bars[i++]; bar->base_addr =pci_resource_start (pdev, bar_nr);
Greg Kroah-Hartman
maintainerPATCH 159/168 crypto: chelsio - Fix memory corruption in DMA Mapped buffers.
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Harsh Jain <[email protected]>
commit add92a817e60e308a419693413a38d9d1e663aff upstream.
Update PCI Id in "cpl_rx_phys_dsgl" header. In case pci_chan_id and tx_chan_id are not derived from same queue, H/W can send request completion indication before completing DMA Transfer.
Herbert, It would be good if fix can be merge to stable tree. For 4.14 kernel, It requires some update to avoid mege conficts.
--- drivers/crypto/chelsio/chcr_algo.c | 32 ++++++++++++++++++++++---------- drivers/crypto/chelsio/chcr_crypto.h | 2 ++ 2 files changed, 24 insertions(+), 10 deletions(-)
drivers/crypto/chelsio/chcr_algo.c +22 -10
@@ -367,7 +367,8 @@ static inline void dsgl_walk_init(struct walk->to = (struct phys_sge_pairs *)(dsgl +1 ); } -static inline void dsgl_walk_end (struct dsgl_walk *walk,unsigned short qid) +static inline void dsgl_walk_end (struct dsgl_walk *walk,unsigned short qid, +int pci_chan_id) {struct cpl_rx_phys_dsgl *phys_cpl;
@@ -385,6 +386,7 @@ static inline void dsgl_walk_end(struct phys_cpl->rss_hdr_int.opcode =CPL_RX_PHYS_ADDR ; phys_cpl->rss_hdr_int.qid =htons (qid); phys_cpl->rss_hdr_int.hash_val =0 ; + phys_cpl->rss_hdr_int.channel = pci_chan_id; } static inline void dsgl_walk_add_page(struct dsgl_walk *walk,
@@ -718,7 +720,7 @@ static inline void create_wreq(struct chFILL_WR_RX_Q_ID (ctx->dev->rx_channel_id, qid, !!lcb, ctx->tx_qidx); - chcr_req->ulptx.cmd_dest =FILL_ULPTX_CMD_DEST (ctx->dev->tx_channel_id, + chcr_req->ulptx.cmd_dest =FILL_ULPTX_CMD_DEST (ctx->tx_chan_id, qid); chcr_req->ulptx.len =htonl ((DIV_ROUND_UP (len16,16 ) - ((sizeof (chcr_req->wreq)) >>4 )));
@@ -1339,16 +1341,23 @@ static int chcr_device_init(struct chcr_ adap->vres.ncrypto_fc); rxq_perchan = u_ctx->lldi.nrxq / u_ctx->lldi.nchan; txq_perchan = ntxq / u_ctx->lldi.nchan; - rxq_idx = ctx->dev->tx_channel_id * rxq_perchan; - rxq_idx += id % rxq_perchan; - txq_idx = ctx->dev->tx_channel_id * txq_perchan; - txq_idx += id % txq_perchan;spin_lock (&ctx->dev->lock_chcr_dev); - ctx->rx_qidx = rxq_idx; - ctx->tx_qidx = txq_idx; + ctx->tx_chan_id = ctx->dev->tx_channel_id; ctx->dev->tx_channel_id = !ctx->dev->tx_channel_id; ctx->dev->rx_channel_id =0 ;spin_unlock (&ctx->dev->lock_chcr_dev); + rxq_idx = ctx->tx_chan_id * rxq_perchan; + rxq_idx += id % rxq_perchan; + txq_idx = ctx->tx_chan_id * txq_perchan; + txq_idx += id % txq_perchan; + ctx->rx_qidx = rxq_idx; + ctx->tx_qidx = txq_idx; +/* Channel Id used by SGE to forward packet to Host. +* Same value should be used in cpl_fw6_pld RSS_CH field +* by FW. Driver programs PCI channel ID to be used in fw +* at the time of queue allocation with value "pi->tx_chan" +*/ + ctx->pci_chan_id = txq_idx / txq_perchan; } out:return err;
@@ -2503,6 +2512,7 @@ void chcr_add_aead_dst_ent(struct aead_rstruct crypto_aead *tfm =crypto_aead_reqtfm (req);struct dsgl_walk dsgl_walk;unsigned int authsize =crypto_aead_authsize (tfm); +struct chcr_context *ctx =a_ctx (tfm);u32 temp;dsgl_walk_init (&dsgl_walk, phys_cpl);
@@ -2512,7 +2522,7 @@ void chcr_add_aead_dst_ent(struct aead_rdsgl_walk_add_page (&dsgl_walk,IV , &reqctx->iv_dma); temp = req->cryptlen + (reqctx->op ? -authsize : authsize);dsgl_walk_add_sg (&dsgl_walk, req->dst, temp, req->assoclen); -dsgl_walk_end (&dsgl_walk, qid); +dsgl_walk_end (&dsgl_walk, qid, ctx->pci_chan_id); } void chcr_add_cipher_src_ent(struct ablkcipher_request *req,
@@ -2544,6 +2554,8 @@ void chcr_add_cipher_dst_ent(struct ablk unsigned short qid) {struct chcr_blkcipher_req_ctx *reqctx =ablkcipher_request_ctx (req); +struct crypto_ablkcipher *tfm =crypto_ablkcipher_reqtfm (wrparam->req); +struct chcr_context *ctx =c_ctx (tfm);struct dsgl_walk dsgl_walk;dsgl_walk_init (&dsgl_walk, phys_cpl);
@@ -2552,7 +2564,7 @@ void chcr_add_cipher_dst_ent(struct ablk reqctx->dstsg = dsgl_walk.last_sg; reqctx->dst_ofst = dsgl_walk.last_sg_len; -dsgl_walk_end (&dsgl_walk, qid); +dsgl_walk_end (&dsgl_walk, qid, ctx->pci_chan_id); } void chcr_add_hash_src_ent(struct ahash_request *req,
drivers/crypto/chelsio/chcr_crypto.h +2 -0
@@ -255,6 +255,8 @@ struct chcr_context {struct chcr_dev *dev;unsigned char tx_qidx;unsigned char rx_qidx; +unsigned char tx_chan_id; +unsigned char pci_chan_id;struct __crypto_ctx crypto_ctx[0 ]; };
Greg Kroah-Hartman
maintainerPATCH 160/168 crypto: mxs-dcp - Fix wait logic on chan threads
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leonard Crestez <[email protected]>
commit d80771c08363ad7fbf0f56f5301e7ca65065c582 upstream.
When compiling with CONFIG_DEBUG_ATOMIC_SLEEP=y the mxs-dcp driver prints warnings such as:
WARNING: CPU: 0 PID: 120 at kernel/sched/core.c:7736 __might_sleep+0x98/0x9c do not call blocking ops when !TASK_RUNNING; state=1 set at [<8081978c>] dcp_chan_thread_sha+0x3c/0x2ec
The problem is that blocking ops will manipulate current->state themselves so it is not allowed to call them between set_current_state(TASK_INTERRUPTIBLE) and schedule().
Fix this by converting the per-chan mutex to a spinlock (it only protects tiny list ops anyway) and rearranging the wait logic so that callbacks are called current->state as TASK_RUNNING. Those callbacks will indeed call blocking ops themselves so this is required.
--- drivers/crypto/mxs-dcp.c | 53 ++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 23 deletions(-)
drivers/crypto/mxs-dcp.c +30 -23
@@ -63,7 +63,7 @@ struct dcp {struct dcp_coherent_block *coh;struct completion completion[DCP_MAX_CHANS ]; -struct mutex mutex[DCP_MAX_CHANS ]; +spinlock_t lock[DCP_MAX_CHANS ];struct task_struct *thread[DCP_MAX_CHANS ];struct crypto_queue queue[DCP_MAX_CHANS ]; };
@@ -349,13 +349,20 @@ static int dcp_chan_thread_aes(void *datint ret; - do { - __set_current_state(TASK_INTERRUPTIBLE); +while (!kthread_should_stop ()) { +set_current_state (TASK_INTERRUPTIBLE ); - mutex_lock(&sdcp->mutex[chan]); +spin_lock (&sdcp->lock[chan]); backlog =crypto_get_backlog (&sdcp->queue[chan]); arq =crypto_dequeue_request (&sdcp->queue[chan]); - mutex_unlock(&sdcp->mutex[chan]); +spin_unlock (&sdcp->lock[chan]); + +if (!backlog && !arq) { +schedule (); +continue ; + } + +set_current_state (TASK_RUNNING );if (backlog) backlog->complete (backlog, -EINPROGRESS );
@@ -363,11 +370,8 @@ static int dcp_chan_thread_aes(void *datif (arq) { ret =mxs_dcp_aes_block_crypt (arq); arq->complete (arq, ret); -continue ; } - -schedule (); - }while (!kthread_should_stop ()); + }return 0 ; }
@@ -409,9 +413,9 @@ static int mxs_dcp_aes_enqueue(struct ab rctx->ecb = ecb; actx->chan =DCP_CHAN_CRYPTO ; -mutex_lock (&sdcp->mutex[actx->chan]); +spin_lock (&sdcp->lock[actx->chan]); ret =crypto_enqueue_request (&sdcp->queue[actx->chan], &req->base); -mutex_unlock (&sdcp->mutex[actx->chan]); +spin_unlock (&sdcp->lock[actx->chan]);wake_up_process (sdcp->thread[actx->chan]);
@@ -640,13 +644,20 @@ static int dcp_chan_thread_sha(void *datstruct ahash_request *req;int ret, fini; - do { - __set_current_state(TASK_INTERRUPTIBLE); +while (!kthread_should_stop ()) { +set_current_state (TASK_INTERRUPTIBLE ); - mutex_lock(&sdcp->mutex[chan]); +spin_lock (&sdcp->lock[chan]); backlog =crypto_get_backlog (&sdcp->queue[chan]); arq =crypto_dequeue_request (&sdcp->queue[chan]); - mutex_unlock(&sdcp->mutex[chan]); +spin_unlock (&sdcp->lock[chan]); + +if (!backlog && !arq) { +schedule (); +continue ; + } + +set_current_state (TASK_RUNNING );if (backlog) backlog->complete (backlog, -EINPROGRESS );
@@ -658,12 +669,8 @@ static int dcp_chan_thread_sha(void *dat ret =dcp_sha_req_to_buf (arq); fini = rctx->fini; arq->complete (arq, ret); -if (!fini) -continue ; } - -schedule (); - }while (!kthread_should_stop ()); + }return 0 ; }
@@ -721,9 +728,9 @@ static int dcp_sha_update_fx(struct ahas rctx->init =1 ; } -mutex_lock (&sdcp->mutex[actx->chan]); +spin_lock (&sdcp->lock[actx->chan]); ret =crypto_enqueue_request (&sdcp->queue[actx->chan], &req->base); -mutex_unlock (&sdcp->mutex[actx->chan]); +spin_unlock (&sdcp->lock[actx->chan]);wake_up_process (sdcp->thread[actx->chan]);mutex_unlock (&actx->mutex);
@@ -997,7 +1004,7 @@ static int mxs_dcp_probe(struct platformplatform_set_drvdata (pdev, sdcp);for (i =0 ; i <DCP_MAX_CHANS ; i++) { -mutex_init (&sdcp->mutex[i]); +spin_lock_init (&sdcp->lock[i]);init_completion (&sdcp->completion[i]);crypto_init_queue (&sdcp->queue[i],50 ); }
Greg Kroah-Hartman
maintainerPATCH 161/168 crypto: caam/jr - fix ablkcipher_edesc pointer arithmetic
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Horia Geantă <[email protected]>
commit 13cc6f48c7434ce46ba6dbc90003a136a263d75a upstream.
In some cases the zero-length hw_desc array at the end of ablkcipher_edesc struct requires for 4B of tail padding.
Due to tail padding and the way pointers to S/G table and IV are computed:
edesc->sec4_sg = (void *)edesc + sizeof(struct ablkcipher_edesc) + desc_bytes; iv = (u8 *)edesc->hw_desc + desc_bytes + sec4_sg_bytes;
first 4 bytes of IV are overwritten by S/G table.
Update computation of pointer to S/G table to rely on offset of hw_desc member and not on sizeof() operator.
--- drivers/crypto/caam/caamalg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/crypto/caam/caamalg.c +4 -4
@@ -1553,8 +1553,8 @@ static struct ablkcipher_edesc *ablkciph edesc->src_nents = src_nents; edesc->dst_nents = dst_nents; edesc->sec4_sg_bytes = sec4_sg_bytes; - edesc->sec4_sg = (void *)edesc +sizeof (struct ablkcipher_edesc ) + - desc_bytes; + edesc->sec4_sg = (struct sec4_sg_entry *)((u8 *)edesc->hw_desc + + desc_bytes); edesc->iv_dir =DMA_TO_DEVICE ;/* Make sure IV is located in a DMAable area */
@@ -1757,8 +1757,8 @@ static struct ablkcipher_edesc *ablkciph edesc->src_nents = src_nents; edesc->dst_nents = dst_nents; edesc->sec4_sg_bytes = sec4_sg_bytes; - edesc->sec4_sg = (void *)edesc +sizeof (struct ablkcipher_edesc ) + - desc_bytes; + edesc->sec4_sg = (struct sec4_sg_entry *)((u8 *)edesc->hw_desc + + desc_bytes); edesc->iv_dir =DMA_FROM_DEVICE ;/* Make sure IV is located in a DMAable area */
Greg Kroah-Hartman
maintainerPATCH 162/168 gpiolib: Free the last requested descriptor
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda Delgado <[email protected]>
commit 19a4fbffc94e41abaa2a623a25ce2641d69eccf0 upstream.
The current code only frees N-1 gpios if an error occurs during gpiod_set_transitory, gpiod_direction_output or gpiod_direction_input. Leading to gpios that cannot be used by userspace nor other drivers.
--- drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpiolib.c +1 -1
@@ -565,7 +565,7 @@ static int linehandle_create(struct gpioif (ret) goto out_free_descs; lh->descs[i] = desc; - count = i; + count = i +1 ;if (lflags &GPIOHANDLE_REQUEST_ACTIVE_LOW )set_bit (FLAG_ACTIVE_LOW , &desc->flags);
Greg Kroah-Hartman
maintainerPATCH 163/168 Drivers: hv: vmbus: Use get/put_cpu() in vmbus_connect()
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dexuan Cui <[email protected]>
commit 41e270f6898e7502be9fd6920ee0a108ca259d36 upstream.
With CONFIG_DEBUG_PREEMPT=y, I always see this warning:
BUG: using smp_processor_id() in preemptible [00000000]
Fix the false warning by using get/put_cpu().
Here vmbus_connect() sends a message to the host and waits for the host's response. The host will deliver the response message and an interrupt on CPU msg->target_vcpu, and later the interrupt handler will wake up vmbus_connect(). vmbus_connect() doesn't really have to run on the same cpu as CPU msg->target_vcpu, so it's safe to call put_cpu() just here.
--- drivers/hv/connection.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/hv/connection.c +5 -3
@@ -76,6 +76,7 @@ static int vmbus_negotiate_version(struc __u32 version) {int ret =0 ; +unsigned int cur_cpu;struct vmbus_channel_initiate_contact *msg;unsigned long flags;
@@ -118,9 +119,10 @@ static int vmbus_negotiate_version(struc* the CPU attempting to connect may not be CPU 0. */ if (version >=VERSION_WIN8_1 ) { - msg->target_vcpu = -hv_cpu_number_to_vp_number (smp_processor_id ()); - vmbus_connection.connect_cpu =smp_processor_id (); + cur_cpu =get_cpu (); + msg->target_vcpu =hv_cpu_number_to_vp_number (cur_cpu); + vmbus_connection.connect_cpu = cur_cpu; +put_cpu (); }else { msg->target_vcpu =0 ; vmbus_connection.connect_cpu =0 ;
Greg Kroah-Hartman
maintainerPATCH 164/168 tools: hv: fcopy: set error in case an unknown operation was requested
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vitaly Kuznetsov <[email protected]>
commit c2d68afba86d1ff01e7300c68bc16a9234dcd8e9 upstream.
'error' variable is left uninitialized in case we see an unknown operation. As we don't immediately return and proceed to pwrite() we need to set it to something, HV_E_FAIL sounds good enough.
--- tools/hv/hv_fcopy_daemon.c | 1 + 1 file changed, 1 insertion(+)
tools/hv/hv_fcopy_daemon.c +1 -0
@@ -234,6 +234,7 @@ int main(int argc, char *argv[])break ;default : + error =HV_E_FAIL ;syslog (LOG_ERR ,"Unknown operation: %d" , buffer.hdr.operation);
Greg Kroah-Hartman
maintainerPATCH 165/168 proc: restrict kernel stack dumps to root
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jann Horn <[email protected]>
commit f8a00cef17206ecd1b30d3d9f99e10d9fa707aa7 upstream.
Currently, you can use /proc/self/task/*/stack to cause a stack walk on a task you control while it is running on another CPU. That means that the stack can change under the stack walker. The stack walker does have guards against going completely off the rails and into random kernel memory, but it can interpret random data from your kernel stack as instruction pointers and stack pointers. This can cause exposure of kernel stack contents to userspace.
Restrict the ability to inspect kernel stacks of arbitrary tasks to root in order to prevent a local attacker from exploiting racy stack unwinding to leak kernel task stack contents. See the added comment for a longer rationale.
There don't seem to be any users of this userspace API that can't gracefully bail out if reading from the file fails. Therefore, I believe that this change is unlikely to break things. In the case that this patch does end up needing a revert, the next-best solution might be to fake a single-entry stack based on wchan.
--- fs/proc/base.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
fs/proc/base.c +14 -0
@@ -407,6 +407,20 @@ static int proc_pid_stack(struct seq_filunsigned long *entries;int err; +/* +* The ability to racily run the kernel stack unwinder on a running task +* and then observe the unwinder output is scary; while it is useful for +* debugging kernel issues, it can also allow an attacker to leak kernel +* stack contents. +* Doing this in a manner that is at least safe from races would require +* some work to ensure that the remote task can not be scheduled; and +* even then, this would still expose the unwinder as local attack +* surface. +* Therefore, this interface is restricted to root. +*/ +if (!file_ns_capable (m->file, &init_user_ns,CAP_SYS_ADMIN )) +return -EACCES ; + entries =kmalloc_array (MAX_STACK_TRACE_DEPTH ,sizeof (*entries),GFP_KERNEL );if (!entries)
Greg Kroah-Hartman
maintainerPATCH 166/168 ocfs2: fix locking for res->tracking and dlm->tracking_list
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ashish Samant <[email protected]>
commit cbe355f57c8074bc4f452e5b6e35509044c6fa23 upstream.
In dlm_init_lockres() we access and modify res->tracking and dlm->tracking_list without holding dlm->track_lock. This can cause list corruptions and can end up in kernel panic.
Fix this by locking res->tracking and dlm->tracking_list with dlm->track_lock instead of dlm->spinlock.
--- fs/ocfs2/dlm/dlmmaster.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/ocfs2/dlm/dlmmaster.c +2 -2
@@ -584,9 +584,9 @@ static void dlm_init_lockres(struct dlm_ res->last_used =0 ; -spin_lock (&dlm->spinlock); +spin_lock (&dlm->track_lock);list_add_tail (&res->tracking, &dlm->tracking_list); -spin_unlock (&dlm->spinlock); +spin_unlock (&dlm->track_lock);memset (res->lvb,0 ,DLM_LVB_LEN );memset (res->refmap,0 ,sizeof (res->refmap));
Greg Kroah-Hartman
maintainerPATCH 167/168 HID: i2c-hid: disable runtime PM operations on hantick touchpad
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anisse Astier <[email protected]>
commit 807588ac92018bde88a1958f546438e840eb0158 upstream.
This hantick HTIX5288 touchpad can quickly fall in a wrong state if there are too many open/close operations. This will either make it stop reporting any input, or will shift all the input reads by a few bytes, making it impossible to decode.
Here, we never release the probed touchpad runtime pm while the driver is loaded, which should disable all runtime pm suspend/resumes.
This fast repetition of sleep/wakeup is also more likely to happen when using runtime PM, which is why the quirk is done there, and not for all power downs, which would include suspend or module removal.
--- drivers/hid/i2c-hid/i2c-hid.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/hid/i2c-hid/i2c-hid.c +8 -3
@@ -48,6 +48,7 @@#define I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV BIT(0)#define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1)#define I2C_HID_QUIRK_RESEND_REPORT_DESCR BIT(2) +#define I2C_HID_QUIRK_NO_RUNTIME_PM BIT(3)/* flags */ #define I2C_HID_STARTED 0
@@ -169,7 +170,8 @@ static const struct i2c_hid_quirks { {USB_VENDOR_ID_WEIDA ,USB_DEVICE_ID_WEIDA_8755 , I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV }, { I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288, - I2C_HID_QUIRK_NO_IRQ_AFTER_RESET }, +I2C_HID_QUIRK_NO_IRQ_AFTER_RESET | + I2C_HID_QUIRK_NO_RUNTIME_PM }, { USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS10FB_TOUCH, I2C_HID_QUIRK_RESEND_REPORT_DESCR }, { 0, 0 }
@@ -1106,7 +1108,9 @@ static int i2c_hid_probe(struct i2c_clie goto err_mem_free; } -pm_runtime_put (&client->dev); +if (!(ihid->quirks &I2C_HID_QUIRK_NO_RUNTIME_PM )) +pm_runtime_put (&client->dev); +return 0 ; err_mem_free:
@@ -1132,7 +1136,8 @@ static int i2c_hid_remove(struct i2c_clistruct i2c_hid *ihid =i2c_get_clientdata (client);struct hid_device *hid; -pm_runtime_get_sync (&client->dev); +if (!(ihid->quirks &I2C_HID_QUIRK_NO_RUNTIME_PM )) +pm_runtime_get_sync (&client->dev);pm_runtime_disable (&client->dev);pm_runtime_set_suspended (&client->dev);pm_runtime_put_noidle (&client->dev);
Greg Kroah-Hartman
maintainerPATCH 168/168 ixgbe: check return value of napi_complete_done()
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Song Liu <[email protected]>
commit 4233cfe6ec4683497d7318f55ce7617e97f2e610 upstream.
The NIC driver should only enable interrupts when napi_complete_done() returns true. This patch adds the check for ixgbe.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +7 -5
@@ -3196,11 +3196,13 @@ int ixgbe_poll(struct napi_struct *napi,return budget;/* all work done, exit the polling mode */ -napi_complete_done (napi, work_done); -if (adapter->rx_itr_setting &1 ) -ixgbe_set_itr (q_vector); -if (!test_bit (__IXGBE_DOWN, &adapter->state)) -ixgbe_irq_enable_queues (adapter,BIT_ULL (q_vector->v_idx)); +if (likely (napi_complete_done (napi, work_done))) { +if (adapter->rx_itr_setting &1 ) +ixgbe_set_itr (q_vector); +if (!test_bit (__IXGBE_DOWN, &adapter->state)) +ixgbe_irq_enable_queues (adapter, +BIT_ULL (q_vector->v_idx)); + }return min (work_done, budget -1 ); }
Shuah Khan
maintainerQuoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed Oct 10 17:55:44 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.18.13-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.18.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Greg Kroah-Hartman
maintainerQuoted 15 lines · Shuah Khan
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed Oct 10 17:55:44 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.18.13-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.18.y
and the diffstat can be found below.
Quoted 6 lines
Quoted 4 lines
thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks for testing all 4 of these and letting me know.
greg k-h
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CC [M] net/ipv4/netfilter/nf_conntrack_proto_icmp.onet/ipv4/netfilter/nf_conntrack_proto_icmp.c:373:3: error: ‘const struct nf_conntrack_l4proto’ has no member named ‘ctnl_timeout’; did you mean ‘get_timeouts’?
.ctnl_timeout = {
^~~~~~~~~~~~
get_timeouts
The problematic patch is:> netfilter-conntrack-timeout-interface-depend-on-config_nf_conntrack_timeout.patch
The stuff the commit message talks about seems like it was added in 4.19-rc1, so this should not go into stable.
Kernel builds fine with this one patch reverted.
Greg Kroah-Hartman
maintainerQuoted 14 lines · Andre Tomt
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CC [M]
net/ipv4/netfilter/nf_conntrack_proto_icmp.onet/ipv4/netfilter/nf_conntrack_proto_icmp.c:373:3: error: ‘const struct nf_conntrack_l4proto’ has no member named ‘ctnl_timeout’; did you mean ‘get_timeouts’?.ctnl_timeout = { ^~~~~~~~~~~~ get_timeouts
Quoted 6 lines
The problematic patch is:> netfilter-conntrack-timeout-interface-depend-on-config_nf_conntrack_timeout.patch
The stuff the commit message talks about seems like it was added in 4.19-rc1, so this should not go into stable.
Kernel builds fine with this one patch reverted.
So you have CONFIG_NF_CT_NETLINK_TIMEOUT enabled but not CONFIG_NF_NETLINK_TIMEOUT? Looks like we just need to modify the .h file to fix this up properly, right?
This isn't showing up in my build tests as that configuration seems a bit odd to me.
thanks,
greg k-h
Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Andre Tomt
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CC [M]
net/ipv4/netfilter/nf_conntrack_proto_icmp.onet/ipv4/netfilter/nf_conntrack_proto_icmp.c:373:3: error: ‘const struct nf_conntrack_l4proto’ has no member named ‘ctnl_timeout’; did you mean ‘get_timeouts’?.ctnl_timeout = { ^~~~~~~~~~~~ get_timeoutsThe problematic patch is:> netfilter-conntrack-timeout-interface-depend-on-config_nf_conntrack_timeout.patch
Quoted 8 lines
Quoted 4 lines
The stuff the commit message talks about seems like it was added in 4.19-rc1, so this should not go into stable.
Kernel builds fine with this one patch reverted.
So you have
CONFIG_NF_CT_NETLINK_TIMEOUTenabled but notCONFIG_NF_NETLINK_TIMEOUT? Looks like we just need to modify the .h file to fix this up properly, right?
Adding Pablo to the thread as I dont know
Quoted 2 lines
This isn't showing up in my build tests as that configuration seems a bit odd to me.
I think you meant CONFIG_NF_CONNTRACK_TIMEOUT instead of CONFIG_NF_NETLINK_TIMEOUT?
This is the configuration:CONFIG_NF_CONNTRACK_TIMEOUT=y
# CONFIG_NF_CT_NETLINK_TIMEOUT is not set
Quoted 32 lines · Andre Tomt
Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Andre Tomt
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CC [M]
net/ipv4/netfilter/nf_conntrack_proto_icmp.onet/ipv4/netfilter/nf_conntrack_proto_icmp.c:373:3: error: ‘const struct nf_conntrack_l4proto’ has no member named ‘ctnl_timeout’; did you mean ‘get_timeouts’?.ctnl_timeout = { ^~~~~~~~~~~~ get_timeoutsThe problematic patch is:> netfilter-conntrack-timeout-interface-depend-on-config_nf_conntrack_timeout.patch
Quoted 8 lines
Quoted 4 lines
The stuff the commit message talks about seems like it was added in 4.19-rc1, so this should not go into stable.
Kernel builds fine with this one patch reverted.
So you have
CONFIG_NF_CT_NETLINK_TIMEOUTenabled but notCONFIG_NF_NETLINK_TIMEOUT? Looks like we just need to modify the .h file to fix this up properly, right?Adding Pablo to the thread as I dont know
Quoted 2 lines
This isn't showing up in my build tests as that configuration seems a bit odd to me.
Quoted 6 lines
I think you meant
CONFIG_NF_CONNTRACK_TIMEOUTinstead ofCONFIG_NF_NETLINK_TIMEOUT?This is the configuration:
CONFIG_NF_CONNTRACK_TIMEOUT=y
#CONFIG_NF_CT_NETLINK_TIMEOUTis not set
upstream commit a874752a10da113f513980e28f562d946d3f829d depends on:
commit 6c1fd7dc489d9bf64196f5b0fa33e059f64460c8
Author: Pablo Neira Ayuso <[email protected]> Date: Tue Aug 7 17:14:15 2018 +0200
netfilter: cttimeout: decouple timeout policy from nfnetlink_cttimeout object
So I would suggest to keep it back / not place it 4.18.x stable.
Thanks.
Quoted 42 lines · Pablo Neira Ayuso
Quoted 32 lines · Andre Tomt
Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Andre Tomt
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CC [M]
net/ipv4/netfilter/nf_conntrack_proto_icmp.onet/ipv4/netfilter/nf_conntrack_proto_icmp.c:373:3: error: ‘const struct nf_conntrack_l4proto’ has no member named ‘ctnl_timeout’; did you mean ‘get_timeouts’?.ctnl_timeout = { ^~~~~~~~~~~~ get_timeoutsThe problematic patch is:> netfilter-conntrack-timeout-interface-depend-on-config_nf_conntrack_timeout.patch
Quoted 8 lines
Quoted 4 lines
The stuff the commit message talks about seems like it was added in 4.19-rc1, so this should not go into stable.
Kernel builds fine with this one patch reverted.
So you have
CONFIG_NF_CT_NETLINK_TIMEOUTenabled but notCONFIG_NF_NETLINK_TIMEOUT? Looks like we just need to modify the .h file to fix this up properly, right?Adding Pablo to the thread as I dont know
Quoted 2 lines
This isn't showing up in my build tests as that configuration seems a bit odd to me.
Quoted 6 lines
I think you meant
CONFIG_NF_CONNTRACK_TIMEOUTinstead ofCONFIG_NF_NETLINK_TIMEOUT?This is the configuration:
CONFIG_NF_CONNTRACK_TIMEOUT=y
#CONFIG_NF_CT_NETLINK_TIMEOUTis not setupstream commit
a874752a10da113f513980e28f562d946d3f829ddepends on:
Quoted 7 lines
commit
6c1fd7dc489d9bf64196f5b0fa33e059f64460c8Author: Pablo Neira Ayuso <[email protected]> Date: Tue Aug 7 17:14:15 2018 +0200netfilter: cttimeout: decouple timeout policy from
nfnetlink_cttimeoutobjectSo I would suggest to keep it back / not place it 4.18.x stable.
Hm, actually, a874752a10da113f513980e28f562d946d3f829 depends on:
commit ad83f2a9ce37a264202f48f4fd8889ee9056b703
Author: Pablo Neira Ayuso <[email protected]> Date: Tue Aug 7 17:14:19 2018 +0200
netfilter: remove ifdef around cttimeout in struct nf_conntrack_l4proto
Not the one I mentioned above.
Greg Kroah-Hartman
maintainerQuoted 53 lines · Pablo Neira Ayuso
Quoted 42 lines · Pablo Neira Ayuso
Quoted 32 lines · Andre Tomt
Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Andre Tomt
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CC [M]
net/ipv4/netfilter/nf_conntrack_proto_icmp.onet/ipv4/netfilter/nf_conntrack_proto_icmp.c:373:3: error: ‘const struct nf_conntrack_l4proto’ has no member named ‘ctnl_timeout’; did you mean ‘get_timeouts’?.ctnl_timeout = { ^~~~~~~~~~~~ get_timeoutsThe problematic patch is:> netfilter-conntrack-timeout-interface-depend-on-config_nf_conntrack_timeout.patch
Quoted 8 lines
Quoted 4 lines
The stuff the commit message talks about seems like it was added in 4.19-rc1, so this should not go into stable.
Kernel builds fine with this one patch reverted.
So you have
CONFIG_NF_CT_NETLINK_TIMEOUTenabled but notCONFIG_NF_NETLINK_TIMEOUT? Looks like we just need to modify the .h file to fix this up properly, right?Adding Pablo to the thread as I dont know
Quoted 2 lines
This isn't showing up in my build tests as that configuration seems a bit odd to me.
Quoted 6 lines
I think you meant
CONFIG_NF_CONNTRACK_TIMEOUTinstead ofCONFIG_NF_NETLINK_TIMEOUT?This is the configuration:
CONFIG_NF_CONNTRACK_TIMEOUT=y
#CONFIG_NF_CT_NETLINK_TIMEOUTis not setupstream commit
a874752a10da113f513980e28f562d946d3f829ddepends on:Quoted 7 lines
commit
6c1fd7dc489d9bf64196f5b0fa33e059f64460c8Author: Pablo Neira Ayuso <[email protected]> Date: Tue Aug 7 17:14:15 2018 +0200netfilter: cttimeout: decouple timeout policy from
nfnetlink_cttimeoutobjectSo I would suggest to keep it back / not place it 4.18.x stable.
Hm, actually,
a874752a10da113f513980e28f562d946d3f829depends on:
Quoted 7 lines
commit
ad83f2a9ce37a264202f48f4fd8889ee9056b703Author: Pablo Neira Ayuso <[email protected]> Date: Tue Aug 7 17:14:19 2018 +0200netfilter: remove ifdef around cttimeout in struct
nf_conntrack_l4protoNot the one I mentioned above.
Thanks for the info, I've now dropped this from both 4.14.y and 4.18.y.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 7 lines
Responses should be made by Wed Oct 10 17:55:44 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.18.13-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.18.y
-rc2 is out to resolve some reported issues:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.18.13-rc2.gz
Quoted 10 lines · Greg Kroah-Hartman
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed Oct 10 17:55:44 UTC 2018. Anything received after that time might be too late.
Quoted 8 lines
Quoted 4 lines
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.18.13-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.18.y-rc2 is out to resolve some reported issues:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.18.13-rc2.gz
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
NOTE: Now the reports gets regressions and fixes.
Summary
------------------------------------------------------------------------
kernel: 4.18.13-rc2
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.18.y
git commit: 5492998ebf547be45246ae72220e9429e329e05f
git describe: v4.18.12-169-g5492998ebf54
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.18-oe/build/v4.18.12-169-g5492998ebf54
No regressions (compared to build v4.18.12)
No fixes (compared to build v4.18.12)
Ran 20171 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64
Test Suites
-----------
* boot
* kselftest
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-containers-tests
* ltp-cve-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-timers-tests
* ltp-open-posix-tests
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 17 lines · Naresh Kamboju
Quoted 15 lines · Greg Kroah-Hartman
Quoted 12 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed Oct 10 17:55:44 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.18.13-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.18.y
Quoted 8 lines
Quoted 3 lines
-rc2 is out to resolve some reported issues:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.18.13-rc2.gzResults from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.NOTE: Now the reports gets regressions and fixes.
Great, thanks for testing all of these and letting me know.
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.13 release. There are 168 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed Oct 10 17:55:44 UTC 2018. Anything received after that time might be too late.
Build results:
total: 136 pass: 136 fail: 0 Qemu test results: total: 321 pass: 321 fail: 0
Details are available at https://kerneltests.org/builders/.
Guenter