All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Ivanov <anton.ivanov@kot-begemot.co.uk>
To: Benjamin Berg <benjamin@sipsolutions.net>,
	Johannes Berg <johannes@sipsolutions.net>,
	Hajime Tazaki <thehajime@gmail.com>
Cc: rrs@debian.org, chris.obbard@collabora.com,
	linux-um@lists.infradead.org, 983379@bugs.debian.org
Subject: Re: linux uml segfault
Date: Thu, 4 Mar 2021 18:41:45 +0000	[thread overview]
Message-ID: <fdbe84e1-ab45-7eb4-7aa7-5ba9798be633@kot-begemot.co.uk> (raw)
In-Reply-To: <19322b1442a7fc5938e026cb4eccc113a7c2328b.camel@sipsolutions.net>



On 04/03/2021 08:05, Benjamin Berg wrote:
> On Thu, 2021-03-04 at 08:47 +0100, Johannes Berg wrote:
> On Thu, 2021-03-04 at 14:38 +0900, Hajime Tazaki wrote:
> 
>>> Now, I don't know how to fix it (short of changing your nsswitch
>>> configuration) - maybe we could somehow rename sem_init()? Or maybe
>>> we
>>> can somehow give the kernel binary a lower symbol resolution than
>>> the
>>> libc/libpthread.
>>
>> objcopy (from binutils) can localize symbols (i.e., objcopy -L
>> sem_init $orig_file $new_file).  It also does renaming symbols.  But
>> not sure this is the ideal solution.
> 
> Yes, we started thinking about it but it was too late at night when I
> replied ...
> 
> I think there's basically a way to have an external list of symbols to
> export, for symbol versioning, that we could/should use to basically
> not
> export any of the kernel symbols out to libs.
> 
> Maybe using the ld --version-script= option here works to mark all
> kernel symbols as being "local" and prevent them from being picked up
> by libraries.
> 
> Benjamin
> 
>> How does UML handle symbol conflicts between userspace code and Linux
>> kernel (like this case sem_init) ?  AFAIK, libnl has a same symbol as
>> Linux kernel (genlmsg_put) and others can possibly do as well.
> 
> I fear it doesn't?

I can confirm that it did and this bug is bisect-able.

with 5.7

# dd if=/dev/ubda of=/dev/null bs=1M
16384+1 records in
16384+1 records out
17179869696 bytes (17 GB, 16 GiB) copied, 10.6973 s, 1.6 GB/s

with 5.10 the speed is 2.2
5.7 with "strings from glibc" patch speed is 2.2

As we did not do anything else in this timeframe to jack up the speed from 1.6GB/s to 2.2GB/s and as it is identical to the speed you get with the "use glibc strings.h" this looks like a good criteria to bisect on.

I am going to do a bisect with 5.7 "good" and 5.10 "bad" using the speed test as a working hypothesis.

A.


> 
> johannes
> 
> 
> _______________________________________________
> linux-um mailing list
> linux-um@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-um
> 
> 
> 
> _______________________________________________
> linux-um mailing list
> linux-um@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-um
> 

-- 
Anton R. Ivanov
https://www.kot-begemot.co.uk/

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

  reply	other threads:[~2021-03-04 19:03 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23  8:06 linux uml segfault Ritesh Raj Sarraf
2021-02-23 10:50 ` Anton Ivanov
2021-02-23 12:12   ` Christopher Obbard
2021-02-23 12:24     ` Anton Ivanov
2021-02-23 17:19     ` Anton Ivanov
2021-02-23 17:26       ` Ritesh Raj Sarraf
2021-02-23 18:02         ` Anton Ivanov
2021-02-24 11:44         ` Anton Ivanov
2021-03-02  9:09           ` Ritesh Raj Sarraf
2021-03-02 11:34             ` Anton Ivanov
2021-03-02 14:23               ` Ritesh Raj Sarraf
2021-03-02 17:05                 ` Anton Ivanov
2021-03-02 17:27                   ` Ritesh Raj Sarraf
2021-03-03  9:30                     ` Anton Ivanov
2021-03-03 10:45                       ` Bug#983379: " Ritesh Raj Sarraf
2021-03-03 10:53                         ` Anton Ivanov
2021-03-03 22:40                     ` Johannes Berg
2021-03-04  5:38                       ` Hajime Tazaki
2021-03-04  7:45                         ` Anton Ivanov
2021-03-04  7:47                         ` Johannes Berg
2021-03-04  8:05                           ` Benjamin Berg
2021-03-04 18:41                             ` Anton Ivanov [this message]
2021-03-05  9:59                               ` Anton Ivanov
2021-03-05 10:07                                 ` Johannes Berg
2021-03-05 17:39                           ` Anton Ivanov
2021-03-05 18:32                             ` Johannes Berg
2021-03-05 19:03                               ` Anton Ivanov
2021-03-05 20:06                                 ` Johannes Berg
2021-03-05 20:07                             ` Johannes Berg
2021-03-05 20:22                         ` Johannes Berg
2021-03-05 22:25                           ` Hajime Tazaki
2021-03-07 12:22                           ` Hajime Tazaki
2021-03-07 12:56                             ` Johannes Berg
2021-03-04  7:28                       ` Anton Ivanov
2021-03-04  7:43                         ` Johannes Berg
2021-03-05 19:54                       ` Johannes Berg
2021-03-05 20:43 ` [PATCH] um: mark all kernel symbols as local Johannes Berg
2021-03-05 20:54   ` Anton Ivanov
2021-03-06 10:51     ` Ritesh Raj Sarraf
2021-03-08 10:29       ` Bug#983379: " Ritesh Raj Sarraf
2021-03-08 10:33         ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fdbe84e1-ab45-7eb4-7aa7-5ba9798be633@kot-begemot.co.uk \
    --to=anton.ivanov@kot-begemot.co.uk \
    --cc=983379@bugs.debian.org \
    --cc=benjamin@sipsolutions.net \
    --cc=chris.obbard@collabora.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-um@lists.infradead.org \
    --cc=rrs@debian.org \
    --cc=thehajime@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.