Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1583246pxb; Sat, 23 Apr 2022 10:37:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUgEgd9KolNSDtk15wVAxJQIM2bcMKZlbdLEQKjvoPi1lsabFN5EMTjyQyvIgsPd+ndQY5 X-Received: by 2002:a05:6a00:891:b0:4fe:1262:9b4e with SMTP id q17-20020a056a00089100b004fe12629b4emr10770144pfj.21.1650735465375; Sat, 23 Apr 2022 10:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650735465; cv=none; d=google.com; s=arc-20160816; b=ijmj3Dpm6dD8/hZ0Qg5EpA5PLRqZxNb1RF6DeNbClmNxV/WucMoGdPr2t2/fKSnvBv zPDM/5ulOuuJ+vQGArcnlj05icexlCBUTtf4vCHfk9kizu8wlonSTPDDKCLLFmM7/tCu GdLwia0RKNjaUVP826XLmsby1Cdra+c2Cr4YWEuMqYehO+Dtrn9+eQm9MFXXdGPT+rey XnZ2a+66LgdGbS+ht0g/BIph/bsIZp5oukKIEu88L1JOB73W4Gce/WBIlxOkfqkNIxCe tRv42OOO/xVeBkiAHSpm866lmL4Lkor+PoTz+fx6qv9/CUax8/NgqM6zCjgY6JNju9YS jcGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hmwzzU+oUsjeOQ4831eC65EcSxjUz8YhjuhTAsVP8U8=; b=qcZzvaxO3N+sR+XFK8f+5WbjmA5As04veBfeBGNDPNxnrR9vUaPv+Fri/11IP4ZGlm g65iHfYwZBC7dyCG2WyPyBVbaPGVpo/tOa8Bk+n90MrgvPHursEHiW7XaRA3kKQ47wH1 fpWE7OBOFQiEaZp6WKNzJ7Lzf6zNo5j/cgjRd+bD4u6MRb27VE5KVCFUq7aqWjOxQg1z RsT6Ad5siKF4syzoidCxgdoNDpyQk3vM7ARc/d4fx5lQ86YgrUvlsgSxALPH8ZI8gg7/ dOMhAo8c1CMHnaiAFA3ojSDm168glFtJd7yTwCDP0Fq4Qa7T90qMCXbkfF3lHYkpkZJL ej5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CTywPRVt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r123-20020a632b81000000b0039ce0b69438si11515370pgr.370.2022.04.23.10.37.23; Sat, 23 Apr 2022 10:37:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CTywPRVt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234942AbiDWK2F (ORCPT + 99 others); Sat, 23 Apr 2022 06:28:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234891AbiDWK13 (ORCPT ); Sat, 23 Apr 2022 06:27:29 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C022564E6 for ; Sat, 23 Apr 2022 03:24:31 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id u17-20020a05600c211100b0038eaf4cdaaeso9512953wml.1 for ; Sat, 23 Apr 2022 03:24:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hmwzzU+oUsjeOQ4831eC65EcSxjUz8YhjuhTAsVP8U8=; b=CTywPRVtNSBTMd0idOhtNLInS25aX2di8NMiKJ27MTuKI1wC3wAHYqqtMgBrz8Uk38 h2aEDAHeC30IBkOpwZ/KQ1AZ8P1nGF09QL9Wcaz6pUWT8JZe4PCbvW3AuES/GZ/hqdwh sMlhO9k9rvzQIs5689LR03VsW1J2lMBR3y7QcQQsmFNkOybMA4OucGR6KhLNEDo5GbF8 JnWhJAaO114p3KBNsbT5zEMilZ9I///u+DrVidCADR5QS0CwEtJktemFPTBWIcjgm8qD HLRvSofPBigx71DWgavXtPg2FtQi+l9kNCWFTDyG7mEZABSWaYGj+it8R9DmjZxeaHTz zIsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hmwzzU+oUsjeOQ4831eC65EcSxjUz8YhjuhTAsVP8U8=; b=ja4+w45Jqdd02UVgSJ6dl8oA0LTprs2orcykkSQcYbi9/KzCCSaMGn+IV7jkOjZBZx etATruSf0IcLMhHNh3HJr6Cj6KS58OIeUqhfG8SnFFF6Wpu6t+9Jg4XauQ5yx63OR4h+ 2Ob+pKMbSmNKULBBVFVSG8g9X9gmUv2jRoCvLaCXNsoiy/fQYzOLk1oqB2CVM6NGQCoq lFno6HyiG6R3V5SvDFbrqTxHcuIcVHxAXGR6AAoSDYJEW2cLTY4lkPhwCkMg9K+GoYKa gDJfiUiQ/laVRaM6o2pr+gibqgc11ATtaEcqKkKppMAhy+sU7N15h1Y/BTcYOttueEvG LQ8Q== X-Gm-Message-State: AOAM530oB78XtYzRQRoboPoGLH+/Xe/a5eYNCunm1Pab/d64A8dLpct/ kBbK3zrH/Csh87G3ti18008= X-Received: by 2002:a7b:cf05:0:b0:38e:b707:1c3d with SMTP id l5-20020a7bcf05000000b0038eb7071c3dmr7890731wmg.164.1650709470282; Sat, 23 Apr 2022 03:24:30 -0700 (PDT) Received: from localhost.localdomain (host-79-50-86-254.retail.telecomitalia.it. [79.50.86.254]) by smtp.gmail.com with ESMTPSA id t15-20020adfeb8f000000b002060d26c211sm4089057wrn.114.2022.04.23.03.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 03:24:28 -0700 (PDT) From: "Fabio M. De Francesco" To: Greg Kroah-Hartman , =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Hridya Valsaraju , Suren Baghdasaryan , Ira Weiny , linux-kernel@vger.kernel.org Cc: "Fabio M. De Francesco" Subject: [PATCH 0/3] binder: Use kmap_local_page() in binder_alloc.c Date: Sat, 23 Apr 2022 12:24:18 +0200 Message-Id: <20220423102421.16869-1-fmdefrancesco@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kmap_local_page() in binder_alloc.c because kmap() and kmap_atomic() are being deprecated and kmap_local_page is preferred where it is feasible. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Furthermore, the mapping can be acquired from any context, including interrupts. Fabio M. De Francesco (3): binder: Use memset_page() in binder_alloc_clear_buf() binder: Use kmap_local_page() in binder_alloc_copy_user_to_buffer() binder: Use kmap_local_page() in binder_alloc_get_page() drivers/android/binder_alloc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) -- 2.34.1