Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753250AbeAQL4l convert rfc822-to-8bit (ORCPT + 1 other); Wed, 17 Jan 2018 06:56:41 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50386 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752951AbeAQLzP (ORCPT ); Wed, 17 Jan 2018 06:55:15 -0500 Date: Wed, 17 Jan 2018 12:55:06 +0100 From: Martin Schwidefsky To: Christian Borntraeger Cc: Florian Weimer , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, Heiko Carstens , Paolo Bonzini , Cornelia Huck , Greg Kroah-Hartman , Jon Masters , Marcus Meissner , Jiri Kosina Subject: Re: [PATCH 4/6] s390: add system call to run tasks with modified branch prediction In-Reply-To: References: <1516182519-10623-1-git-send-email-schwidefsky@de.ibm.com> <1516182519-10623-5-git-send-email-schwidefsky@de.ibm.com> <5bda76be-0fec-8165-20bf-5cd8e51e955a@redhat.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-TM-AS-GCONF: 00 x-cbid: 18011711-0016-0000-0000-00000518BFF8 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011711-0017-0000-0000-000028553527 Message-Id: <20180117125506.26f3813c@mschwideX1> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-17_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801170172 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, 17 Jan 2018 12:14:52 +0100 Christian Borntraeger wrote: > On 01/17/2018 11:03 AM, Florian Weimer wrote: > > On 01/17/2018 10:48 AM, Martin Schwidefsky wrote: > >>          rc = syscall(__NR_s390_modify_bp); > >>          if (rc) { > >>                  perror("s390_modify_bp"); > >>                  exit(EXIT_FAILURE); > >>          } > > > > Isn't this traditionally done through personality or prctl? > > I think we want this per thread (and not per process). So I assume personality > will not work out. Can a prctl be done per thread? The prctl interface seems to be usable to set a per-thread control as well. But there is no architecture specific prctl as far as I can see. Maybe a common PR_SET_NOBP with an arch function like arch_set_nobp. > > > > This looks like something other architectures may want as well. Yes, that is likely. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.