Received: by 10.223.164.202 with SMTP id h10csp1636050wrb; Thu, 23 Nov 2017 22:27:52 -0800 (PST) X-Google-Smtp-Source: AGs4zMZHCPBrUcMcLDzuue03U0y/HS5+YKDX29hb3EaGmbe5bV1gfaB8AaLQuEA/EvN3MoOTlg/6 X-Received: by 10.99.119.134 with SMTP id s128mr26542917pgc.409.1511504872308; Thu, 23 Nov 2017 22:27:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511504872; cv=none; d=google.com; s=arc-20160816; b=OoUsdJ01sUSM1oh4ymL+Et/R/0dn22KA16dkKJOKlNppL02F0kD0QVjkuPRFV0J5EL veI9iHwAwtYFkIl7t2goiFizHPzQcTKpYtil5DlvGN/LBenlW0XOY4omQpbUxDyVWfJ+ JOp0vvgDjt1vUvrFTd3jVU05QCK+dfqZ/FEf4wYeaG5BcslTxcYPL194PPkpLlPfkLSi octU54u82fzKcHbqhEyeOjzYZEcsG9yQvk0/DmlI5SCoty4L7Z6tYgQptdurypsbARfG VrG+if+pDeQLiRs6fwuDs6vkfkT4h65O21p0fe0tsZgaphX6iKowMIfp5RGJiatFQeW0 cCgg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=C5at9f6H0hEK1vJFW5XAL4w+UjJvH+d5udnZB6ZmchM=; b=e532jaXvRMKVqoLez5w4aUPQENBv1qU/5lD3b8r6JMtDlR3OPzXcedVxb/7JN7673z ecE8FDD9EMN+FUdnmHgqSV4TVDpR907DVbCWD/IMOcOybs94yn9GaGdRFlxYaLWip705 v706YttpIMeU3WfZJLtYZZ5+lfb0a4ZR7B0FcSweJUPYluvZil2TZmd6QCOcZeSlLlFp Qph6mMdaZMFw76WMtX6j3lEqUKHYKveAx3BF19fWKHyAXTepYlyXTiUs5Jni7kQFlwD3 7f65B0Gr70fQBQj981LRjd17kShRYM9FGceQkItac6mw1aPlf0TV7pnl8mIRz0ymXJRM xtgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jv5P9EYi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f34si17696661ple.337.2017.11.23.22.27.41; Thu, 23 Nov 2017 22:27:52 -0800 (PST) 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=@linaro.org header.s=google header.b=Jv5P9EYi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752939AbdKXG0s (ORCPT + 76 others); Fri, 24 Nov 2017 01:26:48 -0500 Received: from mail-io0-f178.google.com ([209.85.223.178]:40376 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752456AbdKXG0q (ORCPT ); Fri, 24 Nov 2017 01:26:46 -0500 Received: by mail-io0-f178.google.com with SMTP id d21so6371617ioe.7 for ; Thu, 23 Nov 2017 22:26:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=C5at9f6H0hEK1vJFW5XAL4w+UjJvH+d5udnZB6ZmchM=; b=Jv5P9EYi/Vi/oxLCfgJuD6gsSRm4TeYBVKosdzuCUow/JpH3VRfg7DDquyKL1Zwa0N Zl8FHqtWhEDQDZ5eVhKBpBSdaCDm6NgWOOOqKZ3uW4eUchhP1OWRNTMm8Hcl22pU94ff 3CNQImRLU+buny7MmLAtbL6XKUwHibvjxEAcg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=C5at9f6H0hEK1vJFW5XAL4w+UjJvH+d5udnZB6ZmchM=; b=HXf9DWTBCrRggFCb6sR6YXQ14ko/g0FglaYUsrkz+DynH85aDEWSfxXw29D+yiyLYO jwVZDL1UG5fMmN5uUzXiSUVR00ajn192LREGkYTHl89YtPq/RNy6Jhfo4DyFXlYvJTaF ioB2wTmVZFNPSx+nAwuAEAoZkbWiQQNpDvqf3udIV/qF24XpYLNklLn6TVEcInjmIg+3 trMKsEliV8EsPnF7jaMWvztivlcArqxaaMI2dwtCnRVzcwqCKiiMB8Or5Fbh6vPaeXFz Z/3HaSHy5+5p8sZj9+iap3aAdc4dtEcwidwwp5Y2b8brqCAQharBatN3+2m1kewIt7KK VVNQ== X-Gm-Message-State: AJaThX5OnMpNxMB4Gs/wVbJVMgWdjoMKuath0FkbvIkIvSssiE3fYXBT CvOjC5zzlmTtWH292z0Sg7m9jg== X-Received: by 10.107.11.226 with SMTP id 95mr27334525iol.78.1511504805939; Thu, 23 Nov 2017 22:26:45 -0800 (PST) Received: from [10.28.122.226] ([85.203.47.67]) by smtp.gmail.com with ESMTPSA id i62sm8631504ioe.31.2017.11.23.22.26.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Nov 2017 22:26:44 -0800 (PST) Subject: Re: [PATCH RT 03/10] random: avoid preempt_disable()ed section To: Steven Rostedt , linux-kernel@vger.kernel.org, linux-rt-users Cc: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Paul Gortmaker , Julia Cartwright , Daniel Wagner , tom.zanussi@linux.intel.com References: <20171123053341.174002403@goodmis.org> <20171123053433.594374450@goodmis.org> From: Alex Shi Message-ID: <584fdcad-9afe-fb19-04dd-46358a04fc17@linaro.org> Date: Fri, 24 Nov 2017 14:26:40 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171123053433.594374450@goodmis.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steve, I just build the patches, a build error found here: drivers/char/random.c: In function ‘get_random_int’: drivers/char/random.c:1816:7: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash); ^ drivers/char/random.c: In function ‘get_random_long’: drivers/char/random.c:1838:7: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash); ^ > - hash = get_cpu_var(get_random_int_hash); > + hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash); ^ Is this a extra '&' which need to remove? > > hash[0] += current->pid + jiffies + random_get_entropy(); > md5_transform(hash, random_int_secret); > ret = hash[0]; > - put_cpu_var(get_random_int_hash); > + put_locked_var(hash_entropy_int_lock, get_random_int_hash); > > return ret; > } > @@ -1833,12 +1835,12 @@ unsigned long get_random_long(void) > if (arch_get_random_long(&ret)) > return ret; > > - hash = get_cpu_var(get_random_int_hash); > + hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash); ^ Ditto Regards Alex From 1584833864528494427@xxx Thu Nov 23 05:35:52 +0000 2017 X-GM-THRID: 1584833864528494427 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread