Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753020AbeAQLua (ORCPT + 1 other); Wed, 17 Jan 2018 06:50:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53782 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752664AbeAQLu2 (ORCPT ); Wed, 17 Jan 2018 06:50:28 -0500 Subject: Re: [PATCH 4/6] s390: add system call to run tasks with modified branch prediction To: Christian Borntraeger , Florian Weimer , Martin Schwidefsky , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org Cc: Heiko Carstens , Cornelia Huck , Greg Kroah-Hartman , Jon Masters , Marcus Meissner , Jiri Kosina 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> From: Paolo Bonzini Message-ID: <299df1a8-f78d-15be-7217-6f201ea849c7@redhat.com> Date: Wed, 17 Jan 2018 12:50:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 17 Jan 2018 11:50:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 17/01/2018 12:14, 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? Yes, prctls can be either per-process (e.g. PR_SET_CHILD_SUBREAPER or PR_SET_DUMPABLE) or per-thread (e.g. PR_SET_NAME or PR_SET_SECCOMP). Paolo