From patchwork Fri Jun 7 15:39:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 166162 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp802693ili; Fri, 7 Jun 2019 08:49:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjG/Xw6lXGkBgopqxKw1KFIoGMF+TfJVPwW+hBMKPDTxu7belIyuTdJBFjeuy1EFdAhbIF X-Received: by 2002:a17:902:ab90:: with SMTP id f16mr55303494plr.262.1559922540746; Fri, 07 Jun 2019 08:49:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559922540; cv=none; d=google.com; s=arc-20160816; b=WnexchTLXQfb48e9a3ckC6K5xjPNFHCe3UNbv7h27va4Eg9DNZMYUpLiew5mLKpyup NJ4FCjCSwDZzP4ZKSpw3f1JI8QZy0rQXDCN3eHWItclocV18LialVSmghd6ZcMUsvnnt mp9WaZnFMwFr3dos0e1vVGnVZoCj0qRsO40bUo6ma8M3zHZhj0KK1RoHuTUS7K6a3l/6 hpGSfpqxp3JfZ3opHZ3KLl6RHQym+FEZo+a8Zh3gE0x3MdCtTa0i2I09QssUEKDGgxeB Q66diUlFWb64N1D2pvOq9rLWktCRkj5+WiWGZ+Sp/vcb1cIP3ACg+QwsAnGFIGqtakol 3lDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fbliiaENZhdgQIe/6Oy4g6j9XVwKj2jrxFMN3TZ0zVY=; b=SEEB7hYQmQVUTUYBuFtef+WKApGyf8+hgbcu9S0Nv1AdzqsfuSnD3stHgfKuHB2XxU hZxk1D+zB992LIfhe3bdBii8em+KrkXdgZ18SdMyqU4S/vnkJKBI3CCldRODxGAwfuTH 6rgFnhIQOnZraVK5ny5RWgb6MV8sU9z7r9YcMLGkhsJ0hfZvsoHAUN3Ggaq4zFKHRj9u IbnvndTqXs/MFtzB5gkaeIe951U1T/pEXZVV0ZoyZVsNI1GkFRNWg/7JDM5xHeZNuoxQ i3FpgkkYFX66vvKJTJEqaskntizEwWJXNoFWOQuzxgFKuLBqmMyXicVKMvhzIGjllyaL 8R5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=twolFrTc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cg6si2427994plb.350.2019.06.07.08.49.00; Fri, 07 Jun 2019 08:49:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=twolFrTc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731866AbfFGPs7 (ORCPT + 30 others); Fri, 7 Jun 2019 11:48:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:34376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731854AbfFGPsv (ORCPT ); Fri, 7 Jun 2019 11:48:51 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9088020840; Fri, 7 Jun 2019 15:48:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922531; bh=qsBYCJp0T9BTNFdojWwxp9gA8fp2Y3KEZMWRQhokJBQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=twolFrTcwe3XRwuvPYoWqy39Am+u1ABg6xmrS+RHaz6zgO/hnNyDPDd2+giSa9Eoz dOW1yS2oRmonHk/VSvs3CbpddaSWg/7tTni3WZ27l5cY92NsFfxKb0jg3Hn0ourgng fdYDrsPd/bTkhALkpJu+S/gXR/k1E6SKFoOlyvN4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jorge Ramirez-Ortiz , Bjorn Andersson , Stephen Boyd Subject: [PATCH 5.1 46/85] tty: serial: msm_serial: Fix XON/XOFF Date: Fri, 7 Jun 2019 17:39:31 +0200 Message-Id: <20190607153854.732886196@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153849.101321647@linuxfoundation.org> References: <20190607153849.101321647@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jorge Ramirez-Ortiz commit 61c0e37950b88bad590056286c1d766b1f167f4e upstream. When the tty layer requests the uart to throttle, the current code executing in msm_serial will trigger "Bad mode in Error Handler" and generate an invalid stack frame in pstore before rebooting (that is if pstore is indeed configured: otherwise the user shall just notice a reboot with no further information dumped to the console). This patch replaces the PIO byte accessor with the word accessor already used in PIO mode. Fixes: 68252424a7c7 ("tty: serial: msm: Support big-endian CPUs") Cc: stable@vger.kernel.org Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/msm_serial.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -860,6 +860,7 @@ static void msm_handle_tx(struct uart_po struct circ_buf *xmit = &msm_port->uart.state->xmit; struct msm_dma *dma = &msm_port->tx_dma; unsigned int pio_count, dma_count, dma_min; + char buf[4] = { 0 }; void __iomem *tf; int err = 0; @@ -869,10 +870,12 @@ static void msm_handle_tx(struct uart_po else tf = port->membase + UART_TF; + buf[0] = port->x_char; + if (msm_port->is_uartdm) msm_reset_dm_count(port, 1); - iowrite8_rep(tf, &port->x_char, 1); + iowrite32_rep(tf, buf, 1); port->icount.tx++; port->x_char = 0; return; From patchwork Fri Jun 7 15:39:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 166167 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp806728ili; Fri, 7 Jun 2019 08:52:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxZysWZOuCI9juOKHShkwLTGNQwTMl0qRbWWkXeh5hAH4QleJDUsjJQSHlBbOpeykrX2Zy X-Received: by 2002:a63:fd50:: with SMTP id m16mr3416479pgj.192.1559922755701; Fri, 07 Jun 2019 08:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559922755; cv=none; d=google.com; s=arc-20160816; b=XpeRJ+3p1CG14Fs9NmM0hTJmxeiiTMIBq/6SUClQvKEQfsHcLZhQZQcmeUkrr8f9NA uGUL/H/klWKMBoRh5kVqD5LvtveiitYWNL5e9wV8WTygZdnAs9dH2Pd6SBh96XZ4bUla OEbdbMCbHdUz3MkikaRqzwhLRFxCIGdyNROccdjOtxbxCeOdlZAsjHR1N6ytfwZSnlQf 8w1xky1fuIHvORO0M6Z7rtXYoIF1bDxe96hP30Ei8P4FynYeOxWKqxgb3vj1xBcC1Tlf x0tCEZ8HbL3Y/hilj1yfYBLYTkOt6yRs0+jWW82xDXxhcS6EIgndHjlGX49+t1CTj7v6 /kBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b6gJa24PqlAcis9m8EGax6taAcL4PeeIEbiS38ljRL8=; b=oxWepPQMJ4aUIKQFPxkKldzHHjlMsynFSGg12kV/CwD1eKCFRR9c5BnkS6O5GamIbj 8Mr0tgiAvkMNCXh7BfgCsw2k7wtA/OOjhz1diTbTNB/oqO9gPKF/YZ1JIPLiwl3T5LAc VFqCRfA7VRuB7j+iqnqDoEpXy4FR9mN805ygeiATKS0/gEZgQJZK8hZR26YCeFIapL3j wDc6xvR6G0HHHEAg+UI9oQulzmyJ7cgrWZfzzSmKwlQSdC5LS7FbIMwTvDwQI6V/dv5S nkl17vOaDvbd7xkwIk0dLJmbc90VYzh7O7vZDYbl2xwfWARgqPFZsDbpNLajDNjnB8C2 +oHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VCg9aAIj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si2122053pjw.80.2019.06.07.08.52.35; Fri, 07 Jun 2019 08:52:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VCg9aAIj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732162AbfFGPwe (ORCPT + 30 others); Fri, 7 Jun 2019 11:52:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:34928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731880AbfFGPtM (ORCPT ); Fri, 7 Jun 2019 11:49:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E3D9C21473; Fri, 7 Jun 2019 15:49:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922551; bh=hC9OXVXPHX4MXhpkf48AC7gVpWOSOd+PECCwdEPvt3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VCg9aAIj47n0wSUoWaAf9JeI9EEigij98+QnELI0uHq7ZjDEjbY7BMWS6lDS5zcFq kZoQef7BAmXCvW0AModZi23A7mbI3W1tfabt9sR8S1m7RA4o3v0bh0KtknmXOtDOCx nNggX6Im5vP6FQUmUpVI+W/QZscd6BRFc501jQp4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Suzuki K Poulose , Marc Zyngier , Mel Gorman , Anshuman Khandual , Michal Hocko , Qian Cai , Andrew Morton , Linus Torvalds Subject: [PATCH 5.1 53/85] mm, compaction: make sure we isolate a valid PFN Date: Fri, 7 Jun 2019 17:39:38 +0200 Message-Id: <20190607153855.424689098@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153849.101321647@linuxfoundation.org> References: <20190607153849.101321647@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suzuki K Poulose commit e577c8b64d58fe307ea4d5149d31615df2d90861 upstream. When we have holes in a normal memory zone, we could endup having cached_migrate_pfns which may not necessarily be valid, under heavy memory pressure with swapping enabled ( via __reset_isolation_suitable(), triggered by kswapd). Later if we fail to find a page via fast_isolate_freepages(), we may end up using the migrate_pfn we started the search with, as valid page. This could lead to accessing NULL pointer derefernces like below, due to an invalid mem_section pointer. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 [47/1825] Mem abort info: ESR = 0x96000004 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp = 0000000082f94ae9 [0000000000000008] pgd=0000000000000000 Internal error: Oops: 96000004 [#1] SMP ... CPU: 10 PID: 6080 Comm: qemu-system-aar Not tainted 510-rc1+ #6 Hardware name: AmpereComputing(R) OSPREY EV-883832-X3-0001/OSPREY, BIOS 4819 09/25/2018 pstate: 60000005 (nZCv daif -PAN -UAO) pc : set_pfnblock_flags_mask+0x58/0xe8 lr : compaction_alloc+0x300/0x950 [...] Process qemu-system-aar (pid: 6080, stack limit = 0x0000000095070da5) Call trace: set_pfnblock_flags_mask+0x58/0xe8 compaction_alloc+0x300/0x950 migrate_pages+0x1a4/0xbb0 compact_zone+0x750/0xde8 compact_zone_order+0xd8/0x118 try_to_compact_pages+0xb4/0x290 __alloc_pages_direct_compact+0x84/0x1e0 __alloc_pages_nodemask+0x5e0/0xe18 alloc_pages_vma+0x1cc/0x210 do_huge_pmd_anonymous_page+0x108/0x7c8 __handle_mm_fault+0xdd4/0x1190 handle_mm_fault+0x114/0x1c0 __get_user_pages+0x198/0x3c0 get_user_pages_unlocked+0xb4/0x1d8 __gfn_to_pfn_memslot+0x12c/0x3b8 gfn_to_pfn_prot+0x4c/0x60 kvm_handle_guest_abort+0x4b0/0xcd8 handle_exit+0x140/0x1b8 kvm_arch_vcpu_ioctl_run+0x260/0x768 kvm_vcpu_ioctl+0x490/0x898 do_vfs_ioctl+0xc4/0x898 ksys_ioctl+0x8c/0xa0 __arm64_sys_ioctl+0x28/0x38 el0_svc_common+0x74/0x118 el0_svc_handler+0x38/0x78 el0_svc+0x8/0xc Code: f8607840 f100001f 8b011401 9a801020 (f9400400) ---[ end trace af6a35219325a9b6 ]--- The issue was reported on an arm64 server with 128GB with holes in the zone (e.g, [32GB@4GB, 96GB@544GB]), with a swap device enabled, while running 100 KVM guest instances. This patch fixes the issue by ensuring that the page belongs to a valid PFN when we fallback to using the lower limit of the scan range upon failure in fast_isolate_freepages(). Link: http://lkml.kernel.org/r/1558711908-15688-1-git-send-email-suzuki.poulose@arm.com Fixes: 5a811889de10f1eb ("mm, compaction: use free lists to quickly locate a migration target") Signed-off-by: Suzuki K Poulose Reported-by: Marc Zyngier Reviewed-by: Mel Gorman Reviewed-by: Anshuman Khandual Cc: Michal Hocko Cc: Qian Cai Cc: Marc Zyngier Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1397,7 +1397,7 @@ fast_isolate_freepages(struct compact_co page = pfn_to_page(highest); cc->free_pfn = highest; } else { - if (cc->direct_compaction) { + if (cc->direct_compaction && pfn_valid(min_pfn)) { page = pfn_to_page(min_pfn); cc->free_pfn = min_pfn; } From patchwork Fri Jun 7 15:39:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 166163 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp803085ili; Fri, 7 Jun 2019 08:49:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3GiBMe7I9Lxv+4Upmby54iqYIHrbL8dyCZCf4WiBzxQHkrVv5ahkeiuCeQhAnejChqOLO X-Received: by 2002:a63:5c1a:: with SMTP id q26mr3544048pgb.260.1559922560815; Fri, 07 Jun 2019 08:49:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559922560; cv=none; d=google.com; s=arc-20160816; b=wnTEbLQQ/Bw9bBlJ3Ree/Nd3tm+qQxc9PEhSTKgHgENILi8VDbdoATC+zIx/UY8+g0 UsJ+096DiFO7LPVKCFtqSqZJ7WjrmrN/e4xcfTdWx9Kr6Pf4M2z4KyFNL2RUGU1ri6cc TYCwl65B7YKng1F0BPDdZiivaTwdYzsUVZpvTKKpS6MWzEcUnl8cMDD6W8Dh54PHGixP Kc5nEmaBVD43/1TXaV9i8vASnzcblW9v8FOidR6B9F2To3br5u6u972TqQhDZrmic5+5 Ha9Y1om791GHElJWl/AdeJ6aBrNnmRU7ykTs1Q2o1TEry8zRgB5omLGylx76bXmJ8Qsh JZZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6ExBDgcSDbdGMr5YOfmBM8k/qS/T3lqkKZO15iHk6V8=; b=NaTFWN3Elq3dGntDcW7o7TqubxeoeW7qF7vNs+in2ZQabfPIsxZ7GtnPMXmxqJsTh6 B48p8e68EEQwe7k1sncaEur+uHZE8ps4y2Zm0D67ccdOhgl1RV7PbacIhcrqYM6hLUun ISce02mQeGSsTUrKN2CyA69kmt5ZKLIDsOKdyRniIUAKyTr31lcLM1Ri1Eup0Pnj8NeP QDUju50qcCIKg5ldNWlj5ll2UBr8nCMd/pnTFCwUsgGQWM2ZJO4DijgwvBqX6LIQbVZC HBkZm+UVM5p18NjBRgISWVDdOnl8Oy85ZYKpviAF9SCfYJ2TNThXCIb5JuDeqZibvpXL b2fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eM1UZgx3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si2074187pgs.312.2019.06.07.08.49.20; Fri, 07 Jun 2019 08:49:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eM1UZgx3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731928AbfFGPtT (ORCPT + 30 others); Fri, 7 Jun 2019 11:49:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:35098 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731919AbfFGPtR (ORCPT ); Fri, 7 Jun 2019 11:49:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 44F9221473; Fri, 7 Jun 2019 15:49:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922556; bh=2nSs+r0mkSEPa95yznIxQ/o92NaL/HmVqSOrpeVP8Es=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eM1UZgx36oE5sz1FdkqpYRks8kDd9UjwqTeqPRozT/JntqtNKc4ZmveDVqo9+CKZK /qlVTElOjEGoRfnzZcByzmZqzcoaTSRUGHBhG/Ay4hZUy52JY21q1Xi7LDjMPteNhn VWsElZSQGlTTpyVwdbz30xWozljdV7ddybcq1QWM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Rutland , Catalin Marinas , Will Deacon Subject: [PATCH 5.1 54/85] arm64: Fix the arm64_personality() syscall wrapper redirection Date: Fri, 7 Jun 2019 17:39:39 +0200 Message-Id: <20190607153855.515650835@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153849.101321647@linuxfoundation.org> References: <20190607153849.101321647@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Catalin Marinas commit 00377277166bac6939d8f72b429301369acaf2d8 upstream. Following commit 4378a7d4be30 ("arm64: implement syscall wrappers"), the syscall function names gained the '__arm64_' prefix. Ensure that we have the correct #define for redirecting a default syscall through a wrapper. Fixes: 4378a7d4be30 ("arm64: implement syscall wrappers") Cc: # 4.19.x- Acked-by: Mark Rutland Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm64/kernel/sys.c +++ b/arch/arm64/kernel/sys.c @@ -50,7 +50,7 @@ SYSCALL_DEFINE1(arm64_personality, unsig /* * Wrappers to pass the pt_regs argument. */ -#define sys_personality sys_arm64_personality +#define __arm64_sys_personality __arm64_sys_arm64_personality asmlinkage long sys_ni_syscall(const struct pt_regs *); #define __arm64_sys_ni_syscall sys_ni_syscall From patchwork Fri Jun 7 15:39:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 166165 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp803173ili; Fri, 7 Jun 2019 08:49:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOZ9A0K7P3k/ewwkcrA/aqFAvHh5LU606Jryw3cg7KdDPD+i+82DTiZ+8SMJxTFDHXE9DK X-Received: by 2002:a63:7e43:: with SMTP id o3mr3470362pgn.450.1559922566702; Fri, 07 Jun 2019 08:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559922566; cv=none; d=google.com; s=arc-20160816; b=Dwcv1sC+TKD9ON/zxHu7Y3WPIazX2b1wt1ARtkM6JOPrPW4K8qITk5O1OMyHmWRkb8 nFcDUrfhN3ABtqBnnuAAj2C/rWTEHpN9aGwhivj3RXFAwGfM/8Zv5fTg7QfWGN2rfqWi whnAg7po8hNzTiMI1PxLR7IFsX4/BIbVZHSBQM4B405BPLjUI9CiAUMDpRrlyQBEZkER TJye8qPJ/k/OymLHEhOGtJT1YqWleMHD8Mjhby3fqThdnUpxrOG6AcJCYlWIGUhJeLSi 914erVkUOFEOeIGy9tnGb9vz6qzBtb6lqZcS4gHBiU2sOMenAFH2RgX8hspmhQ+M6kFv ddnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Dx+xx4M2UTtoUNae+utChSz46p8ENhfOC+gJr/9qCqM=; b=y3fQvNstIhh5co64aGBDcVgFM29SqlWFQRUNCxJQCKEDhZ9BfYDakUD+fEVf/WKBGK 93TJRmvXR8CPnWODo8udkwwtqEXPE7HZroIm27fxWJK1yYJrZ5W+KciE68MgqAyWOAg4 BAgwq6yRK59uqp7j8W+FIpbpseKsqXIPY7aUkJbaHOjz+c2iCL51MaLLiK9tWelW5qfJ LHBffdmz8RbkTAPvQbGvxyVdh9ZpBKXxkg5p1GEDB1h8QWQB1GyHFOZw+UiUbn4jG8BP l9z31KysuqWYzaMRDoNmr+jGsLmmqdG9ra4usq/fJiZQ98KpI8Vlre1u/m7Ln3fggcEd o2kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ftwywd6o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si2074187pgs.312.2019.06.07.08.49.26; Fri, 07 Jun 2019 08:49:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ftwywd6o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731953AbfFGPtZ (ORCPT + 30 others); Fri, 7 Jun 2019 11:49:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:35276 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731937AbfFGPtX (ORCPT ); Fri, 7 Jun 2019 11:49:23 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B6557214C6; Fri, 7 Jun 2019 15:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922562; bh=W6EXKwO2WLwrLah4By7DIUZSSEhhHmOZCXmMzKqlDxo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ftwywd6o58e5lUzPgj9PtmnbSAEuCuYQXEcdkGhZksoSv2HKGdeDZYt3aYRmT7Xco UHDq8NJixtv7S+YvzunvyXXH1XNrUAR2xoGEhNT4gbdoaCZQ3+H0c7AtDGh/q79UVR wkkSFXIh7WmnuhMM57uDhmWiUQiyUdNEG4KhVjmk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Corbet Subject: [PATCH 5.1 56/85] doc: Cope with the deprecation of AutoReporter Date: Fri, 7 Jun 2019 17:39:41 +0200 Message-Id: <20190607153855.717899507@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153849.101321647@linuxfoundation.org> References: <20190607153849.101321647@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonathan Corbet commit 2404dad1f67f8917e30fc22a85e0dbcc85b99955 upstream. AutoReporter is going away; recent versions of sphinx emit a warning like: Documentation/sphinx/kerneldoc.py:125: RemovedInSphinx20Warning: AutodocReporter is now deprecated. Use sphinx.util.docutils.switch_source_input() instead. Make the switch. But switch_source_input() only showed up in 1.7, so we have to do ugly version checks to keep things working in older versions. Cc: stable@vger.kernel.org Signed-off-by: Jonathan Corbet Signed-off-by: Greg Kroah-Hartman --- Documentation/sphinx/kerneldoc.py | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -37,7 +37,17 @@ import glob from docutils import nodes, statemachine from docutils.statemachine import ViewList from docutils.parsers.rst import directives, Directive -from sphinx.ext.autodoc import AutodocReporter + +# +# AutodocReporter is only good up to Sphinx 1.7 +# +import sphinx + +Use_SSI = sphinx.__version__[:3] >= '1.7' +if Use_SSI: + from sphinx.util.docutils import switch_source_input +else: + from sphinx.ext.autodoc import AutodocReporter __version__ = '1.0' @@ -121,13 +131,7 @@ class KernelDocDirective(Directive): lineoffset += 1 node = nodes.section() - buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter - self.state.memo.reporter = AutodocReporter(result, self.state.memo.reporter) - self.state.memo.title_styles, self.state.memo.section_level = [], 0 - try: - self.state.nested_parse(result, 0, node, match_titles=1) - finally: - self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = buf + self.do_parse(result, node) return node.children @@ -136,6 +140,20 @@ class KernelDocDirective(Directive): (" ".join(cmd), str(e))) return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))] + def do_parse(self, result, node): + if Use_SSI: + with switch_source_input(self.state, result): + self.state.nested_parse(result, 0, node, match_titles=1) + else: + save = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter + self.state.memo.reporter = AutodocReporter(result, self.state.memo.reporter) + self.state.memo.title_styles, self.state.memo.section_level = [], 0 + try: + self.state.nested_parse(result, 0, node, match_titles=1) + finally: + self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = save + + def setup(app): app.add_config_value('kerneldoc_bin', None, 'env') app.add_config_value('kerneldoc_srctree', None, 'env')