Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp884438lqs; Fri, 14 Jun 2024 08:19:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWoCqCJj5R7nUfohDgYk1BmZTrU6qFhAVIMMduz+Nvnglj+scF5TtsLGcR8bjxn8bVyzp7rD+02n8Nvlkb4NjKE+SUVjTlr3KoX2eTnwQ== X-Google-Smtp-Source: AGHT+IEdfD11a5rj7NV/NGPbuYzuHGWo2ZaRcjpXIfrcXSgT06Rul0cfu5tvKuWt7a3hwuJ9y3SQ X-Received: by 2002:a19:e014:0:b0:52c:98b1:36d9 with SMTP id 2adb3069b0e04-52ca6e9da28mr2330240e87.62.1718378365415; Fri, 14 Jun 2024 08:19:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718378365; cv=pass; d=google.com; s=arc-20160816; b=wtwTpxnmx7Yf3Q4nOHH1nhE+hXBLurUwvzc2wM+ukPCU+/ksuu27DSpVpp0bzhmtAL K0p5DDy+zmJNKFdcMz3H7HTZORifTU/5aADa/XK7JxiLGnbkCzbWnnisetACoPpDRWeu 5zlM2scf540pe1Hxzu37VCMRSpLMTY4tIV3BVGe+BJOX8gyRaBN56o4ZU4toxHSgg6B/ l9l2IGedXbSP5tREIE3J1B1h/Xgw3YySKhRPXv+jlYj8lMqyE2wxWIJNCvaiEBx3SRy5 8T1RPQ4dMv+d4GHluSY9X/i7ZBMyokwHO3UTv45MJcoUFreS5vjgSPuqRXPHEykZq75m yKhQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=ShPU3+qy8bdD0vwOsgy2HhMz94KcM4uraJBHpdUlzug=; fh=i2KluTXb2i4Ks/BulgFim5fjxhCD2ysR8lneBGTVmTU=; b=uqiO2EUOXLuRgmcSlmjM5FaGeHMoQP2GrrVglUThL83xHeUIztbKBtCJtGExPwbs2N UKsjPYtLmfPsufiYcCU4Qph5I941JmAych5+fX3c5oHgAIIYZI7dwyZgTi3E+vEz5XiB ftXEVvv/r/9/aB/QmOIrKIXc+fsDCFKZMggYOUp0kmFAGhzlMo8DGf/MkDqIRvjb4vcY HfwHXJJ4G4hI9ejvh6zVwiStXpKdUFbhv91cel5KVhkoYuoObGasecByKqZ5c5Utpsmp fknE+k3KMqt8fg/az8GTl0M1jY58Bt+7wQ7xGijGe5NZPXI8TlI2cajUMnKK2rVfwxqk 4AcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="ds/wFUcH"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-215135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215135-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56e26fa7si183935266b.763.2024.06.14.08.19.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 08:19:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="ds/wFUcH"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-215135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215135-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 19A7D1F23373 for ; Fri, 14 Jun 2024 15:19:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 646D115FA93; Fri, 14 Jun 2024 15:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ds/wFUcH" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA43919D8B2 for ; Fri, 14 Jun 2024 15:18:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718378316; cv=none; b=LCC8QM5yuDrqUnGFPUph9kO06yTO1Nk34ALgq/LKbzI7klSU3DRMLaAjDyIBclgGF1+XovifE8YER/xkWSlOeJTdtdkXWR91guBlJkAnbduuIV4y2sTTepjoql6ty8sQnZKUljvDpQ7ss22vQQ6FnDArEyavHPBHfLdM5fYH9pc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718378316; c=relaxed/simple; bh=c/Yb0F0WHCXYlkdOM9UYtspRJ0q02tFTEdH4RZ88v0U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HiAo7PiK26huEc2YaN9U+KQSNyGYtJ+W8M7IWsrtIXnL2/+2Cc0IR2Tc6xVvMJFfBzppq4m/vwUNcEkkYiHr9LadM65XcFtKn7DhFBk5scBrRBDM4vIBI30bP84bwEvP38jf97BcXqeLmZI8hWCK35AdgodsteXbuFivjvRz7yw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ds/wFUcH; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718378314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ShPU3+qy8bdD0vwOsgy2HhMz94KcM4uraJBHpdUlzug=; b=ds/wFUcHGT4fBfEYhEoSl5/LqZm8QeJskw7we+bmsZ6/4fw/C8M8twQc+Rf57Qly1Xj8ZR 1StTeLpyv/oug5EGNLehY4V+sgwV5E/h1tNchJVmALuIghLpiWphyleZYsMKBUzVm3aehl InxQPtWk3/2nCjtOr5mRKnvVjzxC/IE= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-657-al5Z-aAcP0Okb7wLXN7gOg-1; Fri, 14 Jun 2024 11:18:27 -0400 X-MC-Unique: al5Z-aAcP0Okb7wLXN7gOg-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D45D319560B9; Fri, 14 Jun 2024 15:18:24 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.80]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 02A713000222; Fri, 14 Jun 2024 15:18:19 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Fri, 14 Jun 2024 17:16:53 +0200 (CEST) Date: Fri, 14 Jun 2024 17:16:47 +0200 From: Oleg Nesterov To: Ingo Molnar Cc: Nathan Chancellor , linux-kernel@vger.kernel.org, Andy Lutomirski , Andrew Morton , Dave Hansen , Peter Zijlstra , Borislav Petkov , Brian Gerst , "H . Peter Anvin" , Linus Torvalds , Thomas Gleixner , Uros Bizjak Subject: Re: [PATCH 10/9] x86/fpu: Fix 'struct fpu' misalignment on 32-bit kernels Message-ID: <20240614151404.GA27644@redhat.com> References: <20240608073134.264210-1-mingo@kernel.org> <20240608073134.264210-4-mingo@kernel.org> <20240610211350.GA1613053@thelio-3990X> <20240611124145.GA26798@redhat.com> <20240612184148.GB23973@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Hi Ingo, sorry for delay. On 06/13, Ingo Molnar wrote: > > > --- a/include/linux/sched.h > > +++ b/include/linux/sched.h > > @@ -1562,7 +1562,7 @@ struct task_struct { > > * they are included in the randomized portion of task_struct. > > */ > > randomized_struct_fields_end > > -}; > > +} __attribute__ ((aligned (64))); I guess __aligned(64) will look a bit better, but this is minor. > What happened is that due to my series 'struct task_struct' lost its > 64-byte alignment attribute, which broke the fpu struct allocation code on > 32-bit kernels and made the 64-bit one probably unrobust as well. Yes, and note that struct fpstate has the same __aligned(64), that is how I noticed the potential problem and decided to check. But Ingo, it was a shot in the dark ;) I still don't really understand what exactly should be aligned. Is it the fpstate->regs member? Or what? If yes, perhaps this member needs __aligned(64) too to be safe? > ... and would appreciate your Acked-by or Reviewed-by for the eventual > final version of the series, but I don't insist. ;-) Thanks ;) will do. Oleg.