Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp319177pxm; Wed, 2 Mar 2022 16:16:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNnz1qeq4JfBE14TGzB+I1OGEQe0+svqZYepHqSHJ+RKPpWODmkQ4/mkzAp/ecGssHdiXQ X-Received: by 2002:a17:902:eb88:b0:151:3de0:c624 with SMTP id q8-20020a170902eb8800b001513de0c624mr26713910plg.86.1646266601650; Wed, 02 Mar 2022 16:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646266601; cv=none; d=google.com; s=arc-20160816; b=XDO+1JjRZIEDSulDQAT7WtTpYf2006SN3mnc8Kwbdh2Jk9EFpofkyQx2Q1I7fwoAph G5yDF4uqLLUsJGaARPIsLb61dkKuqwWmNm21mTW2v4EROp4rY8OfalJ1XpL84xdnJ72V vfFG1x7W2jZVLtf6Ux1bM22SYqFubFhl1+qhMTXkuVihrFLyw3DYBWWQ7/efVSO1AY0J 7VsyVpd35OixmO5y1dSqV91V05M0PrX+/qehGLsOT88ztXxcfftbii5GhdY67WRoocoD fSxUbWfmmQxXyUbEeCUUtsd8/xaBc/4zCFWwO4ieiak4ygb1yT06tUfqllyO83yKFHmf /9Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=2NFksIm3bK2Nk6tNMAfCtfA5dJfX7a/bz2f7hQJp/po=; b=TwSBJjfncFLCD1Fl6iOD7iNt6L0c1Dsj7Wnt13NA9pOhV7ruFI3GkCFM8F3bvpFRtW KRwVbIPsUNuf6NdKf/9w07Njjq9X4aw/lu0ICgxuB1EGaV4f7j3wDaGnRLooeBXSLupw 3unVMEMnLM/n+X2+OuIIjOGZGYHG4PGZB+0W4dCZbEp7Ss77yRQbEGGMX5qlu1wRL3gC n9UtcHvH7huxymH5FCzXJg34NTRaQXDjr5+RykcNvSE74q8vxYcnQkmcNag2KvVMofnc QxHIrDGY9JzMAHbsSm5uTz48RFZIm4lQrEkE0YiJLPPYgwaFXqT+X+rZMvXI/UNsGTdj /yWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IfsD9ZSY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b13-20020a170903228d00b001519d233ba8si547977plh.592.2022.03.02.16.16.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 16:16:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IfsD9ZSY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C57491D52B4; Wed, 2 Mar 2022 15:30:52 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240225AbiCBPrH (ORCPT + 99 others); Wed, 2 Mar 2022 10:47:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240275AbiCBPq4 (ORCPT ); Wed, 2 Mar 2022 10:46:56 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF816CB650; Wed, 2 Mar 2022 07:46:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646235972; x=1677771972; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=uDEmAHta6/0fV9EWeWY03MnT0yAmLB5e+vpiDUmduww=; b=IfsD9ZSYC9ARSYlKrsSzT47UFFEcPu3/m73ZfFhI1jVc1pc+bea0NI9E DKcBs0D70UQvmXxAtgwO2mU+Ba0KMDyuE/SXBzbqOBtO3H//dvgFjCiPo 7BYEUFbvnhffvWM03Z/7j29Tw12RyW6SqDr6wWeXE8A3i4cxrX6kaUM6d FyBoAsd/BLc/rD6EW6jsJnwMZ/KMG/w65dO/NRxUD1jAq7b04VyrNYr9F zkMQF45kYZpsaozlpDhXs1JwwO4y5jKy4w3H5Z2xkZOOCFHBWFHk8RQij d82Sr+uL5HiJqsdbsTW49lK9SmuuOu4lD4mfWnYLlciRatGz8NBd+Z1CA Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10274"; a="234047279" X-IronPort-AV: E=Sophos;i="5.90,149,1643702400"; d="scan'208";a="234047279" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2022 07:46:12 -0800 X-IronPort-AV: E=Sophos;i="5.90,149,1643702400"; d="scan'208";a="551299872" Received: from smile.fi.intel.com ([10.237.72.59]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2022 07:46:08 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nPRAG-00AMkQ-Ql; Wed, 02 Mar 2022 17:45:20 +0200 Date: Wed, 2 Mar 2022 17:45:20 +0200 From: Andy Shevchenko To: Christian Borntraeger , kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Janosch Frank , Claudio Imbrenda , David Hildenbrand , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Sven Schnelle Subject: Re: [PATCH v1 1/1] KVM: s390: Don't cast parameter in bit operations Message-ID: References: <20220223164420.45344-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220223164420.45344-1-andriy.shevchenko@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Wed, Feb 23, 2022 at 06:44:20PM +0200, Andy Shevchenko wrote: > While in this particular case it would not be a (critical) issue, > the pattern itself is bad and error prone in case somebody blindly > copies to their code. > > Don't cast parameter to unsigned long pointer in the bit operations. > Instead copy to a local variable on stack of a proper type and use. After looking into other similar cases I may conclude they - need to be fixed - out of scope of this change Hence, can this fix be applied? -- With Best Regards, Andy Shevchenko