GSoC 2020 introduction and query

Andrew Bartlett abartlet at
Sun Mar 22 07:49:43 UTC 2020

On Sun, 2020-03-22 at 04:20 +0530, Rohit Dandamudi via samba-technical
> Hello all,
> I am currently doing my undergrad in Computer science and Engineering
> at
> CBIT Hyderabad, India.
> I am interested to work on the project idea "Samba binary size
> reduction"
> as part of GSoC 2020. I have prior knowledge of C and Python as well
> as
> contributed to open source organizations like FOSSASIA, Macports
> before.
> Hopefully I am not too late, kindly let me know where to get started,
> and
> what should be done to make a strong proposel.


If you have worked on build systems before then you may well have the
skills you need here. 

What we need is for someone to take the ideas in the page, and the
concepts from the patch and make them a practical solution for Samba.

The primary task may well end up being in Perl, or Python, or C, the
challenge here will not be deep programming but lateral thinking about
how to break up the dependency chains.

Making this more challenging or interesting (depending on your
perspective), the RPC server is being rewritten, but for now the nexus
in source3/rpc_server/rpc_ncacn_np.c and the calls to
ndr_table_by_uuid() remain.

What you and other applicants may wish to do is see if that can be re-
written in such a way that does not require linking in the whole NDR
parser, just to obtain the information actually used. 

Finally, I send this to another student and I think it is worth
repeating publicly:

The challenge is that Samba over-links because some of the dependencies
are not fine grained enough.

A particular spot where we over-link is via the ndr-table subsytem,
which links to most of our (large) generated parsers for every RPC
protocol we know.

Some bits of the code that link to ndr-table only want some metadata,
but they end up linking to each NDR_* subsystem because the metadata is
at the bottom of each parser (the ndr_*.c files).  

The fundemental challenge is likely to be a lot of cases where:

 A depends on B
 C depends on D

But B and C are in the same file, but B does not actually depend on C.

There are likely many other parts of Samba which link to large things
that are not needed.  For example, perhaps we should allow a build
without printing support, or parsing of the printing protocols?

The challenge is is doing this in a way that is clean, and mostly done
in the build system, not by #ifdef in the code.

Skills in determining binary dependencies, as well as the build system
dependencies (to compare with) would be very helpful in this project. 

Andrew Bartlett
Andrew Bartlett             
Authentication Developer, Samba Team
Samba Developer, Catalyst IT 

More information about the samba-technical mailing list