4.20.13-stable review
Subsystems (8)
Greg Kroah-Hartman
maintainerPATCH 142/183 net_sched: fix two more memory leaks in cls_tcindex
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cong Wang <[email protected]>
[ Upstream commit 1db817e75f5b9387b8db11e37d5f0624eb9223e0 ]
struct tcindex_filter_result contains two parts:
struct tcf_exts and struct tcf_result.
For the local variable 'cr', its exts part is never used but initialized without being released properly on success path. So just completely remove the exts part to fix this leak.
For the local variable 'new_filter_result', it is never properly released if not used by 'r' on success path.
--- net/sched/cls_tcindex.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
net/sched/cls_tcindex.c +7 -9
@@ -304,9 +304,9 @@ tcindex_set_parms(struct net *net, struc struct nlattr *est, bool ovr, struct netlink_ext_ack *extack) { struct tcindex_filter_result new_filter_result, *old_r = r; -struct tcindex_filter_result cr;struct tcindex_data *cp =NULL , *oldp;struct tcindex_filter *f =NULL ;/* make gcc behave */ +struct tcf_result cr = {};int err, balloc =0 ;struct tcf_exts e;
@@ -347,11 +347,8 @@ tcindex_set_parms(struct net *net, struc err =tcindex_filter_result_init (&new_filter_result);if (err <0 ) goto errout1; - err =tcindex_filter_result_init (&cr); -if (err <0 ) - goto errout1;if (old_r) - cr.res = r->res; + cr = r->res;if (tb[TCA_TCINDEX_HASH ]) cp->hash =nla_get_u32 (tb[TCA_TCINDEX_HASH ]);
@@ -442,8 +439,8 @@ tcindex_set_parms(struct net *net, struc }if (tb[TCA_TCINDEX_CLASSID ]) { - cr.res.classid =nla_get_u32 (tb[TCA_TCINDEX_CLASSID ]); -tcf_bind_filter (tp, &cr.res, base); + cr.classid =nla_get_u32 (tb[TCA_TCINDEX_CLASSID ]); +tcf_bind_filter (tp, &cr, base); }if (old_r && old_r != r) {
@@ -455,7 +452,7 @@ tcindex_set_parms(struct net *net, struc } oldp = p; - r->res = cr.res; + r->res = cr;tcf_exts_change (&r->exts, &e);rcu_assign_pointer (tp->root, cp);
@@ -474,6 +471,8 @@ tcindex_set_parms(struct net *net, struc ;/* nothing */ rcu_assign_pointer (*fp, f); + }else { +tcf_exts_destroy (&new_filter_result.exts); }if (oldp)
@@ -486,7 +485,6 @@ errout_alloc:else if (balloc ==2 )kfree (cp->h); errout1: -tcf_exts_destroy (&cr.exts);tcf_exts_destroy (&new_filter_result.exts); errout:kfree (cp);
Greg Kroah-Hartman
maintainerPATCH 143/183 net/mlx5e: FPGA, fix Innova IPsec TX offload data path performance
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raed Salem <[email protected]>
[ Upstream commit 82eaa1fa0448da1852d7b80832e67e80a08dcc27 ]
At Innova IPsec TX offload data path a special software parser metadata is used to pass some packet attributes to the hardware, this metadata is passed using the Ethernet control segment of a WQE (a HW descriptor) header.
The cited commit might nullify this header, hence the metadata is lost, this caused a significant performance drop during hw offloading operation.
Fix by restoring the metadata at the Ethernet control segment in case it was nullified.
--- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +6 -0
@@ -387,8 +387,14 @@ netdev_tx_t mlx5e_sq_xmit(struct mlx5e_t num_wqebbs =DIV_ROUND_UP (ds_cnt,MLX5_SEND_WQEBB_NUM_DS ); contig_wqebbs_room =mlx5_wq_cyc_get_contig_wqebbs (wq, pi);if (unlikely (contig_wqebbs_room < num_wqebbs)) { +#ifdef CONFIG_MLX5_EN_IPSEC +struct mlx5_wqe_eth_seg cur_eth = wqe->eth; +#endif mlx5e_fill_sq_frag_edge (sq, wq, pi, contig_wqebbs_room);mlx5e_sq_fetch_wqe (sq, &wqe, &pi); +#ifdef CONFIG_MLX5_EN_IPSEC + wqe->eth = cur_eth; +#endif }/* fill wqe */
Greg Kroah-Hartman
maintainerPATCH 144/183 net/mlx5e: XDP, fix redirect resources availability check
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Saeed Mahameed <[email protected]>
[ Upstream commit 407e17b1a69a51ba9a512a04342da56c1f931df4 ]
Currently mlx5 driver creates xdp redirect hw queues unconditionally on netdevice open, This is great until someone starts redirecting XDP traffic via ndo_xdp_xmit on mlx5 device and changes the device configuration at the same time, this might cause crashes, since the other device's napi is not aware of the mlx5 state change (resources un-availability).
To fix this we must synchronize with other devices napi's on the system. Added a new flag under mlx5e_priv to determine XDP TX resources are available, set/clear it up when necessary and use synchronize_rcu() when the flag is turned off, so other napi's are in-sync with it, before we actually cleanup the hw resources.
The flag is tested prior to committing to transmit on mlx5e_xdp_xmit, and it is sufficient to determine if it safe to transmit or not. The other two internal flags (MLX5E_STATE_OPENED and MLX5E_SQ_STATE_ENABLED) become unnecessary. Thus, they are removed from data path.
--- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 6 ++---- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | 17 +++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 ++ 4 files changed, 22 insertions(+), 4 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en.h +1 -0
@@ -636,6 +636,7 @@ enum {MLX5E_STATE_ASYNC_EVENTS_ENABLED ,MLX5E_STATE_OPENED ,MLX5E_STATE_DESTROYING , + MLX5E_STATE_XDP_TX_ENABLED, }; struct mlx5e_rqt {
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c +2 -4
@@ -262,7 +262,8 @@ int mlx5e_xdp_xmit(struct net_device *deint sq_num;int i; -if (unlikely (!test_bit (MLX5E_STATE_OPENED , &priv->state))) +/* this flag is sufficient, no need to test internal sq state */ +if (unlikely (!mlx5e_xdp_tx_is_enabled (priv)))return -ENETDOWN ;if (unlikely (flags & ~XDP_XMIT_FLAGS_MASK ))
@@ -275,9 +276,6 @@ int mlx5e_xdp_xmit(struct net_device *de sq = &priv->channels.c[sq_num]->xdpsq; -if (unlikely (!test_bit (MLX5E_SQ_STATE_ENABLED , &sq->state))) -return -ENETDOWN ; -for (i =0 ; i < n; i++) {struct xdp_frame *xdpf = frames[i];struct mlx5e_xdp_info xdpi;
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h +17 -0
@@ -49,6 +49,23 @@ bool mlx5e_xmit_xdp_frame(struct mlx5e_xint mlx5e_xdp_xmit (struct net_device *dev,int n,struct xdp_frame **frames,u32 flags); +static inline void mlx5e_xdp_tx_enable (struct mlx5e_priv *priv) +{ +set_bit (MLX5E_STATE_XDP_TX_ENABLED , &priv->state); +} + +static inline void mlx5e_xdp_tx_disable (struct mlx5e_priv *priv) +{ +clear_bit (MLX5E_STATE_XDP_TX_ENABLED , &priv->state); +/* let other device's napi(s) see our new state */ +synchronize_rcu (); +} + +static inline bool mlx5e_xdp_tx_is_enabled (struct mlx5e_priv *priv) +{ +return test_bit (MLX5E_STATE_XDP_TX_ENABLED , &priv->state); +} +static inline void mlx5e_xmit_xdp_doorbell (struct mlx5e_xdpsq *sq) {struct mlx5_wq_cyc *wq = &sq->wq;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +2 -0
@@ -2903,6 +2903,7 @@ void mlx5e_activate_priv_channels(structmlx5e_build_tx2sq_maps (priv);mlx5e_activate_channels (&priv->channels); +mlx5e_xdp_tx_enable (priv);netif_tx_start_all_queues (priv->netdev);if (MLX5_ESWITCH_MANAGER (priv->mdev))
@@ -2924,6 +2925,7 @@ void mlx5e_deactivate_priv_channels(stru*/ netif_tx_stop_all_queues (priv->netdev);netif_tx_disable (priv->netdev); +mlx5e_xdp_tx_disable (priv);mlx5e_deactivate_channels (&priv->channels); }
Greg Kroah-Hartman
maintainerPATCH 145/183 scsi: sd_zbc: Fix sd_zbc_report_zones() buffer allocation
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masato Suzuki <[email protected]>
commit 515ce60613128be7a176a8b82b20c7624f3b440d upstream.
The function sd_zbc_do_report_zones() issues a REPORT ZONES command with a buffer size calculated based on the number of zones requested by the caller. This value should however not exceed the capabilities of the hardware maximum command size, that is, should not exceed the max_hw_sectors limit of the device. This problem leads to failures of report zones commands when re-validating disks with some SAS HBAs.
Fix this by limiting a report zone command buffer size to the minimum of the device max_hw_sectors and calculated value based on the requested number of zones. This does not change the semantic of the report_zones file operation as report zones can always return less zone reports than requested. Short reports are handled using a loop execution of the report_zones file operation in the function blk_report_zones().
[Damien]
Before patch 'e76239a3748c ("block: add a report_zones method")', report zones buffer allocation was limited to max_sectors when allocated in blk_report_zones(). This however does not consider the actual format of the device reply which is interface dependent. Limiting the allocation based on the size of the expected reply format rather than the size of the array of generic sturct blkzone passed by blk_report_zones() makes more sense.
--- drivers/scsi/sd_zbc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/scsi/sd_zbc.c +5 -3
@@ -142,10 +142,12 @@ int sd_zbc_report_zones(struct gendisk *return -EOPNOTSUPP ;/* -* Get a reply buffer for the number of requested zones plus a header. -* For ATA, buffers must be aligned to 512B. +* Get a reply buffer for the number of requested zones plus a header, +* without exceeding the device maximum command size. For ATA disks, +* buffers must be aligned to 512B. */ - buflen =roundup ((nrz +1 ) *64 ,512 ); + buflen =min (queue_max_hw_sectors (disk->queue) <<9 , +roundup ((nrz +1 ) *64 ,512 )); buf =kmalloc (buflen, gfp_mask);if (!buf)return -ENOMEM ;
Greg Kroah-Hartman
maintainerPATCH 146/183 RDMA/srp: Rework SCSI device reset handling
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
commit 48396e80fb6526ea5ed267bd84f028bae56d2f9e upstream.
Since .scsi_done() must only be called after scsi_queue_rq() has finished, make sure that the SRP initiator driver does not call .scsi_done() while scsi_queue_rq() is in progress. Although invoking sg_reset -d while I/O is in progress works fine with kernel v4.20 and before, that is not the case with kernel v5.0-rc1. This patch avoids that the following crash is triggered with kernel v5.0-rc1:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000138 CPU: 0 PID: 360 Comm: kworker/0:1H Tainted: G B 5.0.0-rc1-dbg+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 Workqueue: kblockd blk_mq_run_work_fn RIP: 0010:blk_mq_dispatch_rq_list+0x116/0xb10 Call Trace: blk_mq_sched_dispatch_requests+0x2f7/0x300 __blk_mq_run_hw_queue+0xd6/0x180 blk_mq_run_work_fn+0x27/0x30 process_one_work+0x4f1/0xa20 worker_thread+0x67/0x5b0 kthread+0x1cf/0x1f0 ret_from_fork+0x24/0x30
--- drivers/infiniband/ulp/srp/ib_srp.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/infiniband/ulp/srp/ib_srp.c +0 -10
@@ -2942,7 +2942,6 @@ static int srp_reset_device(struct scsi_ {struct srp_target_port *target =host_to_target (scmnd->device->host);struct srp_rdma_ch *ch; -int i, j;u8 status;shost_printk (KERN_ERR , target->scsi_host,"SRP reset_device called\n" );
@@ -2954,15 +2953,6 @@ static int srp_reset_device(struct scsi_if (status)return FAILED ; -for (i =0 ; i < target->ch_count; i++) { - ch = &target->ch[i]; -for (j =0 ; j < target->req_ring_size; ++j) { -struct srp_request *req = &ch->req_ring[j]; - -srp_finish_req (ch, req, scmnd->device,DID_RESET <<16 ); - } - } -return SUCCESS ; }
Greg Kroah-Hartman
maintainerPATCH 147/183 KEYS: user: Align the payload buffer
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Biggers <[email protected]>
commit cc1780fc42c76c705dd07ea123f1143dc5057630 upstream.
Align the payload of "user" and "logon" keys so that users of the keyrings service can access it as a struct that requires more than 2-byte alignment. fscrypt currently does this which results in the read of fscrypt_key::size being misaligned as it needs 4-byte alignment.
Align to __alignof__(u64) rather than __alignof__(long) since in the future it's conceivable that people would use structs beginning with u64, which on some platforms would require more than 'long' alignment.
--- include/keys/user-type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/keys/user-type.h +1 -1
@@ -31,7 +31,7 @@struct user_key_payload {struct rcu_head rcu;/* RCU destructor */ unsigned short datalen;/* length of this data */ -char data[0 ];/* actual data */ +char data[0 ]__aligned(__alignof__(u64)) ;/* actual data */ };extern struct key_type key_type_user;
Greg Kroah-Hartman
maintainerPATCH 148/183 KEYS: always initialize keyring_index_key::desc_len
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Biggers <[email protected]>
commit ede0fa98a900e657d1fcd80b50920efc896c1a4c upstream.
syzbot hit the 'BUG_ON(index_key->desc_len == 0);' in __key_link_begin() called from construct_alloc_key() during sys_request_key(), because the length of the key description was never calculated.
The problem is that we rely on ->desc_len being initialized by search_process_keyrings(), specifically by search_nested_keyrings(). But, if the process isn't subscribed to any keyrings that never happens.
Fix it by always initializing keyring_index_key::desc_len as soon as the description is set, like we already do in some places.
The following program reproduces the BUG_ON() when it's run as root and no session keyring has been installed. If it doesn't work, try removing pam_keyinit.so from /etc/pam.d/login and rebooting.
#include <stdlib.h>
#include <unistd.h>
#include <keyutils.h>
int main(void)
{
int id = add_key("keyring", "syz", NULL, 0, KEY_SPEC_USER_KEYRING);
keyctl_setperm(id, KEY_OTH_WRITE);
setreuid(5000, 5000);
request_key("user", "desc", "", id);
}--- security/keys/keyring.c | 4 +--- security/keys/proc.c | 3 +-- security/keys/request_key.c | 1 + security/keys/request_key_auth.c | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-)
security/keys/keyring.c +1 -3
@@ -661,9 +661,6 @@ static bool search_nested_keyrings(strucBUG_ON ((ctx->flags &STATE_CHECKS ) ==0 || (ctx->flags &STATE_CHECKS ) ==STATE_CHECKS ); -if (ctx->index_key.description) - ctx->index_key.desc_len =strlen (ctx->index_key.description); -/* Check to see if this top-level keyring is what we are looking for * and whether it is valid or not. */
@@ -914,6 +911,7 @@ key_ref_t keyring_search(key_ref_t keyristruct keyring_search_context ctx = { .index_key.type = type, .index_key.description = description, + .index_key.desc_len =strlen (description), .cred =current_cred (), .match_data.cmp = key_default_cmp, .match_data.raw_data = description,
security/keys/proc.c +1 -2
@@ -166,8 +166,7 @@ static int proc_keys_show(struct seq_filint rc;struct keyring_search_context ctx = { - .index_key.type = key->type, - .index_key.description = key->description, + .index_key = key->index_key, .cred = m->file->f_cred, .match_data.cmp = lookup_user_key_possessed, .match_data.raw_data = key,
security/keys/request_key.c +1 -0
@@ -545,6 +545,7 @@ struct key *request_key_and_link(structstruct keyring_search_context ctx = { .index_key.type = type, .index_key.description = description, + .index_key.desc_len =strlen (description), .cred =current_cred (), .match_data.cmp = key_default_cmp, .match_data.raw_data = description,
security/keys/request_key_auth.c +1 -1
@@ -246,7 +246,7 @@ struct key *key_get_instantiation_authkestruct key *authkey;key_ref_t authkey_ref; -sprintf (description,"%x" , target_id); + ctx.index_key.desc_len =sprintf (description,"%x" , target_id); authkey_ref =search_process_keyrings (&ctx);
Greg Kroah-Hartman
maintainerPATCH 149/183 clk: at91: fix masterck name
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandre Belloni <[email protected]>
commit 65a91e2e597dea62a798a8b771edc44859037e7f upstream.
The master clock is actually named masterck earlier in the driver. Having "mck" in the parent list means that it can never be selected.
--- drivers/clk/at91/at91sam9x5.c | 2 +- drivers/clk/at91/sama5d2.c | 4 ++-- drivers/clk/at91/sama5d4.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/clk/at91/at91sam9x5.c +1 -1
@@ -210,7 +210,7 @@ static void __init at91sam9x5_pmc_setup( parent_names[1 ] ="mainck" ; parent_names[2 ] ="plladivck" ; parent_names[3 ] ="utmick" ; - parent_names[4 ] ="mck" ; + parent_names[4 ] ="masterck" ;for (i =0 ; i <2 ; i++) {char name[6 ];
drivers/clk/at91/sama5d2.c +2 -2
@@ -240,7 +240,7 @@ static void __init sama5d2_pmc_setup(str parent_names[1 ] ="mainck" ; parent_names[2 ] ="plladivck" ; parent_names[3 ] ="utmick" ; - parent_names[4 ] ="mck" ; + parent_names[4 ] ="masterck" ;for (i =0 ; i <3 ; i++) {char name[6 ];
@@ -291,7 +291,7 @@ static void __init sama5d2_pmc_setup(str parent_names[1 ] ="mainck" ; parent_names[2 ] ="plladivck" ; parent_names[3 ] ="utmick" ; - parent_names[4 ] ="mck" ; + parent_names[4 ] ="masterck" ; parent_names[5 ] ="audiopll_pmcck" ;for (i =0 ; i <ARRAY_SIZE (sama5d2_gck); i++) { hw = at91_clk_register_generated(regmap, &pmc_pcr_lock,
drivers/clk/at91/sama5d4.c +1 -1
@@ -207,7 +207,7 @@ static void __init sama5d4_pmc_setup(str parent_names[1 ] ="mainck" ; parent_names[2 ] ="plladivck" ; parent_names[3 ] ="utmick" ; - parent_names[4 ] ="mck" ; + parent_names[4 ] ="masterck" ;for (i =0 ; i <3 ; i++) {char name[6 ];
Greg Kroah-Hartman
maintainerPATCH 150/183 clk: at91: fix at91sam9x5 peripheral clock number
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandre Belloni <[email protected]>
commit 1b328a2e095a009518ebac05e937cc0fc242fede upstream.
nck() looks at the last id in an array and unfortunately, at91sam9x35_periphck has a sentinel, hence the id is 0 and the calculated number of peripheral clocks is 1 instead of a maximum of 31.
--- drivers/clk/at91/at91sam9x5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/clk/at91/at91sam9x5.c +1 -2
@@ -144,8 +144,7 @@ static void __init at91sam9x5_pmc_setup(return ; at91sam9x5_pmc =pmc_data_allocate (PMC_MAIN +1 , -nck (at91sam9x5_systemck), -nck (at91sam9x35_periphck),0 ); +nck (at91sam9x5_systemck),31 ,0 );if (!at91sam9x5_pmc)return ;
Greg Kroah-Hartman
maintainerPATCH 151/183 parisc: Fix ptrace syscall number modification
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry V. Levin <[email protected]>
commit b7dc5a071ddf69c0350396b203cba32fe5bab510 upstream.
Commit 910cd32e552e ("parisc: Fix and enable seccomp filter support") introduced a regression in ptrace-based syscall tampering: when tracer changes syscall number to -1, the kernel fails to initialize %r28 with -ENOSYS and subsequently fails to return the error code of the failed syscall to userspace.
This erroneous behaviour could be observed with a simple strace syscall fault injection command which is expected to print something like this:
$ strace -a0 -ewrite -einject=write:error=enospc echo hello write(1, "hello\n", 6) = -1 ENOSPC (No space left on device) (INJECTED) write(2, "echo: ", 6) = -1 ENOSPC (No space left on device) (INJECTED) write(2, "write error", 11) = -1 ENOSPC (No space left on device) (INJECTED) write(2, "\n", 1) = -1 ENOSPC (No space left on device) (INJECTED) +++ exited with 1 +++
After commit 910cd32e552ea09caa89cdbe328e468979b030dd it loops printing something like this instead:
write(1, "hello\n", 6../strace: Failed to tamper with process 12345: unexpectedly got no error (return value 0, error 0) ) = 0 (INJECTED)
This bug was found by strace test suite.
--- arch/parisc/kernel/ptrace.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-)
arch/parisc/kernel/ptrace.c +21 -8
@@ -308,15 +308,29 @@ long compat_arch_ptrace(struct task_strulong do_syscall_trace_enter (struct pt_regs *regs) { -if (test_thread_flag (TIF_SYSCALL_TRACE ) && -tracehook_report_syscall_entry (regs)) { +if (test_thread_flag (TIF_SYSCALL_TRACE )) { +int rc =tracehook_report_syscall_entry (regs); +/* -* Tracing decided this syscall should not happen or the -* debugger stored an invalid system call number. Skip -* the system call and the system call restart handling. +* As tracesys_next does not set %r28 to -ENOSYS +* when %r20 is set to -1, initialize it here. */ - regs->gr[20 ] =-1UL ; - goto out; + regs->gr[28 ] = -ENOSYS ; + +if (rc) { +/* +* A nonzero return code from +* tracehook_report_syscall_entry() tells us +* to prevent the syscall execution. Skip +* the syscall call and the syscall restart handling. +* +* Note that the tracer may also just change +* regs->gr[20] to an invalid syscall number, +* that is handled by tracesys_next. +*/ + regs->gr[20 ] =-1UL ; +return -1 ; + } }/* Do the secure computing check after ptrace. */
@@ -340,7 +354,6 @@ long do_syscall_trace_enter(struct pt_re regs->gr[24 ] &0xffffffff , regs->gr[23] & 0xffffffff); -out:/* * Sign extend the syscall number to 64bit since it may have been * modified by a compat ptrace call
Greg Kroah-Hartman
maintainerPATCH 152/183 ARCv2: Enable unaligned access in early ASM code
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eugeniy Paltsev <[email protected]>
commit 252f6e8eae909bc075a1b1e3b9efb095ae4c0b56 upstream.
It is currently done in arc_init_IRQ() which might be too late considering gcc 7.3.1 onwards (GNU 2018.03) generates unaligned memory accesses by default
--- arch/arc/kernel/head.S | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arc/kernel/head.S +10 -0
@@ -17,6 +17,7 @@ #include <asm/entry.h> #include <asm/arcregs.h> #include <asm/cache.h> +#include <asm/irqflags.h> .macro CPU_EARLY_SETUP
@@ -47,6 +48,15 @@ sr r5, [ARC_REG_DC_CTRL] 1: + +#ifdef CONFIG_ISA_ARCV2 + ; Unaligned access is disabled at reset, so re-enable early as + ; gcc 7.3.1 (ARC GNU 2018.03) onwards generates unaligned access + ; by default + lr r5, [status32] + bset r5, r5, STATUS_AD_BIT + kflag r5 +#endif .endm .section .init.text, "ax",@progbits
Greg Kroah-Hartman
maintainerPATCH 153/183 ARC: U-boot: check arguments paranoidly
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eugeniy Paltsev <[email protected]>
commit a66f2e57bd566240d8b3884eedf503928fbbe557 upstream.
Handle U-boot arguments paranoidly:
* don't allow to pass unknown tag.
* try to use external device tree blob only if corresponding tag (TAG_DTB) is set.
* don't check uboot_tag if kernel build with no ARC_UBOOT_SUPPORT.
NOTE:
If U-boot args are invalid we skip them and try to use embedded device tree blob. We can't panic on invalid U-boot args as we really pass invalid args due to bug in U-boot code.
This happens if we don't provide external DTB to U-boot and don't set 'bootargs' U-boot environment variable (which is default case at least for HSDK board) In that case we will pass
{r0 = 1 (bootargs in r2); r1 = 0; r2 = 0;} to linux which is invalid.
While I'm at it refactor U-boot arguments handling code.
--- arch/arc/kernel/head.S | 4 +- arch/arc/kernel/setup.c | 89 +++++++++++++++++++++++++++++++++--------------- 2 files changed, 65 insertions(+), 28 deletions(-)
arch/arc/kernel/head.S +2 -2
@@ -103,9 +103,9 @@ ENTRY(stext) #ifdef CONFIG_ARC_UBOOT_SUPPORT ; Uboot - kernel ABI ; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2 - ; r1 = magic number (board identity, unused as of now + ; r1 = magic number (always zero as of now) ; r2 = pointer to uboot provided cmdline or external DTB in mem - ; These are handled later in setup_arch() + ; These are handled later in handle_uboot_args() st r0, [@uboot_tag] st r2, [@uboot_arg] #endif
arch/arc/kernel/setup.c +63 -26
106 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 154/183 ARC: define ARCH_SLAB_MINALIGN = 8
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Brodkin <[email protected]>
commit b6835ea77729e7faf4656ca637ba53f42b8ee3fd upstream.
The default value of ARCH_SLAB_MINALIGN in "include/linux/slab.h" is "__alignof__(unsigned long long)" which for ARC unexpectedly turns out to be 4. This is not a compiler bug, but as defined by ARC ABI [1]
Thus slab allocator would allocate a struct which is 32-bit aligned, which is generally OK even if struct has long long members. There was however potetial problem when it had any atomic64_t which use LLOCKD/SCONDD instructions which are required by ISA to take 64-bit addresses. This is the problem we ran into
[ 4.015732] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) [ 4.167881] Misaligned Access [ 4.172356] Path: /bin/busybox.nosuid [ 4.176004] CPU: 2 PID: 171 Comm: rm Not tainted 4.19.14-yocto-standard #1 [ 4.182851] [ 4.182851] [ECR ]: 0x000d0000 => Check Programmer's Manual [ 4.190061] [EFA ]: 0xbeaec3fc [ 4.190061] [BLINK ]: ext4_delete_entry+0x210/0x234 [ 4.190061] [ERET ]: ext4_delete_entry+0x13e/0x234 [ 4.202985] [STAT32]: 0x80080002 : IE K [ 4.207236] BTA: 0x9009329c SP: 0xbe5b1ec4 FP: 0x00000000 [ 4.212790] LPS: 0x9074b118 LPE: 0x9074b120 LPC: 0x00000000 [ 4.218348] r00: 0x00000040 r01: 0x00000021 r02: 0x00000001 ... ... [ 4.270510] Stack Trace: [ 4.274510] ext4_delete_entry+0x13e/0x234 [ 4.278695] ext4_rmdir+0xe0/0x238 [ 4.282187] vfs_rmdir+0x50/0xf0 [ 4.285492] do_rmdir+0x9e/0x154 [ 4.288802] EV_Trap+0x110/0x114
The fix is to make sure slab allocations are 64-bit aligned.
Do note that atomic64_t is __attribute__((aligned(8)) which means gcc does generate 64-bit aligned references, relative to beginning of container struct. However the issue is if the container itself is not 64-bit aligned, atomic64_t ends up unaligned which is what this patch ensures.
[1] https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki/files/ARCv2_ABI.pdf
--- arch/arc/include/asm/cache.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arc/include/asm/cache.h +11 -0
@@ -52,6 +52,17 @@#define cache_line_size () SMP_CACHE_BYTES#define ARCH_DMA_MINALIGN SMP_CACHE_BYTES +/* +* Make sure slab-allocated buffers are 64-bit aligned when atomic64_t uses +* ARCv2 64-bit atomics (LLOCKD/SCONDD). This guarantess runtime 64-bit +* alignment for any atomic64_t embedded in buffer. +* Default ARCH_SLAB_MINALIGN is __alignof__(long long) which has a relaxed +* value of 4 (and not 8) in ARC ABI. +*/ +#if defined(CONFIG_ARC_HAS_LL64 ) && defined(CONFIG_ARC_HAS_LLSC ) +#define ARCH_SLAB_MINALIGN 8 +#endif +extern void arc_cache_init (void );extern char *arc_cache_mumbojumbo (int cpu_id,char *buf,int len);extern void read_decode_cache_bcr (void );
Greg Kroah-Hartman
maintainerPATCH 155/183 cpufreq: scmi: Fix use-after-free in scmi_cpufreq_exit()
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yangtao Li <[email protected]>
commit 8cbd468bdeb5ed3acac2d7a9f7494d5b77e46297 upstream.
This issue was detected with the help of Coccinelle. So change the order of function calls to fix it.
--- drivers/cpufreq/scmi-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/scmi-cpufreq.c +1 -1
@@ -187,8 +187,8 @@ static int scmi_cpufreq_exit(struct cpufcpufreq_cooling_unregister (priv->cdev);dev_pm_opp_free_cpufreq_table (priv->cpu_dev, &policy->freq_table); -kfree (priv);dev_pm_opp_remove_all_dynamic (priv->cpu_dev); +kfree (priv);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 156/183 drm/amdgpu: Set DPM_FLAG_NEVER_SKIP when enabling PM-runtime
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit d33158530660bc89be3cc870a2152e4e9a76cac7 upstream.
Based on a similar patch from Rafael for radeon.
When using ATPX to control dGPU power, the state is not retained across suspend and resume cycles by default. This can probably be loosened for Hybrid Graphics (_PR3) laptops where I think the state is properly retained.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -0
@@ -212,6 +212,7 @@ int amdgpu_driver_load_kms(struct drm_de }if (amdgpu_device_is_px (dev)) { +dev_pm_set_driver_flags (dev->dev,DPM_FLAG_NEVER_SKIP );pm_runtime_use_autosuspend (dev->dev);pm_runtime_set_autosuspend_delay (dev->dev,5000 );pm_runtime_set_active (dev->dev);
Greg Kroah-Hartman
maintainerPATCH 157/183 gpu: drm: radeon: Set DPM_FLAG_NEVER_SKIP when enabling PM-runtime
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <[email protected]>
commit 450d007d199e632a1a4c4b91302deacd7d56815f upstream.
On HP ProBook 4540s, if PM-runtime is enabled in the radeon driver and the direct-complete optimization is used for the radeon device during system-wide suspend, the system doesn't resume.
Preventing direct-complete from being used with the radeon device by setting the DPM_FLAG_NEVER_SKIP driver flag for it makes the problem go away, which indicates that direct-complete is not safe for the radeon driver in general and should not be used with it (at least for now).
This fixes a regression introduced by commit c62ec4610c40 ("PM / core: Fix direct_complete handling for devices with no callbacks") which allowed direct-complete to be applied to devices without PM callbacks (again) which in turn unlocked direct-complete for radeon on HP ProBook 4540s.
--- drivers/gpu/drm/radeon/radeon_kms.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/radeon/radeon_kms.c +1 -0
@@ -172,6 +172,7 @@ int radeon_driver_load_kms(struct drm_de }if (radeon_is_px (dev)) { +dev_pm_set_driver_flags (dev->dev,DPM_FLAG_NEVER_SKIP );pm_runtime_use_autosuspend (dev->dev);pm_runtime_set_autosuspend_delay (dev->dev,5000 );pm_runtime_set_active (dev->dev);
Greg Kroah-Hartman
maintainerPATCH 158/183 drm/i915/fbdev: Actually configure untiled displays
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Wilson <[email protected]>
commit d179b88deb3bf6fed4991a31fd6f0f2cad21fab5 upstream.
If we skipped all the connectors that were not part of a tile, we would leave conn_seq=0 and conn_configured=0, convincing ourselves that we had stagnated in our configuration attempts. Avoid this situation by starting conn_seq=ALL_CONNECTORS, and repeating until we find no more connectors to configure.
--- drivers/gpu/drm/i915/intel_fbdev.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_fbdev.c +7 -5
@@ -336,8 +336,8 @@ static bool intel_fb_initial_config(stru bool *enabled, int width, int height) { struct drm_i915_private *dev_priv = to_i915(fb_helper->dev); -unsigned long conn_configured, conn_seq, mask;unsigned int count =min (fb_helper->connector_count,BITS_PER_LONG ); +unsigned long conn_configured, conn_seq;int i, j;bool *save_enabled;bool fallback = true, ret = true;
@@ -355,10 +355,9 @@ static bool intel_fb_initial_config(strudrm_modeset_backoff (&ctx);memcpy (save_enabled, enabled, count); - mask =GENMASK (count -1 ,0 ); + conn_seq =GENMASK (count -1 ,0 ); conn_configured =0 ; retry: - conn_seq = conn_configured;for (i =0 ; i < count; i++) {struct drm_fb_helper_connector *fb_conn;struct drm_connector *connector;
@@ -371,7 +370,8 @@ retry:if (conn_configured &BIT (i))continue ; -if (conn_seq ==0 && !connector->has_tile) +/* First pass, only consider tiled connectors */ +if (conn_seq ==GENMASK (count -1 ,0 ) && !connector->has_tile)continue ;if (connector->status == connector_status_connected)
@@ -475,8 +475,10 @@ retry: conn_configured |=BIT (i); } -if ((conn_configured & mask) != mask && conn_configured != conn_seq) +if (conn_configured != conn_seq) {/* repeat until no more are found */ + conn_seq = conn_configured; goto retry; + }/* * If the BIOS didn't enable everything it could, fall back to have the
Greg Kroah-Hartman
maintainerPATCH 159/183 drm/amdgpu: disable bulk moves for now
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian König <[email protected]>
commit a213c2c7e235cfc0e0a161a558f7fdf2fb3a624a upstream.
The changes to fix those are two invasive for backporting.
Just disable the feature in 4.20 and 5.0.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2 -0
@@ -637,12 +637,14 @@ void amdgpu_vm_move_to_lru_tail(struct astruct ttm_bo_global *glob = adev->mman.bdev.glob;struct amdgpu_vm_bo_base *bo_base; +#if 0 if (vm->bulk_moveable) {spin_lock (&glob->lru_lock);ttm_bo_bulk_move_lru_tail (&vm->lru_bulk_move);spin_unlock (&glob->lru_lock);return ; } +#endif memset (&vm->lru_bulk_move,0 ,sizeof (vm->lru_bulk_move));
Greg Kroah-Hartman
maintainerPATCH 160/183 drm/amd/display: Fix MST reboot/poweroff sequence
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leo (Hanghong) Ma <[email protected]>
commit d2f0b53bda3193874f3905bc839888f895d1c0cf upstream.
[Why]
drm_dp_mst_topology_mgr_suspend() is added into the new reboot sequence, which disables the UP request at the beginning. Therefore sideband messages are blocked.
[How]
Finish MST sideband message transaction before UP request is suppressed.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -2
@@ -704,12 +704,13 @@ static int dm_suspend(void *handle)struct amdgpu_display_manager *dm = &adev->dm;int ret =0 ; +WARN_ON (adev->dm.cached_state); + adev->dm.cached_state =drm_atomic_helper_suspend (adev->ddev); +s3_handle_mst (adev->ddev, true);amdgpu_dm_irq_suspend (adev); -WARN_ON (adev->dm.cached_state); - adev->dm.cached_state =drm_atomic_helper_suspend (adev->ddev);dc_set_power_state (dm->dc,DC_ACPI_CM_POWER_STATE_D3 );
Greg Kroah-Hartman
maintainerPATCH 161/183 mac80211: Change default tx_sk_pacing_shift to 7
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Toke Høiland-Jørgensen <[email protected]>
commit 5c14a4d05f68415af9e41a4e667d1748d41d1baf upstream.
When we did the original tests for the optimal value of sk_pacing_shift, we came up with 6 ms of buffering as the default. Sadly, 6 is not a power of two, so when picking the shift value I erred on the size of less buffering and picked 4 ms instead of 8. This was probably wrong; those 2 ms of extra buffering makes a larger difference than I thought.
So, change the default pacing shift to 7, which corresponds to 8 ms of buffering. The point of diminishing returns really kicks in after 8 ms, and so having this as a default should cut down on the need for extensive per-device testing and overrides needed in the drivers.
--- net/mac80211/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/mac80211/main.c +2 -2
@@ -615,13 +615,13 @@ struct ieee80211_hw *ieee80211_alloc_hw_* We need a bit of data queued to build aggregates properly, so * instruct the TCP stack to allow more than a single ms of data * to be queued in the stack. The value is a bit-shift of 1 -* second, so 8 is ~4ms of queued data. Only affects local TCP +* second, so 7 is ~8ms of queued data. Only affects local TCP * sockets. * This is the default, anyhow - drivers may need to override it * for local reasons (longer buffers, longer completion time, or * similar). */ - local->hw.tx_sk_pacing_shift =8 ; + local->hw.tx_sk_pacing_shift =7 ;/* set up some defaults */ local->hw.queues =1 ;
Re: [PATCH 4.20 161/183] mac80211: Change default tx_sk_pacing_shift to 7
Quoted 2 lines · Greg Kroah-Hartman
4.20-stable review patch. If anyone has any objections, please let me know.
LGTM. Any chance of getting this into 4.19 as well? It doesn't apply as-is, but I can send an equivalent patch (where?).
-Toke
Greg Kroah-Hartman
maintainerRe: [PATCH 4.20 161/183] mac80211: Change default tx_sk_pacing_shift to 7
Quoted 7 lines · Toke Høiland-Jørgensen
Quoted 2 lines · Greg Kroah-Hartman
4.20-stable review patch. If anyone has any objections, please let me know.
LGTM. Any chance of getting this into 4.19 as well? It doesn't apply as-is, but I can send an equivalent patch (where?).
Yes, I didn't apply it to 4.19.y as it did not apply cleanly. You can send a backported version to [email protected] and I will be glad to pick it up for the next release after these.
thanks,
greg k-h
Re: [PATCH 4.20 161/183] mac80211: Change default tx_sk_pacing_shift to 7
Quoted 6 lines · Greg Kroah-Hartman
Quoted 5 lines · Toke Høiland-Jørgensen
Quoted 2 lines · Greg Kroah-Hartman
4.20-stable review patch. If anyone has any objections, please let me know.
Quoted 6 lines
Quoted 2 lines
LGTM. Any chance of getting this into 4.19 as well? It doesn't apply as-is, but I can send an equivalent patch (where?).
Yes, I didn't apply it to 4.19.y as it did not apply cleanly. You can send a backported version to [email protected] and I will be glad to pick it up for the next release after these.
Right, will do, thanks! :)
-Toke
Greg Kroah-Hartman
maintainerPATCH 162/183 mac80211: allocate tailroom for forwarded mesh packets
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Fietkau <[email protected]>
commit 51d0af222f6fa43134c6187ab4f374630f6e0d96 upstream.
Forwarded packets enter the tx path through ieee80211_add_pending_skb, which skips the ieee80211_skb_resize call.
Fixes WARN_ON in ccmp_encrypt_skb and resulting packet loss.
--- net/mac80211/rx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
net/mac80211/rx.c +6 -1
@@ -2640,6 +2640,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80struct ieee80211_sub_if_data *sdata = rx->sdata;struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;u16 ac, q, hdrlen; +int tailroom =0 ; hdr = (struct ieee80211_hdr *) skb->data; hdrlen =ieee80211_hdrlen (hdr->frame_control);
@@ -2726,8 +2727,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80if (!ifmsh->mshcfg.dot11MeshForwarding) goto out; +if (sdata->crypto_tx_tailroom_needed_cnt) + tailroom =IEEE80211_ENCRYPT_TAILROOM ; + fwd_skb =skb_copy_expand (skb, local->tx_headroom + - sdata->encrypt_headroom,0 ,GFP_ATOMIC ); + sdata->encrypt_headroom, + tailroom,GFP_ATOMIC );if (!fwd_skb) goto out;
Greg Kroah-Hartman
maintainerPATCH 163/183 KVM: MMU: record maximum physical address width in kvm_mmu_extended_role
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu Zhang <[email protected]>
commit de3ccd26fafc707b09792d9b633c8b5b48865315 upstream.
Previously, commit 7dcd57552008 ("x86/kvm/mmu: check if tdp/shadow MMU reconfiguration is needed") offered some optimization to avoid the unnecessary reconfiguration. Yet one scenario is broken - when cpuid changes VM's maximum physical address width, reconfiguration is needed to reset the reserved bits. Also, the TDP may need to reset its shadow_root_level when this value is changed.
To fix this, a new field, maxphyaddr, is introduced in the extended role structure to keep track of the configured guest physical address width.
--- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/mmu.c | 1 + 2 files changed, 2 insertions(+)
arch/x86/include/asm/kvm_host.h +1 -0
@@ -299,6 +299,7 @@ union kvm_mmu_extended_role { unsigned int cr4_smap:1; unsigned int cr4_smep:1; unsigned int cr4_la57:1; + unsigned int maxphyaddr:6; }; };
arch/x86/kvm/mmu.c +1 -0
@@ -4731,6 +4731,7 @@ static union kvm_mmu_extended_role kvm_c ext.cr4_pse = !!is_pse (vcpu); ext.cr4_pke = !!kvm_read_cr4_bits (vcpu,X86_CR4_PKE ); ext.cr4_la57 = !!kvm_read_cr4_bits (vcpu,X86_CR4_LA57 ); + ext.maxphyaddr =cpuid_maxphyaddr (vcpu); ext.valid =1 ;
Greg Kroah-Hartman
maintainerPATCH 164/183 x86/kvm/mmu: fix switch between root and guest MMUs
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vitaly Kuznetsov <[email protected]>
commit ad7dc69aeb23138cc23c406cac25003b97e8ee17 upstream.
Commit 14c07ad89f4d ("x86/kvm/mmu: introduce guest_mmu") brought one subtle
change: previously, when switching back from L2 to L1, we were resetting MMU hooks (like mmu->get_cr3()) in kvm_init_mmu() called from nested_vmx_load_cr3() and now we do that in nested_ept_uninit_mmu_context() when we re-target vcpu->arch.mmu pointer.
The change itself looks logical: if nested_ept_init_mmu_context() changes something than nested_ept_uninit_mmu_context() restores it back. There is, however, one thing: the following call chain:
nested_vmx_load_cr3()
kvm_mmu_new_cr3()
__kvm_mmu_new_cr3()
fast_cr3_switch()
cached_root_available()now happens with MMU hooks pointing to the new MMU (root MMU in our case) while previously it was happening with the old one. cached_root_available() tries to stash current root but it is incorrect to read current CR3 with mmu->get_cr3(), we need to use old_mmu->get_cr3() which in case we're switching from L2 to L1 is guest_mmu. (BTW, in shadow page tables case this is a non-issue because we don't switch MMU).
While we could've tried to guess that we're switching between MMUs and call the right ->get_cr3() from cached_root_available() this seems to be overly complicated. Instead, just stash the corresponding CR3 when setting root_hpa and make cached_root_available() use the stashed value.
--- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/mmu.c | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-)
arch/x86/include/asm/kvm_host.h +1 -0
@@ -398,6 +398,7 @@ struct kvm_mmu {void (*update_pte)(struct kvm_vcpu *vcpu,struct kvm_mmu_page *sp,u64 *spte,const void *pte);hpa_t root_hpa; +gpa_t root_cr3;union kvm_mmu_role mmu_role;u8 root_level;u8 shadow_root_level;
arch/x86/kvm/mmu.c +13 -4
@@ -3517,6 +3517,7 @@ void kvm_mmu_free_roots(struct kvm_vcpu &invalid_list); mmu->root_hpa =INVALID_PAGE ; } + mmu->root_cr3 =0 ; }kvm_mmu_commit_zap_page (vcpu->kvm, &invalid_list);
@@ -3572,6 +3573,7 @@ static int mmu_alloc_direct_roots(struct vcpu->arch.mmu->root_hpa =__pa (vcpu->arch.mmu->pae_root); }else BUG (); + vcpu->arch.mmu->root_cr3 = vcpu->arch.mmu->get_cr3 (vcpu);return 0 ; }
@@ -3580,10 +3582,11 @@ static int mmu_alloc_shadow_roots(struct {struct kvm_mmu_page *sp;u64 pdptr, pm_mask; -gfn_t root_gfn; +gfn_t root_gfn, root_cr3;int i; - root_gfn = vcpu->arch.mmu->get_cr3 (vcpu) >>PAGE_SHIFT ; + root_cr3 = vcpu->arch.mmu->get_cr3 (vcpu); + root_gfn = root_cr3 >>PAGE_SHIFT ;if (mmu_check_root (vcpu, root_gfn))return 1 ;
@@ -3608,7 +3611,7 @@ static int mmu_alloc_shadow_roots(struct ++sp->root_count;spin_unlock (&vcpu->kvm->mmu_lock); vcpu->arch.mmu->root_hpa = root; -return 0 ; + goto set_root_cr3; }/*
@@ -3674,6 +3677,9 @@ static int mmu_alloc_shadow_roots(struct vcpu->arch.mmu->root_hpa =__pa (vcpu->arch.mmu->lm_root); } +set_root_cr3: + vcpu->arch.mmu->root_cr3 = root_cr3; +return 0 ; }
@@ -4125,7 +4131,7 @@ static bool cached_root_available(structstruct kvm_mmu_root_info root;struct kvm_mmu *mmu = vcpu->arch.mmu; - root.cr3 = mmu->get_cr3 (vcpu); + root.cr3 = mmu->root_cr3; root.hpa = mmu->root_hpa;for (i =0 ; i <KVM_MMU_NUM_PREV_ROOTS ; i++) {
@@ -4138,6 +4144,7 @@ static bool cached_root_available(struct } mmu->root_hpa = root.hpa; + mmu->root_cr3 = root.cr3;return i <KVM_MMU_NUM_PREV_ROOTS ; }
@@ -5478,11 +5485,13 @@ int kvm_mmu_create(struct kvm_vcpu *vcpu vcpu->arch.walk_mmu = &vcpu->arch.root_mmu; vcpu->arch.root_mmu.root_hpa =INVALID_PAGE ; + vcpu->arch.root_mmu.root_cr3 =0 ; vcpu->arch.root_mmu.translate_gpa = translate_gpa;for (i =0 ; i <KVM_MMU_NUM_PREV_ROOTS ; i++) vcpu->arch.root_mmu.prev_roots[i] =KVM_MMU_ROOT_INFO_INVALID ; vcpu->arch.guest_mmu.root_hpa =INVALID_PAGE ; + vcpu->arch.guest_mmu.root_cr3 =0 ; vcpu->arch.guest_mmu.translate_gpa = translate_gpa;for (i =0 ; i <KVM_MMU_NUM_PREV_ROOTS ; i++) vcpu->arch.guest_mmu.prev_roots[i] =KVM_MMU_ROOT_INFO_INVALID ;
Greg Kroah-Hartman
maintainerPATCH 165/183 kvm: x86: Return LA57 feature based on hardware capability
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu Zhang <[email protected]>
commit 511da98d207d5c0675a10351b01e37cbe50a79e5 upstream.
Previously, 'commit 372fddf70904 ("x86/mm: Introduce the 'no5lvl' kernel parameter")' cleared X86_FEATURE_LA57 in boot_cpu_data, if Linux chooses to not run in 5-level paging mode. Yet boot_cpu_data is queried by do_cpuid_ent() as the host capability later when creating vcpus, and Qemu will not be able to detect this feature and create VMs with LA57 feature.
As discussed earlier, VMs can still benefit from extended linear address width, e.g. to enhance features like ASLR. So we would like to fix this, by return the true hardware capability when Qemu queries.
--- arch/x86/kvm/cpuid.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/kvm/cpuid.c +4 -0
@@ -337,6 +337,7 @@ static inline int __do_cpuid_ent(structunsigned f_mpx =kvm_mpx_supported () ?F (MPX ) :0 ;unsigned f_xsaves = kvm_x86_ops->xsaves_supported () ?F (XSAVES ) :0 ;unsigned f_umip = kvm_x86_ops->umip_emulated () ?F (UMIP ) :0 ; +unsigned f_la57 =0 ;/* cpuid 1.edx */ const u32 kvm_cpuid_1_edx_x86_features =
@@ -491,7 +492,10 @@ static inline int __do_cpuid_ent(struct// TSC_ADJUST is emulated entry->ebx |=F (TSC_ADJUST ); entry->ecx &= kvm_cpuid_7_0_ecx_x86_features; + f_la57 = entry->ecx &F (LA57 );cpuid_mask (&entry->ecx,CPUID_7_ECX ); +/* Set LA57 based on hardware capability. */ + entry->ecx |= f_la57; entry->ecx |= f_umip;/* PKU is not yet implemented for shadow paging. */ if (!tdp_enabled || !boot_cpu_has (X86_FEATURE_OSPKE ))
Greg Kroah-Hartman
maintainerPATCH 166/183 s390: vsie: Use effective CRYCBD.31 to check CRYCBD validity
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pierre Morel <[email protected]>
commit b10bd9a256aec504c14a7c9b6fccb6301ecf290a upstream.
When facility.76 MSAX3 is present for the guest we must issue a validity interception if the CRYCBD is not valid.
The bit CRYCBD.31 is an effective field and tested at each guest level and has for effect to mask the facility.76
It follows that if CRYCBD.31 is clear and AP is not in use we do not have to test the CRYCBD validatity even if facility.76 is present in the host.
Message-Id: <[email protected]>
--- arch/s390/kvm/vsie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kvm/vsie.c +1 -1
@@ -297,7 +297,7 @@ static int shadow_crycb(struct kvm_vcpu scb_s->crycbd =0 ; apie_h = vcpu->arch.sie_block->eca &ECA_APIE ; -if (!apie_h && !key_msk) +if (!apie_h && (!key_msk || fmt_o ==CRYCB_FORMAT0 ))return 0 ;if (!crycb_addr)
Greg Kroah-Hartman
maintainerPATCH 167/183 ASoC: soc-core: fix init platform memory handling
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Curtis Malainey <[email protected]>
commit 09ac6a817bd687e7f5dac00470262efdd72f9319 upstream.
snd_soc_init_platform initializes pointers to snd_soc_dai_link which is statically allocated and it does this by devm_kzalloc. In the event of an EPROBE_DEFER the memory will be freed and the pointers are left dangling. snd_soc_init_platform sees the dangling pointers and assumes they are pointing to initialized memory and does not reallocate them on the second probe attempt which results in a use after free bug since devm has freed the memory from the first probe attempt.
Since the intention for snd_soc_dai_link->platform is that it can be set statically by the machine driver we need to respect the pointer in the event we did not set it but still catch dangling pointers. The solution is to add a flag to track whether the pointer was dynamically allocated or not.
--- include/sound/soc.h | 6 ++++++ sound/soc/soc-core.c | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-)
include/sound/soc.h +6 -0
@@ -985,6 +985,12 @@ struct snd_soc_dai_link {/* Do not create a PCM for this DAI link (Backend link) */ unsigned int ignore:1; +/* +* This driver uses legacy platform naming. Set by the core, machine +* drivers should not modify this value. +*/ + unsigned int legacy_platform:1; +struct list_head list;/* DAI link list of the soc card */ struct snd_soc_dobj dobj;/* For topology */ };
sound/soc/soc-core.c +6 -5
@@ -1034,17 +1034,18 @@ static int snd_soc_init_platform(struct* this function should be removed in the future */ /* convert Legacy platform link */ -if (!platform) { +if (!platform || dai_link->legacy_platform) { platform =devm_kzalloc (card->dev,sizeof (struct snd_soc_dai_link_component ),GFP_KERNEL );if (!platform)return -ENOMEM ; - dai_link->platform = platform; - platform->name = dai_link->platform_name; - platform->of_node = dai_link->platform_of_node; - platform->dai_name =NULL ; + dai_link->platform = platform; + dai_link->legacy_platform =1 ; + platform->name = dai_link->platform_name; + platform->of_node = dai_link->platform_of_node; + platform->dai_name =NULL ; }/* if there's no platform we match on the empty platform */
Greg Kroah-Hartman
maintainerPATCH 168/183 net: validate untrusted gso packets without csum offload
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Willem de Bruijn <[email protected]>
commit d5be7f632bad0f489879eed0ff4b99bd7fe0b74c upstream.
Syzkaller again found a path to a kernel crash through bad gso input. By building an excessively large packet to cause an skb field to wrap.
If VIRTIO_NET_HDR_F_NEEDS_CSUM was set this would have been dropped in skb_partial_csum_set.
GSO packets that do not set checksum offload are suspicious and rare. Most callers of virtio_net_hdr_to_skb already pass them to skb_probe_transport_header.
Move that test forward, change it to detect parse failure and drop packets on failure as those cleary are not one of the legitimate VIRTIO_NET_HDR_GSO types.
--- include/linux/skbuff.h | 2 +- include/linux/virtio_net.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
include/linux/skbuff.h +1 -1
@@ -2418,7 +2418,7 @@ static inline void skb_probe_transport_hif (skb_flow_dissect_flow_keys_basic (skb, &keys,NULL ,0 ,0 ,0 ,0 ))skb_set_transport_header (skb, keys.control.thoff); -else +else if (offset_hint >=0 )skb_set_transport_header (skb, offset_hint); }
include/linux/virtio_net.h +9 -0
@@ -57,6 +57,15 @@ static inline int virtio_net_hdr_to_skb(if (!skb_partial_csum_set (skb, start, off))return -EINVAL ; + }else { +/* gso packets without NEEDS_CSUM do not set transport_offset. +* probe and drop if does not match one of the above types. +*/ +if (gso_type) { +skb_probe_transport_header (skb,-1 ); +if (!skb_transport_header_was_set (skb)) +return -EINVAL ; + } }if (hdr->gso_type !=VIRTIO_NET_HDR_GSO_NONE ) {
Greg Kroah-Hartman
maintainerPATCH 169/183 net: avoid false positives in untrusted gso validation
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Willem de Bruijn <[email protected]>
commit 9e8db5913264d3967b93c765a6a9e464d9c473db upstream.
GSO packets with vnet_hdr must conform to a small set of gso_types. The below commit uses flow dissection to drop packets that do not.
But it has false positives when the skb is not fully initialized. Dissection needs skb->protocol and skb->network_header.
Infer skb->protocol from gso_type as the two must agree. SKB_GSO_UDP can use both ipv4 and ipv6, so try both.
Exclude callers for which network header offset is not known.
--- include/linux/virtio_net.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
include/linux/virtio_net.h +12 -2
@@ -61,10 +61,20 @@ static inline int virtio_net_hdr_to_skb(/* gso packets without NEEDS_CSUM do not set transport_offset. * probe and drop if does not match one of the above types. */ -if (gso_type) { +if (gso_type && skb->network_header) { +if (!skb->protocol) +virtio_net_hdr_set_proto (skb, hdr); +retry:skb_probe_transport_header (skb,-1 ); -if (!skb_transport_header_was_set (skb)) +if (!skb_transport_header_was_set (skb)) { +/* UFO does not specify ipv4 or 6: try both */ +if (gso_type &SKB_GSO_UDP && + skb->protocol ==htons (ETH_P_IP )) { + skb->protocol =htons (ETH_P_IPV6 ); + goto retry; + }return -EINVAL ; + } } }
Greg Kroah-Hartman
maintainerPATCH 170/183 staging: erofs: remove the redundant d_rehash() for the root dentry
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao Xiang <[email protected]>
commit e9c892465583c8f42d61fafe30970d36580925df upstream.
There is actually no need at all to d_rehash() for the root dentry as Al pointed out, fix it.
--- drivers/staging/erofs/super.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/erofs/super.c +0 -6
@@ -442,12 +442,6 @@ static int erofs_read_super(struct supererofs_register_super (sb); -/* -* We already have a positive dentry, which was instantiated -* by d_make_root. Just need to d_rehash it. -*/ -d_rehash (sb->s_root); -if (!silent)infoln ("mounted on %s with opts: %s." , dev_name, (char *)data);
Greg Kroah-Hartman
maintainerPATCH 171/183 staging: erofs: atomic_cond_read_relaxed on ref-locked workgroup
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao Xiang <[email protected]>
commit df134b8d17b90c1e7720e318d36416b57424ff7a upstream.
It's better to use atomic_cond_read_relaxed, which is implemented in hardware instructions to monitor a variable changes currently for ARM64, instead of open-coded busy waiting.
--- drivers/staging/erofs/internal.h | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-)
drivers/staging/erofs/internal.h +18 -12
@@ -221,23 +221,29 @@ static inline void erofs_workgroup_unfrepreempt_enable (); } +#if defined(CONFIG_SMP ) +static inline int erofs_wait_on_workgroup_freezed (struct erofs_workgroup *grp) +{ +return atomic_cond_read_relaxed (&grp->refcount, +VAL !=EROFS_LOCKED_MAGIC ); +} +#else +static inline int erofs_wait_on_workgroup_freezed (struct erofs_workgroup *grp) +{ +int v =atomic_read (&grp->refcount); + +/* workgroup is never freezed on uniprocessor systems */ +DBG_BUGON (v ==EROFS_LOCKED_MAGIC ); +return v; +} +#endif +static inline bool erofs_workgroup_get (struct erofs_workgroup *grp,int *ocnt) { -const int locked = (int )EROFS_LOCKED_MAGIC ;int o; repeat: - o =atomic_read (&grp->refcount); - -/* spin if it is temporarily locked at the reclaim path */ -if (unlikely (o == locked)) { -#if defined(CONFIG_SMP ) || defined(CONFIG_DEBUG_SPINLOCK ) -do -cpu_relax (); -while (atomic_read (&grp->refcount) == locked); -#endif - goto repeat; - } + o =erofs_wait_on_workgroup_freezed (grp);if (unlikely (o <=0 ))return -1 ;
Greg Kroah-Hartman
maintainerPATCH 172/183 staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao Xiang <[email protected]>
commit 73f5c66df3e26ab750cefcb9a3e08c71c9f79cad upstream.
There are two minor issues in the current freeze interface:
1) Freeze interfaces have not related with CONFIG_DEBUG_SPINLOCK,
therefore fix the incorrect conditions;
2) For SMP platforms, it should also disable preemption before doing atomic_cmpxchg in case that some high priority tasks preempt between atomic_cmpxchg and disable_preempt, then spin on the locked refcount later.
--- drivers/staging/erofs/internal.h | 41 +++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-)
drivers/staging/erofs/internal.h +25 -16
@@ -194,40 +194,49 @@ struct erofs_workgroup {#define EROFS_LOCKED_MAGIC (INT_MIN | 0xE0F510CCL) -static inline bool erofs_workgroup_try_to_freeze ( -struct erofs_workgroup *grp,int v) +#if defined(CONFIG_SMP ) +static inline bool erofs_workgroup_try_to_freeze (struct erofs_workgroup *grp, +int val) { -#if defined(CONFIG_SMP ) || defined(CONFIG_DEBUG_SPINLOCK ) -if (v !=atomic_cmpxchg (&grp->refcount, - v,EROFS_LOCKED_MAGIC )) -return false;preempt_disable (); -#else -preempt_disable (); -if (atomic_read (&grp->refcount) != v) { +if (val !=atomic_cmpxchg (&grp->refcount, val,EROFS_LOCKED_MAGIC )) {preempt_enable ();return false; } -#endif return true; } -static inline void erofs_workgroup_unfreeze ( -struct erofs_workgroup *grp,int v) +static inline void erofs_workgroup_unfreeze (struct erofs_workgroup *grp, +int orig_val) { -#if defined(CONFIG_SMP ) || defined(CONFIG_DEBUG_SPINLOCK ) -atomic_set (&grp->refcount, v); -#endif +atomic_set (&grp->refcount, orig_val);preempt_enable (); } -#if defined(CONFIG_SMP )static inline int erofs_wait_on_workgroup_freezed (struct erofs_workgroup *grp) {return atomic_cond_read_relaxed (&grp->refcount,VAL !=EROFS_LOCKED_MAGIC ); }#else +static inline bool erofs_workgroup_try_to_freeze (struct erofs_workgroup *grp, +int val) +{ +preempt_disable (); +/* no need to spin on UP platforms, let's just disable preemption. */ +if (val !=atomic_read (&grp->refcount)) { +preempt_enable (); +return false; + } +return true; +} + +static inline void erofs_workgroup_unfreeze (struct erofs_workgroup *grp, +int orig_val) +{ +preempt_enable (); +} +static inline int erofs_wait_on_workgroup_freezed (struct erofs_workgroup *grp) {int v =atomic_read (&grp->refcount);
Greg Kroah-Hartman
maintainerPATCH 173/183 staging: erofs: add a full barrier in erofs_workgroup_unfreeze
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao Xiang <[email protected]>
commit 948bbdb1818b7ad6e539dad4fbd2dd4650793ea9 upstream.
Just like other generic locks, insert a full barrier in case of memory reorder.
--- drivers/staging/erofs/internal.h | 5 +++++ 1 file changed, 5 insertions(+)
drivers/staging/erofs/internal.h +5 -0
@@ -209,6 +209,11 @@ static inline bool erofs_workgroup_try_tstatic inline void erofs_workgroup_unfreeze (struct erofs_workgroup *grp,int orig_val) { +/* +* other observers should notice all modifications +* in the freezing period. +*/ +smp_mb ();atomic_set (&grp->refcount, orig_val);preempt_enable (); }
Greg Kroah-Hartman
maintainerPATCH 174/183 staging: erofs: {dir,inode,super}.c: rectify BUG_ONs
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao Xiang <[email protected]>
commit 8b987bca2d09649683cbe496419a011df8c08493 upstream.
remove all redundant BUG_ONs, and turn the rest
useful usages to DBG_BUGONs.
--- drivers/staging/erofs/dir.c | 7 +++++-- drivers/staging/erofs/inode.c | 10 ++++++++-- drivers/staging/erofs/super.c | 13 ++++++------- 3 files changed, 19 insertions(+), 11 deletions(-)
drivers/staging/erofs/dir.c +5 -2
@@ -53,8 +53,11 @@ static int erofs_fill_dentries(struct di strnlen(de_name, maxsize - nameoff) :le16_to_cpu (de[1 ].nameoff) - nameoff; -/* the corrupted directory found */ -BUG_ON (de_namelen <0 ); +/* a corrupted entry is found */ +if (unlikely (de_namelen <0 )) { +DBG_BUGON (1 ); +return -EIO ; + }#ifdef CONFIG_EROFS_FS_DEBUG dbg_namelen =min (EROFS_NAME_LEN -1 , de_namelen);
drivers/staging/erofs/inode.c +8 -2
@@ -133,7 +133,13 @@ static int fill_inline_data(struct inodereturn -ENOMEM ; m_pofs += vi->inode_isize + vi->xattr_isize; -BUG_ON (m_pofs + inode->i_size >PAGE_SIZE ); + +/* inline symlink data shouldn't across page boundary as well */ +if (unlikely (m_pofs + inode->i_size >PAGE_SIZE )) { +DBG_BUGON (1 ); +kfree (lnk); +return -EIO ; + }/* get in-page inline data */ memcpy (lnk, data + m_pofs, inode->i_size);
@@ -171,7 +177,7 @@ static int fill_inode(struct inode *inodreturn PTR_ERR (page); } -BUG_ON (!PageUptodate (page)); +DBG_BUGON (!PageUptodate (page)); data =page_address (page); err =read_inode (inode, data + ofs);
drivers/staging/erofs/super.c +6 -7
@@ -40,7 +40,6 @@ static int __init erofs_init_inode_cachestatic void erofs_exit_inode_cache (void ) { -BUG_ON (erofs_inode_cachep ==NULL );kmem_cache_destroy (erofs_inode_cachep); }
@@ -303,8 +302,8 @@ static int managed_cache_releasepage(strint ret =1 ;/* 0 - busy */ struct address_space *const mapping = page->mapping; -BUG_ON (!PageLocked (page)); -BUG_ON (mapping->a_ops != &managed_cache_aops); +DBG_BUGON (!PageLocked (page)); +DBG_BUGON (mapping->a_ops != &managed_cache_aops);if (PagePrivate (page)) ret =erofs_try_to_free_cached_page (mapping, page);
@@ -317,10 +316,10 @@ static void managed_cache_invalidatepage {const unsigned int stop = length + offset; -BUG_ON (!PageLocked (page)); +DBG_BUGON (!PageLocked (page)); -/* Check for overflow */ -BUG_ON (stop >PAGE_SIZE || stop < length); +/* Check for potential overflow in debug mode */ +DBG_BUGON (stop >PAGE_SIZE || stop < length);if (offset ==0 && stop ==PAGE_SIZE )while (!managed_cache_releasepage (page,GFP_NOFS ))
@@ -649,7 +648,7 @@ static int erofs_remount(struct super_blunsigned int org_inject_rate =erofs_get_fault_rate (sbi);int err; -BUG_ON (!sb_rdonly (sb)); +DBG_BUGON (!sb_rdonly (sb)); err =parse_options (sb, data);if (err) goto out;
Greg Kroah-Hartman
maintainerPATCH 175/183 staging: erofs: unzip_{pagevec.h,vle.c}: rectify BUG_ONs
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao Xiang <[email protected]>
commit 70b17991d89554cdd16f3e4fb0179bcc03c808d9 upstream.
remove all redundant BUG_ONs, and turn the rest useful usages to DBG_BUGONs.
--- drivers/staging/erofs/unzip_pagevec.h | 2 - drivers/staging/erofs/unzip_vle.c | 35 +++++++++++++--------------------- 2 files changed, 15 insertions(+), 22 deletions(-)
drivers/staging/erofs/unzip_pagevec.h +1 -1
@@ -150,7 +150,7 @@ z_erofs_pagevec_ctor_dequeue(struct z_ererofs_vtptr_t t;if (unlikely (ctor->index >= ctor->nr)) { -BUG_ON (ctor->next ==NULL ); +DBG_BUGON (!ctor->next);z_erofs_pagevec_ctor_pagedown (ctor, true); }
drivers/staging/erofs/unzip_vle.c +14 -21
@@ -20,9 +20,6 @@ static struct kmem_cache *z_erofs_workgrvoid z_erofs_exit_zip_subsystem (void ) { -BUG_ON (z_erofs_workqueue ==NULL ); -BUG_ON (z_erofs_workgroup_cachep ==NULL ); -destroy_workqueue (z_erofs_workqueue);kmem_cache_destroy (z_erofs_workgroup_cachep); }
@@ -366,7 +363,10 @@ z_erofs_vle_work_register(const struct zstruct z_erofs_vle_work *work;/* if multiref is disabled, grp should never be nullptr */ -BUG_ON (grp !=NULL ); +if (unlikely (grp)) { +DBG_BUGON (1 ); +return ERR_PTR (-EINVAL ); + }/* no available workgroup, let's allocate one */ grp =kmem_cache_zalloc (z_erofs_workgroup_cachep,GFP_NOFS );
@@ -745,7 +745,7 @@ static inline void z_erofs_vle_read_endibool cachemngd = false;DBG_BUGON (PageUptodate (page)); -BUG_ON (page->mapping ==NULL ); +DBG_BUGON (!page->mapping);#ifdef EROFS_FS_HAS_MANAGED_CACHE if (unlikely (mngda ==NULL && !z_erofs_is_stagingpage (page))) {
@@ -803,7 +803,7 @@ static int z_erofs_vle_unzip(struct supemight_sleep (); work =z_erofs_vle_grab_primary_work (grp); -BUG_ON (!READ_ONCE (work->nr_pages)); +DBG_BUGON (!READ_ONCE (work->nr_pages));mutex_lock (&work->lock); nr_pages = work->nr_pages;
@@ -852,8 +852,8 @@ repeat:else pagenr =z_erofs_onlinepage_index (page); -BUG_ON (pagenr >= nr_pages); -BUG_ON (pages[pagenr] !=NULL ); +DBG_BUGON (pagenr >= nr_pages); +DBG_BUGON (pages[pagenr]); pages[pagenr] = page; }
@@ -876,9 +876,8 @@ repeat:if (z_erofs_is_stagingpage (page))continue ;#ifdef EROFS_FS_HAS_MANAGED_CACHE - else if (page->mapping == mngda) { -BUG_ON (PageLocked (page)); -BUG_ON (!PageUptodate (page)); +if (page->mapping == mngda) { +DBG_BUGON (!PageUptodate (page));continue ; }#endif
@@ -886,8 +885,8 @@ repeat:/* only non-head page could be reused as a compressed page */ pagenr =z_erofs_onlinepage_index (page); -BUG_ON (pagenr >= nr_pages); -BUG_ON (pages[pagenr] !=NULL ); +DBG_BUGON (pagenr >= nr_pages); +DBG_BUGON (pages[pagenr]); ++sparsemem_pages; pages[pagenr] = page;
@@ -897,9 +896,6 @@ repeat: llen = (nr_pages <<PAGE_SHIFT ) - work->pageofs;if (z_erofs_vle_workgrp_fmt (grp) ==Z_EROFS_VLE_WORKGRP_FMT_PLAIN ) { -/* FIXME! this should be fixed in the future */ -BUG_ON (grp->llen != llen); - err =z_erofs_vle_plain_copy (compressed_pages, clusterpages, pages, nr_pages, work->pageofs); goto out;
@@ -914,10 +910,8 @@ repeat:if (err != -ENOTSUPP ) goto out_percpu; -if (sparsemem_pages >= nr_pages) { -BUG_ON (sparsemem_pages > nr_pages); +if (sparsemem_pages >= nr_pages) goto skip_allocpage; - }for (i =0 ; i < nr_pages; ++i) {if (pages[i] !=NULL )
@@ -1010,7 +1004,7 @@ static void z_erofs_vle_unzip_wq(struct struct z_erofs_vle_unzip_io_sb, io.u.work);LIST_HEAD (page_pool); -BUG_ON (iosb->io.head ==Z_EROFS_VLE_WORKGRP_TAIL_CLOSED ); +DBG_BUGON (iosb->io.head ==Z_EROFS_VLE_WORKGRP_TAIL_CLOSED );z_erofs_vle_unzip_all (iosb->sb, &iosb->io, &page_pool);put_pages_list (&page_pool);
@@ -1344,7 +1338,6 @@ static int z_erofs_vle_normalaccess_readcontinue ; } -BUG_ON (PagePrivate (page));set_page_private (page, (unsigned long )head); head = page; }
Greg Kroah-Hartman
maintainerPATCH 176/183 staging: erofs: unzip_vle_lz4.c,utils.c: rectify BUG_ONs
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao Xiang <[email protected]>
commit b8e076a6ef253e763bfdb81e5c72bcc828b0fbeb upstream.
remove all redundant BUG_ONs, and turn the rest useful usages to DBG_BUGONs.
--- drivers/staging/erofs/unzip_vle_lz4.c | 2 +- drivers/staging/erofs/utils.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/erofs/unzip_vle_lz4.c +1 -1
@@ -57,7 +57,7 @@ int z_erofs_vle_plain_copy(struct page *if (compressed_pages[j] != page)continue ; -BUG_ON (mirrored[j]); +DBG_BUGON (mirrored[j]);memcpy (percpu_data + j *PAGE_SIZE , dst,PAGE_SIZE ); mirrored[j] = true;break ;
drivers/staging/erofs/utils.c +6 -6
@@ -23,9 +23,6 @@ struct page *erofs_allocpage(struct listlist_del (&page->lru); }else { page =alloc_pages (gfp | __GFP_NOFAIL,0 ); - -BUG_ON (page ==NULL ); -BUG_ON (page->mapping !=NULL ); }return page; }
@@ -58,7 +55,7 @@ repeat:/* decrease refcount added by erofs_workgroup_put */ if (unlikely (oldcount ==1 ))atomic_long_dec (&erofs_global_shrink_cnt); -BUG_ON (index != grp->index); +DBG_BUGON (index != grp->index); }rcu_read_unlock ();return grp;
@@ -71,8 +68,11 @@ int erofs_register_workgroup(struct supestruct erofs_sb_info *sbi;int err; -/* grp->refcount should not < 1 */ -BUG_ON (!atomic_read (&grp->refcount)); +/* grp shouldn't be broken or used before */ +if (unlikely (atomic_read (&grp->refcount) !=1 )) { +DBG_BUGON (1 ); +return -EINVAL ; + } err =radix_tree_preload (GFP_NOFS );if (err)
Greg Kroah-Hartman
maintainerPATCH 177/183 Revert "bridge: do not add port to router list when receives query with source 0.0.0.0"
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hangbin Liu <[email protected]>
commit 278e2148c07559dd4ad8602f22366d61eb2ee7b7 upstream.
This reverts commit 5a2de63fd1a5 ("bridge: do not add port to router list when receives query with source 0.0.0.0") and commit 0fe5119e267f ("net:
bridge: remove ipv6 zero address check in mcast queries")
The reason is RFC 4541 is not a standard but suggestive. Currently we will elect 0.0.0.0 as Querier if there is no ip address configured on bridge. If we do not add the port which recives query with source 0.0.0.0 to router list, the IGMP reports will not be about to forward to Querier, IGMP data will also not be able to forward to dest.
As Nikolay suggested, revert this change first and add a boolopt api to disable none-zero election in future if needed.
--- net/bridge/br_multicast.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
net/bridge/br_multicast.c +1 -8
@@ -1422,14 +1422,7 @@ static void br_multicast_query_received(return ;br_multicast_update_query_timer (br, query, max_delay); - -/* Based on RFC4541, section 2.1.1 IGMP Forwarding Rules, -* the arrival port for IGMP Queries where the source address -* is 0.0.0.0 should not be added to router port list. -*/ -if ((saddr->proto ==htons (ETH_P_IP ) && saddr->u.ip4) || - saddr->proto ==htons (ETH_P_IPV6 )) -br_multicast_mark_router (br, port); +br_multicast_mark_router (br, port); } static void br_ip4_multicast_query(struct net_bridge *br,
Greg Kroah-Hartman
maintainerPATCH 178/183 netfilter: nf_tables: fix flush after rule deletion in the same batch
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Neira Ayuso <[email protected]>
commit 23b7ca4f745f21c2b9cfcb67fdd33733b3ae7e66 upstream.
Flush after rule deletion bogusly hits -ENOENT. Skip rules that have been already from nft_delrule_by_chain() which is always called from the flush path.
--- net/netfilter/nf_tables_api.c | 3 +++ 1 file changed, 3 insertions(+)
net/netfilter/nf_tables_api.c +3 -0
@@ -307,6 +307,9 @@ static int nft_delrule_by_chain(struct nint err;list_for_each_entry (rule, &ctx->chain->rules, list) { +if (!nft_is_active_next (ctx->net, rule)) +continue ; + err =nft_delrule (ctx, rule);if (err <0 )return err;
Greg Kroah-Hartman
maintainerPATCH 179/183 netfilter: nft_compat: use-after-free when deleting targets
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Neira Ayuso <[email protected]>
commit 753c111f655e38bbd52fc01321266633f022ebe2 upstream.
Fetch pointer to module before target object is released.
--- net/netfilter/nft_compat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/netfilter/nft_compat.c +2 -1
@@ -282,6 +282,7 @@ nft_target_destroy(const struct nft_ctx {struct xt_target *target = expr->ops->data;void *info =nft_expr_priv (expr); +struct module *me = target->me;struct xt_tgdtor_param par; par.net = ctx->net;
@@ -292,7 +293,7 @@ nft_target_destroy(const struct nft_ctx par.target->destroy (&par); if (nft_xt_put(container_of(expr->ops, struct nft_xt, ops))) -module_put (target->me); +module_put (me); } static int nft_extension_dump_info(struct sk_buff *skb, int attr,
Greg Kroah-Hartman
maintainerPATCH 180/183 netfilter: ipv6: Dont preserve original oif for loopback address
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eli Cooper <[email protected]>
commit 15df03c661cb362366ecfc3a21820cb934f3e4ca upstream.
Commit 508b09046c0f ("netfilter: ipv6: Preserve link scope traffic original oif") made ip6_route_me_harder() keep the original oif for link-local and multicast packets. However, it also affected packets for the loopback address because it used rt6_need_strict().
REDIRECT rules in the OUTPUT chain rewrite the destination to loopback address; thus its oif should not be preserved. This commit fixes the bug that redirected local packets are being dropped. Actually the packet was not exactly dropped; Instead it was sent out to the original oif rather than lo. When a packet with daddr ::1 is sent to the router, it is effectively dropped.
--- net/ipv6/netfilter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/ipv6/netfilter.c +3 -1
@@ -23,9 +23,11 @@ int ip6_route_me_harder(struct net *net,struct sock *sk =sk_to_full_sk (skb->sk);unsigned int hh_len;struct dst_entry *dst; +int strict = (ipv6_addr_type (&iph->daddr) & + (IPV6_ADDR_MULTICAST |IPV6_ADDR_LINKLOCAL ));struct flowi6 fl6 = { .flowi6_oif = sk && sk->sk_bound_dev_if ? sk->sk_bound_dev_if : -rt6_need_strict (&iph->daddr) ?skb_dst (skb)->dev->ifindex :0 , + strict ?skb_dst (skb)->dev->ifindex :0 , .flowi6_mark = skb->mark, .flowi6_uid =sock_net_uid (net, sk), .daddr = iph->daddr,
Greg Kroah-Hartman
maintainerPATCH 181/183 netfilter: nfnetlink_osf: add missing fmatch check
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fernando Fernandez Mancera <[email protected]>
commit 1a6a0951fc009f6d9fe8ebea2d2417d80d54097b upstream.
When we check the tcp options of a packet and it doesn't match the current fingerprint, the tcp packet option pointer must be restored to its initial value in order to do the proper tcp options check for the next fingerprint.
Here we can see an example.
Assumming the following fingerprint base with two lines:
S10:64:1:60:M*,S,T,N,W6: Linux:3.0::Linux 3.0
S20:64:1:60:M*,S,T,N,W7: Linux:4.19:arch:Linux 4.1
Where TCP options are the last field in the OS signature, all of them overlap except by the last one, ie. 'W6' versus 'W7'.
In case a packet for Linux 4.19 kicks in, the osf finds no matching because the TCP options pointer is updated after checking for the TCP options in the first line.
Therefore, reset pointer back to where it should be.
--- net/netfilter/nfnetlink_osf.c | 4 ++++ 1 file changed, 4 insertions(+)
net/netfilter/nfnetlink_osf.c +4 -0
@@ -66,6 +66,7 @@ static bool nf_osf_match_one(const strucint ttl_check, struct nf_osf_hdr_ctx *ctx) { + const __u8 *optpinit = ctx->optp;unsigned int check_WSS =0 ;int fmatch =FMATCH_WRONG ;int foptsize, optnum;
@@ -155,6 +156,9 @@ static bool nf_osf_match_one(const struc } } +if (fmatch !=FMATCH_OK ) + ctx->optp = optpinit; +return fmatch ==FMATCH_OK ; }
Greg Kroah-Hartman
maintainerPATCH 182/183 netfilter: ipt_CLUSTERIP: fix sleep-in-atomic bug in clusterip_config_entry_put()
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Taehee Yoo <[email protected]>
commit 2a61d8b883bbad26b06d2e6cc3777a697e78830d upstream.
A proc_remove() can sleep. so that it can't be inside of spin_lock. Hence proc_remove() is moved to outside of spin_lock. and it also adds mutex to sync create and remove of proc entry(config->pde).
test commands:
SHELL#1
%while :; do iptables -A INPUT -p udp -i enp2s0 -d 192.168.1.100 \ --dport 9000 -j CLUSTERIP --new --hashmode sourceip \ --clustermac 01:00:5e:00:00:21 --total-nodes 3 --local-node 3; \ iptables -F; done
SHELL#2
%while :; do echo +1 > /proc/net/ipt_CLUSTERIP/192.168.1.100; \ echo -1 > /proc/net/ipt_CLUSTERIP/192.168.1.100; done
[ 2949.569864] BUG: sleeping function called from invalid context at kernel/sched/completion.c:99
[ 2949.579944] in_atomic(): 1, irqs_disabled(): 0, pid: 5472, name: iptables
[ 2949.587920] 1 lock held by iptables/5472:
[ 2949.592711] #0: 000000008f0ebcf2 (&(&cn->lock)->rlock){+...}, at: refcount_dec_and_lock+0x24/0x50
[ 2949.603307] CPU: 1 PID: 5472 Comm: iptables Tainted: G W 4.19.0-rc5+ #16
[ 2949.604212] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/08/2015
[ 2949.604212] Call Trace:
[ 2949.604212] dump_stack+0xc9/0x16b
[ 2949.604212] ? show_regs_print_info+0x5/0x5
[ 2949.604212] ___might_sleep+0x2eb/0x420
[ 2949.604212] ? set_rq_offline.part.87+0x140/0x140
[ 2949.604212] ? _rcu_barrier_trace+0x400/0x400
[ 2949.604212] wait_for_completion+0x94/0x710
[ 2949.604212] ? wait_for_completion_interruptible+0x780/0x780
[ 2949.604212] ? __kernel_text_address+0xe/0x30
[ 2949.604212] ? __lockdep_init_map+0x10e/0x5c0
[ 2949.604212] ? __lockdep_init_map+0x10e/0x5c0
[ 2949.604212] ? __init_waitqueue_head+0x86/0x130
[ 2949.604212] ? init_wait_entry+0x1a0/0x1a0
[ 2949.604212] proc_entry_rundown+0x208/0x270
[ 2949.604212] ? proc_reg_get_unmapped_area+0x370/0x370
[ 2949.604212] ? __lock_acquire+0x4500/0x4500
[ 2949.604212] ? complete+0x18/0x70
[ 2949.604212] remove_proc_subtree+0x143/0x2a0
[ 2949.708655] ? remove_proc_entry+0x390/0x390
[ 2949.708655] clusterip_tg_destroy+0x27a/0x630 [ipt_CLUSTERIP][ ... ]
--- net/ipv4/netfilter/ipt_CLUSTERIP.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
net/ipv4/netfilter/ipt_CLUSTERIP.c +14 -5
@@ -56,7 +56,7 @@ struct clusterip_config {#endif enum clusterip_hashmode hash_mode;/* which hashing mode */ u_int32_t hash_initval;/* hash initialization */ -struct rcu_head rcu; +struct rcu_head rcu;/* for call_rcu_bh */ struct net *net;/* netns for pernet list */ char ifname[IFNAMSIZ ];/* device ifname */ };
@@ -72,6 +72,8 @@ struct clusterip_net {#ifdef CONFIG_PROC_FS struct proc_dir_entry *procdir; +/* mutex protects the config->pde*/ +struct mutex mutex;#endif };
@@ -118,17 +120,18 @@ clusterip_config_entry_put(struct clustelocal_bh_disable ();if (refcount_dec_and_lock (&c->entries, &cn->lock)) { +list_del_rcu (&c->list); +spin_unlock (&cn->lock); +local_bh_enable ();/* In case anyone still accesses the file, the open/close * functions are also incrementing the refcount on their own, * so it's safe to remove the entry even if it's in use. */ #ifdef CONFIG_PROC_FS +mutex_lock (&cn->mutex);if (cn->procdir)proc_remove (c->pde); +mutex_unlock (&cn->mutex);#endif -list_del_rcu (&c->list); -spin_unlock (&cn->lock); -local_bh_enable (); -return ; }local_bh_enable ();
@@ -278,9 +281,11 @@ clusterip_config_init(struct net *net, c/* create proc dir entry */ sprintf (buffer,"%pI4" , &ip); +mutex_lock (&cn->mutex); c->pde =proc_create_data (buffer,0600 , cn->procdir, &clusterip_proc_fops, c); +mutex_unlock (&cn->mutex);if (!c->pde) { err = -ENOMEM ; goto err;
@@ -833,6 +838,7 @@ static int clusterip_net_init(struct netpr_err ("Unable to proc dir entry\n" ); return -ENOMEM; } +mutex_init (&cn->mutex);#endif /* CONFIG_PROC_FS */ return 0 ;
@@ -841,9 +847,12 @@ static int clusterip_net_init(struct netstatic void clusterip_net_exit (struct net *net) {struct clusterip_net *cn =clusterip_pernet (net); +#ifdef CONFIG_PROC_FS +mutex_lock (&cn->mutex);proc_remove (cn->procdir); cn->procdir =NULL ; +mutex_unlock (&cn->mutex);#endif nf_unregister_net_hook (net, &cip_arp_ops); }
Greg Kroah-Hartman
maintainerPATCH 183/183 pinctrl: max77620: Use define directive for max77620_pinconf_param values
In reply to Greg Kroah-Hartman4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nathan Chancellor <[email protected]>
commit 1f60652dd586d1b3eee7c4602892a97a62fa937a upstream.
Clang warns when one enumerated type is implicitly converted to another:
drivers/pinctrl/pinctrl-max77620.c:56:12: warning: implicit conversion from enumeration type 'enum max77620_pinconf_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion]
.param = MAX77620_ACTIVE_FPS_SOURCE,
^~~~~~~~~~~~~~~~~~~~~~~~~~It is expected that pinctrl drivers can extend pin_config_param because of the gap between PIN_CONFIG_END and PIN_CONFIG_MAX so this conversion isn't an issue. Most drivers that take advantage of this define the PIN_CONFIG variables as constants, rather than enumerated values. Do the same thing here so that Clang no longer warns.
--- drivers/pinctrl/pinctrl-max77620.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
drivers/pinctrl/pinctrl-max77620.c +6 -8
@@ -34,14 +34,12 @@ enum max77620_pin_ppdrv { MAX77620_PIN_PP_DRV, }; -enum max77620_pinconf_param { -MAX77620_ACTIVE_FPS_SOURCE =PIN_CONFIG_END +1 , -MAX77620_ACTIVE_FPS_POWER_ON_SLOTS , -MAX77620_ACTIVE_FPS_POWER_DOWN_SLOTS , -MAX77620_SUSPEND_FPS_SOURCE , -MAX77620_SUSPEND_FPS_POWER_ON_SLOTS , -MAX77620_SUSPEND_FPS_POWER_DOWN_SLOTS , -}; +#define MAX77620_ACTIVE_FPS_SOURCE (PIN_CONFIG_END + 1) +#define MAX77620_ACTIVE_FPS_POWER_ON_SLOTS (PIN_CONFIG_END + 2) +#define MAX77620_ACTIVE_FPS_POWER_DOWN_SLOTS (PIN_CONFIG_END + 3) +#define MAX77620_SUSPEND_FPS_SOURCE (PIN_CONFIG_END + 4) +#define MAX77620_SUSPEND_FPS_POWER_ON_SLOTS (PIN_CONFIG_END + 5) +#define MAX77620_SUSPEND_FPS_POWER_DOWN_SLOTS (PIN_CONFIG_END + 6)struct max77620_pin_function {const char *name;
Jon Hunter
maintainerQuoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.20.13 release. There are 183 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 Feb 27 19:49:59 UTC 2019. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.20.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.20.y
and the diffstat can be found below.thanks,
greg k-h
All tests are passing for Tegra ...
Test results for stable-v4.20:
11 builds: 11 pass, 0 fail
22 boots: 22 pass, 0 fail
22 tests: 22 pass, 0 failLinux version: 4.20.13-rc1-g6d10f1d
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra30-cardhu-a04Cheers
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 23 lines · Jon Hunter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.20.13 release. There are 183 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 Feb 27 19:49:59 UTC 2019. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.20.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.20.y
and the diffstat can be found below.thanks,
greg k-h
All tests are passing for Tegra ...
Test results for stable-v4.20:
Quoted 8 lines
11 builds: 11 pass, 0 fail 22 boots: 22 pass, 0 fail 22 tests: 22 pass, 0 failLinux version: 4.20.13-rc1-g6d10f1d
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra194-p2972-0000, tegra20-ventana, tegra210-p2371-2180, tegra30-cardhu-a04
Nice to see a new branch working for you :)
Thanks for testing all of these and letting me know.
greg k-h
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.20.13 release. There are 183 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 Feb 27 19:49:59 UTC 2019. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.20.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.20.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 4.20.13-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.20.y
git commit: 6d10f1d29969714a475c700b25eb8483c6d5f7cc
git describe: v4.20.12-184-g6d10f1d29969
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.20-oe/build/v4.20.12-184-g6d10f1d29969
No regressions (compared to build v4.20.12)
No fixes (compared to build v4.20.12)
Ran 13889 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
Test Suites
-----------
* boot
* install-android-platform-tools-r2600
* kselftest
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* spectre-meltdown-checker-test
* ltp-timers-tests
* ltp-dio-tests
* ltp-fs-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-open-posix-tests
* ltp-syscalls-tests
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 17 lines · Naresh Kamboju
Quoted 15 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.20.13 release. There are 183 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 Feb 27 19:49:59 UTC 2019. 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.20.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.20.y
and the diffstat can be found below.
Quoted 6 lines
Quoted 3 lines
thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.
Thanks for testing these and letting me know.
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.20.13 release. There are 183 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 Feb 27 19:49:59 UTC 2019. 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.20.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.20.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
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.20.13 release. There are 183 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 Feb 27 19:49:59 UTC 2019. 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.20.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.20.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 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.20.13 release. There are 183 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 Feb 27 19:49:59 UTC 2019. Anything received after that time might be too late.
Build results:
total: 171 pass: 169 fail: 2 Failed builds: powerpc:ppc6xx_defconfig powerpc:86xx/sbc8641d_defconfig Qemu test results: total: 291 pass: 291 fail: 0
The build failure is:
In file included from arch/powerpc/kernel/ptrace.c:24:
In function ‘user_regset_copyin’,
inlined from ‘vr_set’ at arch/powerpc/kernel/ptrace.c:490:9:include/linux/regset.h:258:4: error:
‘memcpy’ offset [-527, -529] is out of the bounds [0, 16] of object ‘vrsave’ with type ‘union <anonymous>’
The problem is not new. It is seen now because I switched to use gcc 8.3.0. The problem is fixed in linux-next.
Guenter
Greg Kroah-Hartman
maintainerQuoted 20 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.20.13 release. There are 183 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 Feb 27 19:49:59 UTC 2019. Anything received after that time might be too late.
Build results:
total: 171 pass: 169 fail: 2 Failed builds: powerpc:ppc6xx_defconfig powerpc:86xx/sbc8641d_defconfig Qemu test results: total: 291 pass: 291 fail: 0The build failure is:
Quoted 8 lines
In file included from
arch/powerpc/kernel/ptrace.c:24:
In function ‘user_regset_copyin’,
inlined from ‘vr_set’ atarch/powerpc/kernel/ptrace.c:490:9:include/linux/regset.h:258:4: error:
‘memcpy’ offset [-527, -529] is out of the bounds [0, 16] of object ‘vrsave’ with type ‘union <anonymous>’The problem is not new. It is seen now because I switched to use gcc 8.3.0. The problem is fixed in linux-next.
Ok, I'll ignore these powerpc build issues for now, 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.20.13 release. There are 183 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 Feb 27 19:49:59 UTC 2019. Anything received after that time might be too late.
Build results:
total: 159 pass: 158 fail: 1 Failed builds: powerpc:ppc6xx_defconfig Qemu test results: total: 343 pass: 343 fail: 0
Guenter