Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2461886pxb; Tue, 13 Apr 2021 02:26:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX3KGfELemEBy1hOmCthiwdZNoa5Qu/zcULivDVGUXJR3vptVqdvWnNwZ+CM0h/g8MHpRA X-Received: by 2002:a17:902:b601:b029:eb:1207:86ec with SMTP id b1-20020a170902b601b02900eb120786ecmr6247660pls.3.1618306016538; Tue, 13 Apr 2021 02:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618306016; cv=none; d=google.com; s=arc-20160816; b=x8xa5is0QJIw+SHhVIVMV1wvODGiaizF5amu/CWzpFOU6LylUVs7ZDqeFwiXY8xbUS 2J+8eotUJeS36HFYIL+painspktwfr+eTOh0/k/n0Wilo3HQRSagnujkm9WuigzoLD0j uS9vtuxe05I3R1RIrz+yg3XovkXZlf1gS80iUMt+vvTaK+ee1JQRLX6m7kojeecdA0hH NUuPIGfTZgU2IyAjRrAH47nJiG4LfrYmJrsESPJPPkebDU1tQpTJnvkeBfzOZ2t6jOOP L7g2+Q+u0bfuE6cMukwTa3PYJX9nvHbPc2GEYiZlRcbS9cYnLnKWdtTSJy+OYi9fAjjI 1aZQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=feIVpLFE1LuKHeWl7tSeE0lvZCEn+UQxw9M1VcpRdeE=; b=C3bHGsdFUEayPEKa3itOp9/rKZCM9HnBhXLXWe0H5EFWkb6m3ely55YR1mMBVVA1/2 e41jlDOpK/3GdCoi7QFTwu8Fv38uLgosfEh3o7v2OkPuO16ooDBALVWv5z384nUYQKqj N6M0pAEo9CP/Cd3V9L8gh8R4u+aTws6iZLVZpsNriSr+ueTIQW5nNxKcUTc5ii3H08NJ Pkp909WbXblGDvXJgyfYsUfCr0guV+ufhRiLRuivwqcJVTsq5IwA6FnRCfU3plXOlLKc yrj1grAAaJycRhykfthhxREmsPyWRIEU1TAM4JrzWddMxcBOvLYIcbUA0VkX7QgHbyp5 Gj5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GpFpHIOw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si3790320pgr.94.2021.04.13.02.26.42; Tue, 13 Apr 2021 02:26:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GpFpHIOw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S241815AbhDMHhk (ORCPT + 99 others); Tue, 13 Apr 2021 03:37:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240983AbhDMHh1 (ORCPT ); Tue, 13 Apr 2021 03:37:27 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F302FC061574 for ; Tue, 13 Apr 2021 00:37:07 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id b8-20020a17090a5508b029014d0fbe9b64so10234252pji.5 for ; Tue, 13 Apr 2021 00:37:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=feIVpLFE1LuKHeWl7tSeE0lvZCEn+UQxw9M1VcpRdeE=; b=GpFpHIOws7zBoR17dduUSnimAlwRHvxx/OuefV80lyVH1CZe0awKNyHIfsVLHNeo0X 3cYDuxCM0eBESd5+9NS1wVaPEROybF9n5jC/N51D+1dtMLh5kXikVKX3H3mCh01yvyGO jAmVEYVdniP5cOr0EmV16a9Xy6tPppTM9k9+q5rhENYm09T8dJulUKqIC40sPc3TJKVH BRc52Qn7KaFpLG5lElyujBhxUrtk0FdkAmw5uGpRiKBwl3575UV5CSNVAFnVGka20BUf asXjwGyUJLaBZPzaLF0mMxpzgMgIzr7NvYrA0epjBCfatBAa8/kXPc2LTw0tlTOTpLWP 4iXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=feIVpLFE1LuKHeWl7tSeE0lvZCEn+UQxw9M1VcpRdeE=; b=XhL1pqNiFb0umqxz4Se6LjEaVQheBhi1gjOF49zTpVrp6h64VBvATU8ENDRpe0RlVh 0aRtMpfNnewSh7+jgKRRC/0s9aI08hin0xS0htOFuRhvRPftYYg/3KvV969UuetYT5Th wgUk0sro9TNdKieQF4Squzf8Uzi+AyQW29ZOMVxcBEt/F8RKMqiuExgGNUorJprmNm3l UpgO0nT3jncqlCbVKoSLKYtXnzzSe1b3QxyuyByiDtH74jp6lW4G0lZE4hEru/fxQ53t YNUlkmv43d2dBGkQqMApmSNLANI5HmXwXGu1Ux8PmLrSjYN4wum6icpnBUWDFnXEAoBW QdsA== X-Gm-Message-State: AOAM533Vntw1vACXgeQGkJ6hCG+W5Lxlhq60jzB0oxgJo1cvSoxtkS9W zn3GU6HjVgG7JVNouuG8U7YePgASkxA= X-Received: by 2002:a17:902:e549:b029:e6:6b3a:49f7 with SMTP id n9-20020a170902e549b02900e66b3a49f7mr31951897plf.52.1618299427630; Tue, 13 Apr 2021 00:37:07 -0700 (PDT) Received: from edumazet1.svl.corp.google.com ([2620:15c:2c4:201:71d7:d843:bfe8:bec7]) by smtp.gmail.com with ESMTPSA id a3sm1349068pjq.36.2021.04.13.00.37.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 00:37:07 -0700 (PDT) From: Eric Dumazet To: Ingo Molnar , Mathieu Desnoyers , Peter Zijlstra Cc: "Paul E . McKenney" , Boqun Feng , Arjun Roy , linux-kernel , Eric Dumazet , Eric Dumazet Subject: [PATCH 2/3] rseq: remove redundant access_ok() Date: Tue, 13 Apr 2021 00:36:56 -0700 Message-Id: <20210413073657.2308450-3-eric.dumazet@gmail.com> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210413073657.2308450-1-eric.dumazet@gmail.com> References: <20210413073657.2308450-1-eric.dumazet@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Dumazet After commit 8f2817701492 ("rseq: Use get_user/put_user rather than __get_user/__put_user") we no longer need an access_ok() call from __rseq_handle_notify_resume() Signed-off-by: Eric Dumazet Cc: Mathieu Desnoyers Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Boqun Feng Cc: Arjun Roy Cc: Ingo Molnar --- kernel/rseq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/rseq.c b/kernel/rseq.c index d2689ccbb132c0fc8ec0924008771e5ee1ca855e..57344f9abb43905c7dd2b6081205ff508d963e1e 100644 --- a/kernel/rseq.c +++ b/kernel/rseq.c @@ -273,8 +273,6 @@ void __rseq_handle_notify_resume(struct ksignal *ksig, struct pt_regs *regs) if (unlikely(t->flags & PF_EXITING)) return; - if (unlikely(!access_ok(t->rseq, sizeof(*t->rseq)))) - goto error; ret = rseq_ip_fixup(regs); if (unlikely(ret < 0)) goto error; -- 2.31.1.295.g9ea45b61b8-goog