Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp113080ybi; Fri, 7 Jun 2019 05:09:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWl86xCrTCHWaOXx/OMIQI+/NJvLPEGBrxiFiMjKvIQ8vNByOs5lt3z70pGDKnsZM8yLQ6 X-Received: by 2002:a63:490a:: with SMTP id w10mr2406467pga.6.1559909364201; Fri, 07 Jun 2019 05:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559909364; cv=none; d=google.com; s=arc-20160816; b=UvDFSDmxzLXVPQ1Ri8VhJ9laleBI5q3Rynq76CzM2c3nWODZF/+b6wGX+zzyMiyQFF TAyhmUuZRz7N7GuBycwIPp+I7nZKpVzhEvjeNoRSQko7UwY0UfmS0LxA0ktmlttB4Df5 wNEU02F469D8FbyqynIcAIkt/TzhGXSy3YT8wJEpynbwYA8hGtKR9rk9SspiGbKddQv/ OGCqN6ssrqVVBRzmgikl8TgnROaqaKJfaJTxtezrDfSMfNURyvpmjGx7NlsZAC5UUdoG Df+Qdpp2c/8/B+bq0AXpoBEn6KkUqJ0nk+9uBa73+2asm9+14rBySpOT1sdEJJ4nB4Dd JNvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=7J7o7uQ9LJadOWTjygndomDcwWjz9mufJXpnzLuwVGc=; b=UiqEpo3fTgn9hGX141xixZLF448RbbGPn8w3+x8qGTCv1YflIRk16+A+C5ytDPBn8V +GoutQZgLNOFFZAxCLBOMgAa31NB4FS9wN5LlXUh6IukW5El46via9bEHqr84mA/DGs+ XKRppqH8MaDVlduFDV8L0qVKDLmuTsCof4gyvT8YqRbqbw3ipBrJUAUfT1X5Su1Q1WhN toBVSynox+7kQUJEJvsQS6jScsTNL5S2afF7j/cLcPRmZt4WraKpEpNN4uSCW5uruK3Y LOVWxipmz3TpV1EaXhTKNtXJ/i3N/D4mFeVEXvI1l0tczOc0Aq/nVjE7jg0cRBN9tJt/ DJwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b="shBn+/bZ"; 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 n7si1585076pgq.459.2019.06.07.05.09.07; Fri, 07 Jun 2019 05:09:24 -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=@canb.auug.org.au header.s=201702 header.b="shBn+/bZ"; 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 S1728563AbfFGMEW (ORCPT + 99 others); Fri, 7 Jun 2019 08:04:22 -0400 Received: from ozlabs.org ([203.11.71.1]:46453 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727452AbfFGMEV (ORCPT ); Fri, 7 Jun 2019 08:04:21 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 45L1Qt4FFfz9sNd; Fri, 7 Jun 2019 22:04:06 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1559909057; bh=SVse233ZP/gfWiwAkphdAiPtrWGA02EH5CK05uTxdco=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=shBn+/bZp4+i7ILKYT0rkicAc6qcmmQP1VlZ3saK03LKB9zc/NDFJ5cjhXqlEHyPz 2nllWsT+DJ6D5zDFTOmqEnjXbNpqikUY4YWSMMSeJwu5ucFQSEtL4eZUc6HVdKK4TE qeoWLj3UUE4M9QEUmDXWh2ARrdai0SPhHQww77UvDoWOKjYJt4Bb67lNhTHgNKLPBy 6p7Lz1Bv/DqsVATPnHpr/EbevipmxUHrPDNyWaHhD6m4citn/ZVKw/Yu0UerC8T4Bm d5uAfepi6bZG8PmazXKqBSrkpabcAFZqyXErnjGLWQxR8X21ypmE9ZV6+vmRkEQUdV qL0IogG/ZPB0Q== Date: Fri, 7 Jun 2019 22:03:26 +1000 From: Stephen Rothwell To: Anshuman Khandual Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, Andrew Morton , Michal Hocko , Matthew Wilcox , Mark Rutland , Christophe Leroy , Andrey Konovalov , Michael Ellerman , Paul Mackerras , Russell King , Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , Martin Schwidefsky , Heiko Carstens , Yoshinori Sato , "David S. Miller" , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Andy Lutomirski , Dave Hansen Subject: Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault() Message-ID: <20190607220326.1e21fc9c@canb.auug.org.au> In-Reply-To: <1559903655-5609-1-git-send-email-anshuman.khandual@arm.com> References: <1559903655-5609-1-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/f4dkIceQ5ZrfVlbLmfAkblH"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/f4dkIceQ5ZrfVlbLmfAkblH Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Anshuman, On Fri, 7 Jun 2019 16:04:15 +0530 Anshuman Khandual wrote: > > +static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs, > + unsigned int trap) > +{ > + int ret =3D 0; > + > + /* > + * To be potentially processing a kprobe fault and to be allowed > + * to call kprobe_running(), we have to be non-preemptible. > + */ > + if (kprobes_built_in() && !preemptible() && !user_mode(regs)) { > + if (kprobe_running() && kprobe_fault_handler(regs, trap)) > + ret =3D 1; > + } > + return ret; > +} Since this is now declared as "bool" (thanks for that), you should make "ret" be bool and use true and false; --=20 Cheers, Stephen Rothwell --Sig_/f4dkIceQ5ZrfVlbLmfAkblH Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAlz6Uo4ACgkQAVBC80lX 0GwAlwgAndGNjcRg/+OZtSy1kiUIeIc3sDi7Ok5AjcBz7eTGTC6rACK7/CqF74Ff Hw76yMUeoSjtJWLlhqmY0XI4ib30yQJSvSSWJyDvZpmgkDbNO69BK4rT4CO/d2YX sCodILuUU462hNmmfr9N6uWJGSeDWdEvbfitkR2PEzQAUSsQacEA8UB+bqf+zQ13 xwBTJEE0YFg5UCqOcsE3bSTh/e+p7djYHrQIiZX0ntJOra+nJZuz/GfJQUmx4WYn AHgcP+Marnv0/MW4JDWYDtetq+Fmr96wk01Ex4gMytm7TcpL0asnQ0IEVwljvVr/ HFKp+ZJLlwZP8lyt90zY76EEDgViPQ== =7Lk0 -----END PGP SIGNATURE----- --Sig_/f4dkIceQ5ZrfVlbLmfAkblH--