From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AEE0C433E0 for ; Sun, 19 Jul 2020 22:52:00 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91528208B3 for ; Sun, 19 Jul 2020 22:51:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91528208B3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vt.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1jxI97-0007rX-6B; Sun, 19 Jul 2020 18:51:01 -0400 Received: from omr3.cc.ipv6.vt.edu ([2607:b400:92:8500:0:55:bd7a:9708] helo=omr3.cc.vt.edu) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1jxI95-0007rQ-7F for Kernelnewbies@kernelnewbies.org; Sun, 19 Jul 2020 18:50:59 -0400 Received: from mr1.cc.vt.edu (mr1.cc.ipv6.vt.edu [IPv6:2607:b400:92:8300:0:31:1732:8aa4]) by omr3.cc.vt.edu (8.14.7/8.14.7) with ESMTP id 06JMotBg079576 for ; Sun, 19 Jul 2020 18:50:55 -0400 Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mr1.cc.vt.edu (8.14.7/8.14.7) with ESMTP id 06JMoo14018955 for ; Sun, 19 Jul 2020 18:50:55 -0400 Received: by mail-qt1-f198.google.com with SMTP id u93so10765166qtd.8 for ; Sun, 19 Jul 2020 15:50:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :mime-version:content-transfer-encoding:date:message-id; bh=boyTWjd5DGE1IbXYuoB5pFGmG2Nios+5XODilQTY7vo=; b=Q2FNVMILlTlYvujrLlQwy6YWw4y6M3HaFfziZyMIIJxnbMR+c8pzYDoXgvLd/Jmw7d /iOfzM7a+HmfRnnasxmvIf4KZVKZ0msbPMJT7FPzHeNy4knBF9iVmqEIeuc0QN0F8TrU OOOmLByj9nWZHR3hdI8NdXl6NIQX/ZUR6NFD8TDo6ruzGbICMuHylKb8T4Q4Sz0Id3EH NStMCh/8ox0dD1eIgy0o87SgAnDQG3tBD9lRhS6os0fYGgHbZX3PDBk1pUHJ5OMG5NZi ndAJ8cjkQOVmyMyyZFEiphXs2H2SNYrsKYTHAdtoRSvkfz+dykb+GCkkqv/pMSRVMM9b /BHQ== X-Gm-Message-State: AOAM530x2ZxwacXLtYPL8aPYy11NJIakwZipDVksocz36gPBFt46sAUt R0QaQ4yQo/P0Om8ekMkP9jmbPMCB+HOoi5Mq7W2tsbGNK/IfNQVyPZCCq4SracnKqC6ykfnuKvC s6Voam2iDcV8DdeA+h6/JqhRPZc64t/ZGWT3PhKk= X-Received: by 2002:ad4:4444:: with SMTP id l4mr19444432qvt.121.1595199049981; Sun, 19 Jul 2020 15:50:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeV8ImuZk3gDn66RqNKv22wr/uXA1IMp7GllKr+6+Q7CbjGRrgzwGoGfaDBTBkXP2r3ULeug== X-Received: by 2002:ad4:4444:: with SMTP id l4mr19444423qvt.121.1595199049607; Sun, 19 Jul 2020 15:50:49 -0700 (PDT) Received: from turing-police ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with ESMTPSA id c24sm19472948qtd.82.2020.07.19.15.50.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jul 2020 15:50:47 -0700 (PDT) From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Google-Original-From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev To: Richard Sailer Subject: Re: Dubios pointer casting with put_user() In-Reply-To: <8de3b54c-8731-4be1-3e69-228d99bc4384@systemli.org> References: <96764.1595026006@turing-police> <8de3b54c-8731-4be1-3e69-228d99bc4384@systemli.org> Mime-Version: 1.0 Date: Sun, 19 Jul 2020 18:50:47 -0400 Message-ID: <223952.1595199047@turing-police> Cc: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6601177180180091599==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============6601177180180091599== Content-Type: multipart/signed; boundary="==_Exmh_1595199046_72917P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1595199046_72917P Content-Type: text/plain; charset=us-ascii On Sun, 19 Jul 2020 14:15:36 +0200, Richard Sailer said: > > If that were true, you wouldn't need to pass the 'amount' variable.... > > > Hmm, that would make no sense to me. arg is a pointer to user space > memory, put_user would still need the value to copy to that memory. -ENOCAFFEINE. :) I was thinking copy_(to/from)_user, not get/put. I will now depart for the grocery store and obtain a supply of caffeine :) --==_Exmh_1595199046_72917P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQIVAwUBXxTORgdmEQWDXROgAQLGFg/+NHlcwAgcpXhePQ6g1omVDqd/TSYERmm3 5LIF1i0mIiTsGrkm6HhQ+xN2hjcFOzXzin72mPcZ1o6hg82UWQX1L95ZKgWS2kKG JQUzVVtscl+fAJNbvhklRrlqCvy7gPvh4LwaKWfPDbBIOz0EHQqCBmuqLWre1Xok 3ypya/vaZ57QVgRmphmztRgCVbMdqr2x3NZ42bBvCZBWloShZbw3slNY8v5gTwpJ sSRWkT8H4hLot7UZGeDmrgD4K7jBM1CePKObRRQ9ZKD+BQNK9Is7T2ER0Sja5DIG zntwd9rFSUybUpQwZa+LDx5wgRUfxPYKzSa+dD+AzlJEHOnhSxWaF3/t+jRQzHTZ gLD9pswvn6mX00ykbcAP0v36QA+6csp6Lz0ptJg40jn1F7wzQZPMFGfx17MwEQwb 60uAMo/Js/LJ4WoITdMuMnbCRisVWVsfa9SBTk4c9ToCYnabB2c4Gw4boJlVe4M+ QTMdIPG3s8eD6nIfGpR0f5BHWLvrgRIOBfMmPnHIM3K+s6xZem7hd0rXEDt06vul mQ2yq25ainx469B2HcAbEkg3fSiOB1IF7mGkG/EvufsZz4SC7H3H0or5bdtqHZn/ TWJy4ey1CKOmElTcxSpxIs0KsgbV+/2/ugOPM1l9u4Uc2F3/h0ejdB1YTGd7bIto fl7hA98ZgxE= =RiQl -----END PGP SIGNATURE----- --==_Exmh_1595199046_72917P-- --===============6601177180180091599== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============6601177180180091599==--